- Instalar Oracle Key Vault en Oracle Compute Cloud@Customer
- Obtener información sobre la configuración del servidor y el cluster
Obtener información sobre la configuración del servidor y el cluster
Después de instalar y configurar Oracle Key Vault, debe configurar tanto el servidor como el cluster, como se describe en este artículo.
Configuración del Servidor
En el servidor que utilizará para realizar la configuración, descargue el paquete de servicio de OKV RESTful de la siguiente manera:
Note:
Debe hacerlo una vez por servidor que está configurando, ya que la descarga incluye certificados para el servidor de OKV.- En la raíz del servidor (por ejemplo,
[root@c3bastion tmp]#), cree y navegue hasta el directorio/tmp/okv:mkdir /tmp/okvcd /tmp/okvcurl -Ok --tlsv1.2 https://10.122.56.16:5695/okvrestclipackage.zipEl sistema responde:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2740 100 2740 0 0 78 0 0:00:35 0:00:34 0:00:01 741 - Descomprima
okvrestclipackage.zip:unzip okvrestclipackage.zipEl sistema responde:Archive: okvrestclipackage.zip creating: lib/ creating: bin/ inflating: bin/okv inflating: bin/okv.bat creating: conf/ inflating: conf/okvrestcli.ini inflating: conf/okvrestcli_logging.properties inflating: lib/okvrestcli.jarA continuación, vaya abin:cd bin - Edite
bin/okvpara eliminar el signo de almohadilla (#) para activar la segunda sentenciaexport:#!/bin/bash export OKV_RESTCLI_DIR=$(dirname "${0}")/.. #export OKV_RESTCLI_CONFIG=$OKV_RESTCLI_DIR/conf/okvrestcli.ini if [ -z "$JAVA_HOME" ] then echo "JAVA_HOME environment variable is not set." exit 1 fi if [ -z "$OKV_RESTCLI_CONFIG" ] then echo "OKV_RESTCLI_CONFIG environment variable is not set." exit 1 fi export OKV_RESTCLI_JAR=$OKV_RESTCLI_DIR/lib/okvrestcli.jar $JAVA_HOME/bin/java jar $OKV_RESTCLI_JAR "$@"Las tres primeras líneas ahora deberían tener este aspecto:!/bin/bash export OKV_RESTCLI_DIR=$(dirname "${0}")/.. export OKV_RESTCLI_CONFIG=$OKV_RESTCLI_DIR/conf/okvrestcli.ini - Edite
conf/okvrestcli.iniy elimine el signo de almohadilla al principio de la cuarta a la sexta línea, agregue la dirección IP privada del primer servidor, agregue el nombre de usuario y suprima la línea que empieza porpassword:#Provide absolute path for log_property, okv_client_config properties [Default] #log_property=./conf/okvrestcli_logging.properties #server= #okv_client_config=./conf/okvclient.ora #user=name of an OKV-administrator with the SYSADMIN privilege client_wallet = .El archivo ahora debería tener un aspecto similar a este:#Provide absolute path for log_property, okv_client_config properties [Default] log_property=./conf/okvrestcli_logging.properties server=IP_address of OKV01 okv_client_config=./conf/okvclient.ora user=name of an OKV-administrator with the SYSADMIN privilege client_wallet = . - A continuación, defina la variable JAVA_HOME. Esto se debe hacer para que el comando REST
OKVfuncione.- Identifique su versión de Java:
java -versionEl sistema responde:openjdk version "1.8.0_372" OpenJDK Runtime Environment (build 1.8.0_372-b07) OpenJDK 64-Bit Server VM (build 25.372-b07, mixed mode) - OpenJDK no es compatible; el programa Linux
nameisigue enlaces simbólicos y ayuda a confirmar dónde está instalado OpenJDK. Introduzca:which javaEl sistema responde:/usr/bin/javaA continuación, introduzca:namei /usr/bin/java | grep " l "El sistema responde:l java --> /etc/alternatives/java l java --> /usr/lib/jvm/java 1.8.0 openjdk 1.8.0.372.b07 1.el7_9.x86_64/jre/bin/java - Ahora, utilice comandos compatibles con scripts para descargar Oracle Java; desde la raíz del servidor (por ejemplo,
[root@c3bastion okv], introduzca:wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpmEl sistema responde (este ejemplo se ha editado por brevedad):Saving to: ‘jdk-17_linux-x64_bin.rpm’ 100%[============================================================================================================>] 182,170,753 22.3MB/s in 4.9s 2023-11-14 10:21:48 (35.5 MB/s) - ‘jdk-17_linux-x64_bin.rpm’ saved [182170753/182170753]Ahora, utilice el comando de yumlocalinstallpara instalar el JDK:yum localinstall ./jdk-17_linux-x64_bin.rpmEl sistema responde:Loaded plugins: ulninfo Examining ./jdk-17_linux-x64_bin.rpm: 2000:jdk-17-17.0.9-11.x86_64 Marking ./jdk-17_linux-x64_bin.rpm to be installed . . . Installed: jdk-17.x86_64 2000:17.0.9-11 Complete! - Confirme que el proceso de instalación de java ha actualizado "alternativas":
namei /usr/bin/java | grep " l "El sistema responde:l java --> /etc/alternatives/java l java --> /usr/lib/jvm/jdk 17 oracle x64/bin/java - Tenga en cuenta que la salida anterior identifica
JAVA_HOME. Ahora, exporte la variableJAVA_HOMEal sistema:export JAVA_HOME=/usr/lib/jvm/jdk-17-oracle-x64 - Por último, para simplificar el proceso de despliegue, almacene la contraseña del administrador de OKV con el privilegio
SYSADMINen una cartera:okv admin client-wallet add --client-wallet . --wallet-user name of an OKV-administrator with the SYSADMIN privilegeEl sistema solicita una contraseña:Password:Introduzca la contraseña de un administrador de OKV con el privilegioSYSADMINy el sistema confirmará el almacenamiento correcto:{ "result" : "Success" }
- Identifique su versión de Java:
Configurar el cluster
Una vez que se instala y configura el software de OKV inicial en el servidor, ahora puede configurar el cluster.
Realice los siguientes pasos desde la línea de comandos raíz del servidor (por ejemplo,
[root@c3bastion okv]).
- Convierta OKV independiente en un nodo candidato; introduzca:
bin/okv cluster node create --cluster-name OCEAN11 --cluster-subgroup WEST_COAST --node-name OKV04El sistema responde:{ "result" : "Success", "value" : { "requestId" : "26032" } } - Compruebe el estado del nodo de cluster:
bin/okv cluster node status --pairing-request-id 26032El sistema responde:{ "result" : "Success", "value" : { "status" : "IN-PROGRESS" } }Tras unos instantes, "EN PROGRESO" cambia a "SUCCEEDED":{ "result" : "Success", "value" : { "status" : "SUCCEEDED" } }Una vez completado este paso, el nodo debe aparecer en el separador Cluster Management and Monitoring.
- A continuación, agregue un segundo servidor de OKV independiente al primero para crear un par de lectura y escritura. Este comando solicita un nodeID único antes de agregar un nodo y confirma qué nodeID ya se ha realizado:
okv cluster info get | jq -r '.value.nodes[].nodeID'okv cluster node add --candidate-node-ip-address 172.20.0.33 --candidate-node-user sadmin --cluster-subgroup WEST_COAST --mode READ-WRITE --node-id 2 --node-name OKV06El sistema responde:Recovery Passphrase:Introduzca la contraseña del primer nodo de OKV.
Candidate Node Password:Introduzca la contraseña de un administrador de OKV que tiene el privilegio SYSADMIN. El sistema responde:{ "result" : "Success", "value" : { "requestId" : "3060" } } - Ahora supervise el proceso de configuración del primer nodo:
bin/okv cluster node status --pairing-steps TRUE --node-name OKV04El sistema responde:{ "result" : "Success", "value" : { "stages" : [ { "step1" : "Open transport channel with the candidate node", "status" : "COMPLETED" }, { "step2" : "Verify the candidate node details", "status" : "COMPLETED" }, { "step4" : "Generate the controller node details", "status" : "COMPLETED" }, { "step5" : "Generate backup of the controller node for cloning", "status" : "COMPLETED" }, { "step6" : "Send clone bundle to the candidate node", "status" : "" }, { "step7" : "Enable data replication (downstream mining configuration) to the candidate node", "status" : "" }, { "step8" : "Enable data replication to other cluster nodes", "status" : "" }, { "step9" : "The candidate node successfully joins the cluster", "status" : "" } ] } } - Ahora compruebe el progreso del segundo nodo:
bin/okv cluster node status --pairing-steps TRUE --candidate-node-ip-address 172.20.0.21 --candidate-node-user sadminEl sistema responde:Candidate Node PasswordIntroduzca la contraseña y aparecerá la configuración del cluster:{ "result" : "Success", "value" : { "stages" : [ { "step1" : "Send node details to the controller node", "status" : "COMPLETED" }, { "step2" : "Receive clone bundle from the controller node", "status" : "COMPLETED" }, { "step3" : "Restore backup on the candidate node", "status" : "COMPLETED" }, { "step4" : "Update credentials of the candidate node", "status" : "COMPLETED" }, { "step5" : "Tune the database on the candidate node", "status" : "COMPLETED" }, { "step6" : "Setup network configuration on the candidate node", "status" : "COMPLETED" }, { "step7" : "Enable data replication (downstream mining configuration) on the candidate node", "status" : "COMPLETED" }, { "step8" : "Enable data replication on the candidate node", "status" : "COMPLETED" } ] } } - Compruebe el estado del emparejamiento. Si la configuración se realiza correctamente, se mostrará como Sin estado de emparejamiento:
bin/okv cluster node status --pairing-steps TRUE --node-name OKV10El sistema responde:{ "result" : "Failure", "message" : "No pairing status" } - Finalmente, verifique que el primer par de lectura y escritura de OKV de dos nodos esté listo para ser utilizado:
bin/okv cluster info getEl sistema responde:{ "result" : "Success", "value" : { "clusterName" : "OCEAN11", "clusterSubgroups" : [ "WEST_COAST" ], "clusterVersion" : "21.7.0.0.0", "maximumDisableNodeDuration" : "24 hrs", "nodes" : [ { "nodeName" : "OKV04", "nodeID" : "1", "ipAddress" : "172.20.0.33", "mode" : "Read-Write", "status" : "ACTIVE", "readWritePeer" : "OKV05", "clusterSubgroup" : "WEST_COAST", "joinDate" : "2023-11-16 20:53:25", "disableDate" : "", "version" : "21.7.0.0.0" }, { "nodeName" : "OKV05", "nodeID" : "2", "ipAddress" : "172.20.0.21", "mode" : "Read-Write", "status" : "ACTIVE", "readWritePeer" : "OKV04", "clusterSubgroup" : "WEST_COAST", "joinDate" : "2023-11-16 21:02:24", "disableDate" : "", "version" : "21.7.0.0.0" } ] } }
Oracle Key Vault ahora debe estar completamente instalado y puede utilizarlo como se describe en la documentación de Oracle Key Vault.