Kubernetes에 Oracle Identity Role Intelligence 배포
소개
Oracle Identity Role Intelligence(OIRI)는 서비스 내에서 구성된 역할 마이닝 규칙에 따라 사용자가 데이터 소스(플랫 파일 또는 Oracle Identity Governance)에서 후보 역할 집합을 생성할 수 있는 서비스를 제공합니다. 이 사용지침서에서는 Kubernetes 환경에 OIRI를 배포하는 방법을 보여줍니다.
목표
이 실습이 완료되면 Kubernetes 환경에 OIRI가 설치되어 있어야 합니다.
- OIRI 이미지 설치
- OIRI 스키마 생성 및 시드
필요 조건
Kubernetes에 OIRI를 배포하기 위한 사전 요구 사항은 다음과 같습니다.
- 온프레미스 또는 컨테이너 기반 12c Release 2(12.2.0.1)부터 Oracle Database 버전이 설치되어 실행 중입니다. Oracle Database 버전 18.3 및 19.3도 지원됩니다.
주: OIRI 데이터베이스를 12.1.x에서 12.2.x, 18c 또는 19c로 업그레이드한 경우 데이터베이스 매개변수
compatible
를 '12.2' 이상의 값으로 업데이트해야 합니다. 이 작업을 수행하지 않으면 일부 OIRI 데이터베이스 객체를 생성할 때ORA-00972: identifier is too long
오류가 표시됩니다.
kubectl
가 설치된 Docker 버전 19.03.11+ 및 Kubernetes 클러스터(v1.17+)가 설치되어 있습니다. Kubernetes 클러스터 설치에 대한 자세한 내용은 Kubernetes 설명서를 참조하십시오.- ID 감사가 사용으로 설정된 Oracle Identity Governance 12c(번 번들 패치 12.2.1.4.210428 포함) ID 감사를 사용으로 설정하는 방법에 대한 자세한 내용은 Performing Self Service Tasks with Oracle Identity Governance의 Enabling Identity Audit을 참조하십시오.
- Kubernetes 클러스터 노드에서 사용될 영구 볼륨을 생성하는 데 사용할 수 있는 NFS 마운트 위치가 존재합니다. 이 자습서에서는
/nfs
로 간주됩니다.
OIG(Oracle Identity Governance)에 대한 인증 구성
OIG는 OIRI의 운용 인스턴스에 대한 인증 제공자입니다. OIRI를 사용하려면 사용자가 OIRI 응용 프로그램에 액세스할 수 있도록 다음 OIG 사용자 및 롤을 구성하고 이를 인증하여 OIG에 롤을 게시하도록 설정해야 합니다.
- OIRI 서비스 계정 사용자: 이 사용자는 서비스가 OIRI와 OIG 간에 인증을 서비스할 수 있으며 롤을 OIG에 게시하는 데 사용됩니다.
- OIRI 애플리케이션 사용자: 이 사용자는 OIRI 애플리케이션에 로그인할 때 사용됩니다.
- OrclOIRIRoleEngineer 롤: OIRI 응용 프로그램에 대한 액세스를 허용하려면 이 롤을 OIRI 응용 프로그램 사용자에게 지정해야 합니다.
OrclOIRIRoleEngineer
롤을 가진 사용자만 OIRI 애플리케이션에 로그인할 수 있습니다.
-
OIRI 애플리케이션 사용자를 생성합니다.
admin
과 같은 사용자를 만들어 OIRI에 로그인합니다. OIG에서 사용자를 생성하는 방법에 대한 자세한 내용은 Oracle Identity Governance를 사용하여 셀프 서비스 작업 수행의 사용자 생성을 참조하십시오. -
OIRI 역할 엔지니어 역할을 생성합니다.
OIG 내에서 역할 엔지니어 역할을 생성하여 이전 단계에서 생성한 사용자
admin
에게 할당합니다. 이렇게 하려면OrclOIRIRoleEngineer
롤을 생성합니다. Performing Self Service Tasks with Oracle Identity Governance의 Creating Roles를 참조하십시오.OrclOIRIRoleEngineer
롤을 가진 사용자만 OIRI 애플리케이션에 로그인할 수 있습니다. -
OIRI 서비스 계정 사용자를 생성합니다.
OIG에서 서비스 간 인증을 처리하고 OIRI와 OIG에 역할을 게시하기 위한 서비스 계정을 생성합니다.
다음 기능을 사용하여 관리 역할을 만듭니다.
- 사용자 - 보기/검색
- 역할 - 생성
- 액세스 정책 - 생성
Scope of Control
및Organization
를Top
로 사용하여 이 롤을 생성합니다.OIRIServiceAccountUser
사용자를 만들고 관리 역할을 지정합니다.OIG에서 관리 역할 생성에 대한 자세한 내용은 Creating an Admin Role in Performing Self Service Tasks with Oracle Identity Governance를 참조하십시오.
OIRI 이미지 설치
OIRI 서비스는 다음과 같이 4개의 이미지로 구성됩니다.
oiri
: oiri 서비스oiri-cli
: 명령줄 인터페이스oiri-ding
: 데이터 수집oiri-ui
: 사용자 인터페이스
다음 두 소스 중 하나에서 이미지를 다운로드할 수 있습니다.
- Oracle Software Delivery Cloud
- Oracle Container 레지스트리
My Oracle Support에서 OIRI 이미지 설치
-
My Oracle Support에 로그인합니다.
-
지원 노트 Oracle Identity and Access Management의 컨테이너 이미지 및 Oracle IDM Microservices(문서 ID 2723908.1)를 찾아 OIRI의 최신 패치를 식별합니다. 패치 파일을 다운로드하고 내용을 추출합니다.
Archive: <patch>.zip inflating: oiri-12.2.1.4.<TAG>/oiri-12.2.1.4.<TAG>.tar inflating: oiri-12.2.1.4.<TAG>/oiri-cli-12.2.1.4.<TAG>.tar inflating: oiri-12.2.1.4.<TAG>/oiri-ding-12.2.1.4.<TAG>.tar inflating: oiri-12.2.1.4.<TAG>/oiri-ui-12.2.1.4.<TAG>.tar
-
zip 파일에서 생성된 파일로 이동합니다.
cd oiri-12.2.1.4.<TAG>
-
각 tar 파일을 로컬 저장소에 로드합니다.
docker load --input oiri-12.2.1.4.<TAG>.tar docker load --input oiri-ui-12.2.1.4.<TAG>.tar docker load --input oiri-ding-12.2.1.4.<TAG>.tar docker load --input oiri-cli-12.2.1.4.<TAG>.tar
-
다음 명령을 사용하여 이미지가 로드되었는지 확인합니다.
docker images | grep 12.2.1.4.<TAG>
출력은 다음과 유사해야 합니다.
oiri-ui 12.2.1.4.<TAG> c88384a36914 20 hours ago 568MB oiri-ding 12.2.1.4.<TAG> 8a733b055959 20 hours ago 1.23GB oiri-cli 12.2.1.4.<TAG> 58d75bf93160 20 hours ago 618MB oiri 12.2.1.4.<TAG> 874276068356 20 hours ago 577MB
Oracle Container Registry에서 OIRI 이미지 설치
Oracle Container Registry에서 이미지를 설치할 때 처음에 oiri-cli
이미지만 다운로드합니다. 다른 이미지는 배치 스크립트에 필요한 대로 호출됩니다.
주: OIRI의 기본 릴리스만 현재 Oracle Container Registry에서 사용할 수 있습니다. 최신 릴리스를 보려면 My Oracle Support에서 다운로드하십시오.
-
oiri-cli
이미지를 다운로드합니다.브라우저에서 Oracle Container Registry로 이동합니다.
로그인을 누르고 사용자 이름과 비밀번호를 사용하여 로그인합니다.
조건 상자에서 언어를 영어로 선택합니다. 계속 및 "조건 및 제한"을 누릅니다.
Docker 환경에서 Oracle Container Registry에 로그인하고 다음 메시지가 표시되면 Oracle SSO 사용자 이름과 비밀번호를 입력합니다.
docker login container-registry.oracle.com
oiri-cli
이미지를 당깁니다.docker pull container-registry.oracle.com/middleware/oiri-cli-12.2.1.4.<TAG>
-
설치를 확인합니다.
docker images
명령을 실행하여 이미지가 저장소에 설치되었음을 표시합니다.docker images | grep oiri
이제 OIRI Docker 이미지가 성공적으로 설치되었고 구성할 준비가 되었습니다.
디렉토리 생성
Kubernetes 클러스터의 OIRI 배포에 수많은 디렉토리가 필요합니다. NFS 마운트 지점은 데이터 입수 및 oiri에 필요하며, 로컬 디렉토리는 OIRI Helm 차트에서 사용되는 values.yaml
을 생성하도록 설정되어야 합니다. 다음과 유사한 디렉토리를 생성합니다.
-
디렉토리를 생성합니다.
mkdir /nfs/ding
mkdir /nfs/oiri
mkdir -p /local/k8s/
-
권한을 설정합니다.
이러한 각 디렉토리에 대해 쓰기 권한이 부여되었는지 확인합니다.
chmod 775 /nfs/ding /nfs/oiri /local/k8s/
oiri-cli
컨테이너 실행
-
다음 명령을 사용하여
oiri-cli
컨테이너를 실행합니다.docker run -d --name oiri-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ --group-add <group id> \ oiri-cli-12.2.1.4.<TAG> \ tail -f /dev/null
주:
<group id>
는 볼륨에 액세스할 수 있는 호스트의 그룹 ID입니다.출력은 다음과 유사합니다.
docker run -d --name oiri-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ --group-add <group id> \ oiri-cli-12.2.1.4.<TAG> \ tail -f /dev/null 430d5f4af68d87be3123fbdd77d53fb13b2b961e41243d69a3c1f367df514a84
다음 명령을 사용하여 컨테이너가 실행 중인지 확인합니다.
docker ps -a | grep oiri
출력은 다음과 유사합니다.
430d5f4af68d oiri-cli-12.2.1.4.<TAG> "tail -f /dev/null" About a minute ago Up About a minute oiri-cli
Kubernetes 구성에 대한 컨테이너 액세스 구성
-
OIRI 및 DING에 대한 네임스페이스를 생성합니다.
kubectl create namespace oirins namespace/oirins created kubectl create namespace dingns namespace/dingns created
-
다음 내용으로
oiri-service-account.yaml
를 생성합니다.을 OIRI 네임스페이스로 바꾸고 를 DING 네임스페이스로 바꿉니다. apiVersion: v1kind: ServiceAccountmetadata: name: oiri-service-account namespace: <OIRINS>---apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata: name: oiri-ns-role namespace: <OIRINS>rules:- apiGroups: ["*"] resources: ["*"] verbs: ["*"]---apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata: name: ding-ns-role namespace: <DINGNS>rules:- apiGroups: ["*"] resources: ["*"] verbs: ["*"]---kind: ClusterRoleapiVersion: rbac.authorization.k8s.io/v1metadata: name: oiri-ingress-nginx-clusterrolerules:- apiGroups: [""] resources: ["configmaps", "endpoints", "nodes", "pods", "secrets"] verbs: ["watch", "list"]- apiGroups: [""] resourceNames: ["<OIRINS>"] resources: ["namespaces"] verbs: ["get"]- apiGroups: [""] resources: ["nodes"] verbs: ["get"]- apiGroups: [""] resources: ["services"] verbs: ["get", "list", "watch"]- apiGroups: [""] resources: ["events"] verbs: ["create", "patch"]- apiGroups: ["extensions"] resources: ["ingresses"] verbs: ["get", "list", "watch"]- apiGroups: ["extensions"] resources: ["ingresses/status"] verbs: ["update"]- apiGroups: ["networking.k8s.io"] resources: ["ingresses/status"] verbs: ["update"]- apiGroups: ["networking.k8s.io"] resources: ["ingresses", "ingressclasses"] verbs: ["get", "list", "watch"]---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: oiri-ingress-nginx-clusterrolebinding-<OIRINS>roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: oiri-ingress-nginx-clusterrolesubjects:- namespace: <OIRINS> kind: ServiceAccount name: oiri-service-account---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: oiri-clusterrolebinding-<OIRINS>roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: system:persistent-volume-provisionersubjects:- namespace: <OIRINS> kind: ServiceAccount name: oiri-service-account---apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata: name: oiri-rolebinding namespace: <OIRINS>roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: oiri-ns-rolesubjects:- namespace: <OIRINS> kind: ServiceAccount name: oiri-service-account---apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata: name: ding-rolebinding namespace: <DINGNS>roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: ding-ns-rolesubjects:- namespace: <OIRINS> kind: ServiceAccount name: oiri-service-account
-
다음
kubectl
명령을 Kubernetes 클러스터 관리자로 실행하십시오.를 해당되는 경우 OIRI 네임스페이스로 바꿉니다. kubectl apply -f oiri-service-account.yaml TOKENNAME=`kubectl -n <OIRINS> get serviceaccount/oiri-service-account -o jsonpath='{.secrets[0].name}'` TOKEN=`kubectl -n <OIRINS> get secret $TOKENNAME -o jsonpath='{.data.token}'| base64 --decode` kubectl -n <OIRINS> get secret $TOKENNAME -o jsonpath='{.data.ca\.crt}'| base64 --decode > ca.crt
-
ca.crt
를 Kubernetes 로컬 디렉토리에 복사하고 5.c 단계에서 생성한TOKEN
을 나열하여ca.crt
및TOKEN
을 OIRI 설치 관리자에게 공유합니다.cp ca.crt /local/k8s echo $TOKEN eyJhbGciOiJSUzI1NiIsImtpZCI6ImpBSjd3d0puUDBPUlpxbWY2anBRclY4WElweFNka0dGSU4zQmF4ZmxhMTgifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJvaXJpbnMiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoib2lyaS1zZXJ2aWNlLWFjY291bnQtdG9rZW4tYjU3bTQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoib2lyaS1zZXJ2aWNlLWFjY291bnQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiIxMjU3Y2MwMy0zZGQ3LTQzZTMtODdkYi04ZGExZjM3NTllNjAiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6b2lyaW5zOm9pcmktc2VydmljZS1hY2NvdW50In0.Y8n5DPIyqrFOzRo5dtzaNdinQtwQov0RAdNbWb_DBpo1UATrHl72Re2-C7afcP-Jc19JlxS1I3CuyOAGO4-gqSa1fwK-ahNqbhHBoRKPj3o-j8fsbDEkhp_zJOxWBMBE7JgxufzJ_24LtlO6RGafcuiBdZ0vxyxVcEsPHAbNGSiMf_zO36530f6VmURy2MdzoF3fASN5hdiRnT3-7VSxF-Am7BQJnzYXhftMe7lOUW3st1WGeRi3R6dOAj3ibKvXgoA90MUearn1ibXWVkgqjuaoiMvnQQc0bopBLOsAY-s1ZGnwyYP92ulFaXdvYdyDxWXPPg4Tvjxh7gEhw-iTjg
-
oiri-cli
컨테이너에 연결하고 다음 명령을 실행합니다.접속:
docker exec -it oiri-cli bash
실행:
touch /app/k8s/config export KUBECONFIG=/app/k8s/config kubectl config set-cluster oiri-cluster --server=https://<IPAddressofK8SPrimaryNode>:6443 --certificate-authority=/app/k8s/ca.crt --embed-certs=true export TOKEN=<Token-Shared-by-Kuberetes-Admin> kubectl config set-credentials oiri-service-account --token=$TOKEN kubectl config set-context oiri --user=oiri-service-account --cluster=oiri-cluster kubectl config use-context oiri exit
구성 파일 초기화
다음 명령을 사용하여 OIRI에 대한 초기 구성을 설정합니다.
주: 모든 매개변수에 대한 자세한 내용은 Oracle Identity Role Intelligence 관리 설명서에서 확인할 수 있습니다.
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
구성 스크립트
setupConfFiles.sh
에 대한 도움말을 확인합니다. 다음 명령을 실행하여 이 스크립트에 사용 가능한 옵션을 볼 수 있습니다../setupConfFiles.sh -h
-
setupConfFile.sh
스크립트를 호출하여 구성 파일 설정을 실행합니다../setupConfFiles.sh -m prod \ --oigdbhost {OIG_DB_HOST} \ --oigdbport {OIG_DB_PORT} \ --oigdbsname {OIG_DB_SERVICE_NAME} \ --oiridbhost {OIRI_DB_HOST} \ --oiridbport {OIRI_DB_PORT} \ --oiridbsname {OIRI_DB_SERVICE} \ --useflatfileforetl true \ --sparkmode {SPARK_MODE} \ --dingnamespace {DING_NAMESPACE} \ --dingimage {DING_IMAGE} \ --imagepullsecret {IMAGE_PULL_SECRET} \ --k8scertificatefilename {KUBERNETES_CERTIFICATE_FILE_NAME} \ --sparkk8smasterurl {KUBERENETES_MASTER_URL} \ --oigserverurl {OIG_SERVER_URL} \
예:
./setupConfFiles.sh -m prod \ --oigdbhost oighost.example.com \ --oigdbport 1521 \ --oigdbsname oigdb.example.com \ --oiridbhost oirihost.example.com \ --oiridbport 1521 \ --oiridbsname oiridb.example.com \ --useflatfileforetl true \ --sparkmode k8s \ --dingnamespace ding \ --dingimage oiri-ding-12.2.1.4.<TAG> \ --imagepullsecret regcred \ --k8scertificatefilename ca.crt \ --sparkk8smasterurl k8s://https://12.34.56.78:6443 \ --oigserverurl http://oighost.example.com:14000 \
출력은 다음과 유사합니다.
Output: INFO: OIG DB as source for ETL is true INFO: Setting up /app/data/conf/config.yaml INFO: Setting up /app/data/conf/data-ingestion-config.yaml INFO: Setting up /app/data/conf/custom-attributes.yaml INFO: Setting up /app/oiri/data/conf/application.yaml INFO: Setting up /app/oiri/data/conf/authenticationConf.yaml INFO: Setting up /app/data/conf/dbconfig.yaml
주:
--sparkk8smasterurl
는 내부적으로 사용되는 URL이며 호스트 이름 대신 IP 주소를 사용해야 합니다. 그렇지 않으면 데이터 수집을 실행할 때 오류가 표시됩니다. -
파일이 만들어졌는지 확인합니다.
/app/data/conf
디렉토리를 확인합니다.ls /app/data/conf/
출력은 다음과 같아야 합니다.
config.yaml custom-attributes.yaml data-ingestion-config.yaml dbconfig.yaml
/app/oiri/data/conf
디렉토리를 확인합니다.ls /app/oiri/data/conf
출력은 다음과 같아야 합니다.
application.yaml authenticationConf.yaml
Helm 차트 매개변수 설정
다음 명령을 사용하여 Helm 차트에 대한 구성을 설정합니다.
주: 모든 매개변수에 대한 자세한 내용은 Oracle Identity Role Intelligence 관리 설명서에서 확인할 수 있습니다.
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
values.yaml
설정을 실행합니다../setupValuesYaml.sh \ --oiriapiimage {OIRI_API_IMAGE} \ --oirinfsserver {OIRI_NFS_SERVER} \ --oirinfsstoragepath {OIRI_NFS_PATH} \ --oirinfsstoragecapacity {OIRI_NFS_STORAGE_CAPACITY} \ --oiriuiimage {OIRI_UI_IMAGE} \ --dingimage {DING_IMAGE} \ --dingnfsserver {OIRI_NFS_SERVER} \ --dingnfsstoragepath {DING_NFS_STORAGE_PATH} \ --dingnfsstoragecapacity {DING_NFS_STORAGE_CAPACITY} \ --ingresshostname {INGRESS_HOSTNAME} \ --sslsecretname "{SSL_SECRET_NAME}"
예:
./setupValuesYaml.sh \ --oiriapiimage oiri-12.2.1.4.<TAG> \ --oirinfsserver oirihost.example.com \ --oirinfsstoragepath /nfs/oiri \ --oirinfsstoragecapacity 10Gi \ --oiriuiimage oiri-ui-12.2.1.4.<TAG> \ --dingimage oiri-ding-12.2.1.4.<TAG> \ --dingnfsserver oirihost.example.com \ --dingnfsstoragepath /nfs/ding \ --dingnfsstoragecapacity 10Gi \ --ingresshostname oirihost.example.com \ --sslsecretname "oiri-tls-cert"
-
values.yaml
파일이 생성되었는지 확인합니다.ls /app/k8s/
출력은 다음과 같아야 합니다.
values.yaml
-
컨테이너 종료
키 저장소 생성
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
keytool
를 사용하여 키 저장소를 생성합니다.keytool -genkeypair \ -alias <OIRI_JWT_KEY_ALIAS> \ -keypass <OIRI_KEYSTORE_PASSWORD> \ -keyalg RSA \ -keystore /app/oiri/data/keystore/keystore.jks \ -storetype pkcs12 \ -storepass <password>
예:
keytool -genkeypair -alias oii -keypass <password> -keyalg RSA -keystore /app/oiri/data/keystore/keystore.jks -storepass <password> -storetype pkcs12 What is your first and last name? [Unknown]: oiri.example.com What is the name of your organizational unit? [Unknown]: oiri What is the name of your organization? [Unknown]: example.com What is the name of your City or Locality? [Unknown]: Cambridge What is the name of your State or Province? [Unknown]: Massachusetts What is the two-letter country code for this unit? [Unknown]: US Is CN= oiri.example.com, OU=oiri, O=example.com, L=Cambridge, ST=Massachusetts, C=US correct? [no]: yes
-
컨테이너를 종료합니다.
-
서명 확인을 위해 Oracle Identity Governance Server 인증서를 익스포트합니다.
기본 OIG 키 저장소에서 Oracle Identity Governance Server 서버 인증서를 익스포트한 다음
/nfs/oiri/data/keystore
에 복사합니다.주: 기본 OIG 키 저장소는
OIG_ORACLE_HOME/user_projects/domains/base_domain/config/fmwconfig
에 있습니다.cd OIG_ORACLE_HOME/user_projects/domains/base_domain/config/fmwconfig
keytool -export -rfc -alias xell -file xell.pem -keystore default-keystore.jks
파일을 OIRI 키 저장소 디렉토리에 복사합니다.
cp xell.pem /nfs/oiri/data/keystore
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
인증서를 키 저장소로 임포트합니다.
keytool -import \ -alias xell \ -file /app/oiri/data/keystore/xell.pem \ -keystore /app/oiri/data/keystore/keystore.jks
전자 지갑 생성
-
OIRI 컨테이너에 연결합니다.
docker exec -it oiri-cli bash
-
oiri-cli
를 사용하여 Wallet을 생성합니다.oiri-cli --config=/app/data/conf/config.yaml wallet create
프롬프트가 표시되면 다음 매개변수를 제공합니다.
- OIRI 데이터베이스 UserName 및 비밀번호
- OIG 데이터베이스 UserName 및 비밀번호
- OIG 서비스 계정 UserName 및 비밀번호(이 자습서에서 이전에 생성한
OIRIServiceAccountUser
) - OIRI KeyStore 비밀번호
- OIRI JWT 키 별칭 및 비밀번호
출력은 다음과 유사합니다.
####### #### ######## #### ###### ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ## ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### #### ## ## #### ###### ######## #### Setting up wallet in [/app/data/wallet] DING Wallet created. Setting up wallet in [/app/oiri/data/wallet] OIRI Wallet created.
-
OIRI 및 DING 전자 지갑이 생성되었는지 확인합니다.
ls /app/data/wallet
출력은 다음과 같아야 합니다.
Output: cwallet.sso cwallet.sso.lck
ls /app/oiri/data/wallet
출력은 다음과 같아야 합니다.
Output: cwallet.sso cwallet.sso.lck
OIRI 데이터베이스 사용자 생성 및 시드
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
oiri-cli
를 사용하여 DB 유저를 생성합니다.oiri-cli --config=/app/data/conf/config.yaml schema create /app/data/conf/dbconfig.yaml
프롬프트가 표시되면 다음 매개변수를 제공합니다.
- SYS 비밀번호
출력은 다음과 유사합니다.
####### #### ######## #### ###### ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ## ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### #### ## ## #### ###### ######## #### Creating the schema ci_oiri CREATING OIRI SCHEMA ............ =================================================== DB USER ci_oiri has been successfully created
-
oiri-cli
를 사용하여 스키마를 시드합니다.oiri-cli --config=/app/data/conf/config.yaml schema migrate /app/data/conf/dbconfig.yaml
출력은 다음과 유사합니다.
####### #### ######## #### ###### ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ## ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### #### ## ## #### ###### ######## #### Migrating the OIRI schema Migrating OIRI SCHEMA ............ =================================================== ..... OIRI Schema has been successfully migrated
전자 지갑 및 DB 연결 확인
-
OIRI 컨테이너에 연결합니다.
docker exec -it oiri-cli bash
-
verifyWallet.sh
를 사용하여 Wallet을 확인합니다../verifyWallet.sh
출력은 다음과 유사합니다.
####### #### ######## #### ###### ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ## ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### #### ## ## #### ###### ######## #### Verifying Wallets. Wallet locations and entries will be validated DING Wallet is Valid. OIRI Wallet is Valid. OIRI DB Connection is Valid. OIG DB Connection is Valid. KeyStore location and entries are Valid. OIG Server Connection is Valid. SUCCESS: Wallet locations and entries are valid.
OIRI Helm 차트 설치
-
oiri 및 Ding 이름 공간에 대한 이미지 당기기 암호를 만듭니다.
kubectl create secret docker-registry regcred --docker-server=<registry_server_url> --docker-username=<registry_user> --docker-password=<registry_password> -n <oirins> kubectl create secret docker-registry regcred --docker-server=<registry_server_url> --docker-username=<registry_user> --docker-password=<registry_password> -n <dingns>
-
선택적으로
setupValuesYaml.sh
를 실행할 때-ssl
/--sslenabled
을true
로 선택한 경우 SSL 인증서를 설정하고 인증서에 대한 Kubernetes 암호를 생성합니다.openssl
유틸리티를 사용하여 인증서를 만듭니다.openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=<HOSTNAME>"
예:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=oiri.example.com" Generating a 2048 bit RSA private key ..+++ ............................+++ writing new private key to 'tls.key' -----
주: 이전 단계에서 생성한 인증서는 자체 서명되어 있으므로 운용 환경에서 사용하면 안됩니다. 프로덕션에서 다음 단계에 설명된
create secret
명령에 유효한 인증서와 키를 제공합니다.oiri-cli
컨테이너에 연결하고 이전 단계에서 생성한 인증서가 포함된 Kubernetes 암호를 생성합니다.docker exec -it oiri-cli bash
kubectl create secret tls oiri-tls-cert --key="tls.key" --cert="tls.crt"
출력은 다음과 같아야 합니다.
secret/oiri-tls-cert created
-
OIRI Helm 차트 설치
helm install oiri /helm/oiri -f /app/k8s/values.yaml -n <oirinamespace>
출력은 다음과 유사합니다.
NAME: oiri LAST DEPLOYED: Wed Apr 28 05:05:05 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Please be patient while the chart installs. Pod may not be in running status. To check the status of the pod, run following command. Pods READY state must be 1/1 and status RUNNING kubectl get pods --namespace oiri kubectl get pods --namespace ding Access OIRI UI by using following URL in your browser. https://100.94.12.189:30305/oiri/ui/v1/console Admins can access DING History Server by port forwarding the ding-history pod through kubectl. kubectl port-forward <pod_name> <desired_port>:18080 -n ding Inside the DING-CLI, use following commands to start data ingestion ding-cli --config=/app/data/conf/config.yaml data-ingestion start /app/data/conf/data-ingestion-config.yaml`
설치 확인
OIRI Pods가 성공적으로 시작되었는지 확인하여 설치를 확인합니다. POD가 실행되면 OIRI UI에 로그인합니다.
-
OIRI Pods가 성공적으로 시작되었는지 확인합니다.
kubectl get pods --namespace oiri
출력은 다음과 유사해야 합니다.
NAME READY STATUS RESTARTS AGE oiri-549d5458fb-v6vjk 1/1 Running 0 2d22h oiri-ui-7894b5b4b7-28klj 1/1 Running 0 2d22h
kubectl get pods --namespace ding
출력은 다음과 유사해야 합니다.
NAME READY STATUS RESTARTS AGE spark-history-server-85689d9545-svtvd 1/1 Running 0 2d22h
-
브라우저에서 다음 URL을 사용하여 OIRI UI에 액세스합니다.
https://oirihost.example.com/oiri/ui/v1/console
처음에는 OIRI UI 로그인 화면이 표시됩니다.
인증된 OIG 유저로 로그인합니다.
OIRI 기본 화면은 다음과 같이 표시되어야 합니다.
OIRI 이미지 업그레이드
OIRI 이미지의 새 빌드가 해제되면 컨테이너를 업그레이드해야 할 수 있습니다. 이렇게 하려면 다음 단계를 완료해야 합니다.
-
기존
oiri-cli
컨테이너를 제거합니다.호스트에서 다음을 수행합니다.
docker rm -f oiri-cli
-
새 이미지를 사용하여
oiri-cli
컨테이너를 생성합니다.호스트에서 다음을 수행합니다.
docker run -d --name oiri-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ {OIRI_CLI_NEW_IMAGE} \ tail -f /dev/null
출력은 다음과 유사합니다.
docker run -d --name oiri-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ oiri-cli-12.2.1.4.<TAG> \ tail -f /dev/null c78e8964d8d5445028b0b0aa4740f9fd980cbdaa5e31cd11085ac05da0d6a4a0
-
기존
ding-cli
컨테이너를 제거합니다.호스트에서 다음을 수행합니다.
docker rm -f ding-cli
-
새 이미지를 사용하여
ding-cli
컨테이너를 생성합니다.호스트에서 다음을 수행합니다.
docker run -d --name ding-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ {DING_CLI_NEW_IMAGE} \ tail -f /dev/null
출력은 다음과 유사합니다.
docker run -d --name ding-cli \ -v /nfs/ding/:/app/ \ -v /nfs/oiri/:/app/oiri \ -v /local/k8s/:/app/k8s \ oiri-ding-12.2.1.4.<TAG> tail -f /dev/null d47b534711ff4d27556ef57c0bd7a9ef3f9d0b12fb9f276bd053e85810374e7b
-
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
-
최신 이미지로 OIRI 구성을 업데이트합니다.
oiri-cli
컨테이너에서 다음 명령을 실행합니다../updateValuesYaml.sh \ --oiriapiimage {OIRI_NEW_IMAGE} \ --oiriuiimage {OIRI_UI_NEW_IMAGE} \ --dingimage {DING_NEW_IMAGE} ./updateConfig.sh \ --dingimage {DING_NEW_IMAGE}
출력은 다음과 유사합니다.
./updateValuesYaml.sh \ --oiriapiimage oiri-12.2.1.4.<TAG> \ --oiriuiimage oiri-ui-12.2.1.4.<TAG>:<tag> \ --dingimage oiri-ding-12.2.1.4.<TAG> INFO: Setting up /app/k8s/values.yaml ./updateConfig.sh \ --dingimage oiri/oiri-ding:<tag> INFO: Setting up /app/data/conf/config.yaml INFO: Setting up /app/data/conf/data-ingestion-config.yaml INFO: Setting up /app/data/conf/custom-attributes.yaml INFO: Setting up /app/oiri/data/conf/application.yaml INFO: Setting up /app/oiri/data/conf/authenticationConf.yaml INFO: Setting up /app/data/conf/dbconfig.yaml
-
스키마를 새 이미지로 업그레이드합니다.
oiri-cli --config=/app/data/conf/config.yaml schema migrate /app/data/conf/dbconfig.yaml
출력은 다음과 유사해야 합니다.
####### #### ######## #### ###### ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ## ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### #### ## ## #### ###### ######## #### Migrating the OIRI schema Migrating OIRI SCHEMA ............ =================================================== ========== Before Migrate ============= Script:V1__RoleMining.sql Installed On:2021-04-14 15:25:56.075212 State:SUCCESS Version:1 Description:RoleMining ========== After Migrate ============= Script:V1__RoleMining.sql Installed On:2021-04-14 15:25:56.075212 State:SUCCESS Version:1 Description:RoleMining OIRI Schema has been successfully migrated
-
Helm 차트를 업그레이드하여 새 이미지를 반영합니다.
helm upgrade oiri /helm/oiri -f /app/k8s/values.yaml
출력은 다음과 유사합니다.
helm upgrade oiri /helm/oiri -f /app/k8s/values.yaml Release "oiri" has been upgraded. Happy Helming! NAME: oiri LAST DEPLOYED: Mon Apr 26 16:51:58 2021 NAMESPACE: default STATUS: deployed REVISION: 4 TEST SUITE: None NOTES: Please be patient while the chart installs. Pod may not be in running status. To check the status of the pod, run following command. Pods READY state must be 1/1 and status RUNNING kubectl get pods --namespace oiri kubectl get pods --namespace ding Access OIRI UI by using following URL in your browser. https://den01evo.us.oracle.com:30305/oiri/ui/v1/console Admins can access DING History Server by port forwarding the ding-history pod through kubectl. kubectl port-forward <pod_name> <desired_port>:18080 -n ding Inside the DING-CLI, use following commands to start data ingestion ding-cli --config=/app/data/conf/config.yaml data-ingestion start /app/data/conf/data-ingestion-config.yaml
-
Pod가 실행 중이고 올바른 이미지를 사용하고 있는지 확인합니다.
OIRI Pods가 실행 중인지 확인합니다.
kubectl get pods --namespace oiri
출력은 다음과 유사해야 합니다.
NAME READY STATUS RESTARTS AGE oiri-677c96f67f-p6q8j 1/1 Running 0 41m oiri-ui-f5c4df54-hrwsm 1/1 Running 0 41m
각 Pod에 대해
Image:
값을 확인합니다. 예를 들면 다음과 같습니다.kubectl describe pod oiri-677c96f67f-p6q8j -n oiri | grep Image:
출력은 다음과 유사해야 합니다.
Image: oiri-12.2.1.4.<TAG>
kubectl describe pod oiri-ui-f5c4df54-hrwsm -n oiri | grep Image:
출력은 다음과 유사해야 합니다.
Image: oiri-ui-12.2.1.4.<TAG>
주: 출력에 나열된
<tag>
은 업그레이드한 최신 이미지의<tag>
과 일치해야 합니다.DING Pod에 대해 동일한 작업을 수행합니다. 예를 들면 다음과 같습니다.
kubectl get pods --namespace ding NAME READY STATUS RESTARTS AGE oiri-ding-8337ee78f9845138-driver 0/1 Completed 0 4d5h oiri-ding-baa5ce78fa1f4b2f-driver 0/1 Completed 0 4d2h oiri-ding-c9a54178fecedd1a-driver 0/1 Completed 0 3d4h spark-history-server-684dc84b66-jbmkg 1/1 Running 0 60m kubectl describe pod spark-history-server-684dc84b66-jbmkg -n ding | grep Image: Image: oiri-ding-12.2.1.4.<TAG>
OIRI 제거
OIRI를 제거하려면 다음과 같은 작업을 수행해야 합니다.
-
Helm 차트를 삭제합니다.
oiri-cli
컨테이너에 연결합니다.docker exec -it oiri-cli bash
OIRI Helm 차트를 삭제합니다.
helm delete oiri
-
Kubernetes 네임스페이스 삭제.
oiri-cli
컨테이너에 연결된 다음 명령을 실행합니다.kubectl delete namespace oiri kubectl delete namespace ding
-
OIRI 및 DING 컨테이너를 제거합니다.
컨테이너를 종료하고 호스트에서 다음을 실행합니다.
docker rm -f oiri-cli docker rm -f ding-cli
-
다른 구성 요소 제거
OIRI 설치를 지원하기 위해 만든 다른 모든 구성 요소를 제거합니다. 예를 들면 다음과 같습니다.
- OIRI 스키마 또는 데이터베이스
- 로컬 디렉토리
- NFS 디렉토리
관련 링크
추가 리소스에 대한 링크를 제공합니다. 이 섹션은 선택사항입니다. 필요하지 않은 경우 삭제하십시오.
- https://docs-uat.us.oracle.com/en/middleware/idm/identity-role-intelligence/amiri/index.html
- ID 감사 활성화
감사의 글
- Authors - Mike Howlett
- 기여자 - Anup Gautam, Gaurav Kumar, Rishi Agarwal, Tanmay Garg
제품 설명서는 Oracle Help Center를 참조하십시오.
추가 학습 자원
docs.oracle.com/learn에서 다른 실습을 찾아보거나 Oracle Learning YouTube channel에서 무료 학습 콘텐츠에 액세스할 수 있습니다. 또한 education.oracle.com/learning-explorer를 방문하여 Oracle Learning Explorer로 변경하십시오.
제품 설명서는 Oracle Help Center를 참조하십시오.
Deploy Oracle Identity Role Intelligence on Kubernetes
F50986-01
November 2021
Copyright © 2021, Oracle and/or its affiliates.