- Oracle Compute Cloud@Customer에 Oracle Key Vault 설치
- 서버 및 클러스터 구성에 대해 알아보기
서버 및 클러스터 구성에 대해 알아보기
Oracle Key Vault를 설치하고 구성한 후에는 이 문서에 설명된 대로 서버와 클러스터를 모두 구성해야 합니다.
서버 구성
구성 수행에 사용할 서버에서 다음과 같이 RESTful OKV 서비스 패키지를 다운로드합니다.
주:
다운로드에 OKV 서버에 대한 인증서가 포함되어 있으므로 구성 중인 서버당 이 작업을 한 번 수행해야 합니다.- 서버 루트(예:
[root@c3bastion tmp]#
)에서/tmp/okv
디렉토리를 만들고 탐색합니다.mkdir /tmp/okv
cd /tmp/okv
curl -Ok --tlsv1.2 https://10.122.56.16:5695/okvrestclipackage.zip
다음과 같이 시스템이 응답합니다.
% 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
okvrestclipackage.zip
의 압축을 풉니다.unzip okvrestclipackage.zip
다음과 같이 시스템이 응답합니다.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.jar
그런 다음bin
로 이동합니다.cd bin
bin/okv
를 편집하여 파운드 기호(#
)를 제거하여 두번째export
문을 사용으로 설정합니다.#!/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 "$@"
이제 처음 세 행은 다음과 같아야 합니다.!/bin/bash export OKV_RESTCLI_DIR=$(dirname "${0}")/.. export OKV_RESTCLI_CONFIG=$OKV_RESTCLI_DIR/conf/okvrestcli.ini
conf/okvrestcli.ini
를 편집하고 네번째 줄에서 여섯번째 줄 사이의 시작 부분에 있는 파운드 기호를 제거하고, 첫번째 서버의 개인 IP 주소를 추가하고, 사용자 이름을 추가하고,password
로 시작하는 행을 삭제합니다.#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 = .
파일은 다음과 같아야 합니다.#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 = .
- 그런 다음 JAVA_HOME 변수를 설정합니다.
OKV
REST 명령이 작동하려면 이 작업을 수행해야 합니다.- 사용자의 Java 버전 식별:
java -version
다음과 같이 시스템이 응답합니다.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는 지원되지 않습니다. Linux 프로그램
namei
는 심볼릭 링크를 따르고 OpenJDK가 설치된 위치를 확인하는 데 도움이 됩니다. 다음을 입력합니다.which java
다음과 같이 시스템이 응답합니다./usr/bin/java
그런 다음 다음을 입력합니다.namei /usr/bin/java | grep " l "
다음과 같이 시스템이 응답합니다.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
- 이제 스크립트 친화적 명령을 사용하여 서버 루트에서 Oracle Java를 다운로드합니다(예:
[root@c3bastion okv]
). 다음을 입력합니다.wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
시스템이 응답합니다(이 예제는 간결하게 편집됨).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]
이제 yum 명령localinstall
를 사용하여 JDK를 설치합니다.yum localinstall ./jdk-17_linux-x64_bin.rpm
다음과 같이 시스템이 응답합니다.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!
- Java 설치 프로세스에서 "대체"가 업데이트되었는지 확인합니다.
namei /usr/bin/java | grep " l "
다음과 같이 시스템이 응답합니다.l java --> /etc/alternatives/java l java --> /usr/lib/jvm/jdk 17 oracle x64/bin/java
- 앞의 출력은
JAVA_HOME
를 식별합니다. 이제JAVA_HOME
변수를 시스템으로 내보냅니다.export JAVA_HOME=/usr/lib/jvm/jdk-17-oracle-x64
- 마지막으로 배치 프로세스를 간소화하려면 OKV 관리자의 암호를 전자 지갑에
SYSADMIN
권한으로 저장합니다.okv admin client-wallet add --client-wallet . --wallet-user name of an OKV-administrator with the SYSADMIN privilege
시스템에서 암호를 묻습니다.Password:
OKV 관리자의 암호를SYSADMIN
권한으로 입력하면 시스템에서 성공적인 저장소를 확인합니다.{ "result" : "Success" }
- 사용자의 Java 버전 식별:
클러스터를 구성합니다.
초기 OKV 소프트웨어가 서버에 설치되고 구성되면 이제 클러스터를 구성할 수 있습니다.
서버 루트 명령줄(예:
[root@c3bastion okv]
)에서 다음 단계를 수행합니다.
- 독립형 OKV를 후보 노드로 변환합니다. 다음을 입력합니다.
bin/okv cluster node create --cluster-name OCEAN11 --cluster-subgroup WEST_COAST --node-name OKV04
다음과 같이 시스템이 응답합니다.{ "result" : "Success", "value" : { "requestId" : "26032" } }
- 이제 클러스터 노드 상태를 확인합니다.
bin/okv cluster node status --pairing-request-id 26032
다음과 같이 시스템이 응답합니다.{ "result" : "Success", "value" : { "status" : "IN-PROGRESS" } }
잠시 후 "IN-PROGRESS"가 "SUCCEEDED"로 변경됩니다.{ "result" : "Success", "value" : { "status" : "SUCCEEDED" } }
이 단계가 완료되면 클러스터 관리 및 모니터링 탭에 노드가 표시됩니다.
- 이제 두번째 독립형 OKV 서버를 추가하여 먼저 읽기-쓰기 쌍을 작성합니다. 이 명령은 노드를 추가하기 전에 고유한 nodeID를 요청하고 nodeID가 이미 수행되었는지 확인합니다.
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 OKV06
다음과 같이 시스템이 응답합니다.Recovery Passphrase:
첫번째 OKV 노드의 암호를 입력합니다.
Candidate Node Password:
SYSADMIN 권한이 있는 OKV 관리자의 비밀번호를 입력합니다. 다음과 같이 시스템이 응답합니다.{ "result" : "Success", "value" : { "requestId" : "3060" } }
- 이제 첫번째 노드의 구성 프로세스를 모니터합니다.
bin/okv cluster node status --pairing-steps TRUE --node-name OKV04
다음과 같이 시스템이 응답합니다.{ "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" : "" } ] } }
- 이제 두번째 노드의 진행 상황을 확인합니다.
bin/okv cluster node status --pairing-steps TRUE --candidate-node-ip-address 172.20.0.21 --candidate-node-user sadmin
다음과 같이 시스템이 응답합니다.Candidate Node Password
암호를 입력하면 클러스터 구성이 나타납니다.{ "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" } ] } }
- 페어링 상태를 확인합니다. 구성이 성공하면 페어링 상태 없음으로 표시됩니다.
bin/okv cluster node status --pairing-steps TRUE --node-name OKV10
다음과 같이 시스템이 응답합니다.{ "result" : "Failure", "message" : "No pairing status" }
- 마지막으로, 처음 2노드 OKV 읽기/쓰기 쌍을 사용할 준비가 되었는지 확인합니다.
bin/okv cluster info get
다음과 같이 시스템이 응답합니다.{ "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가 완전히 설치되고 Oracle Key Vault 설명서에 설명된 대로 사용할 수 있습니다.