minikube에 Oracle Blockchain Platform Enterprise Edition 배포

minikube는 테스트 및 내부 개발 목적으로 사용할 수 있습니다. 프로덕션 환경에는 권장되지 않습니다.

필요 조건:
  • CPU: 8 이상
  • 메모리: 16GB
  • 사용 가능한 디스크 공간: 50GB 이상
  • 수퍼 유저 권한을 가진 비루트 사용자
  • 미니큐브 노드가 Oracle Blockchain Platform 인스턴스에 체인코드를 설치하는 데 필요한 인터넷에 액세스할 수 있는지 확인하십시오.
  • minikube v1.33.1 이상

minikube 설치

이 절에서는 테스트된 버전의 minikube 설치에 대한 예제 안내를 제공합니다. 자세한 내용은 Kubernetes 설치 도구를 참조하십시오.

#Download the latest minikube binary
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

#Install
sudo install minikube-linux-amd64 /usr/local/bin/minikube

#Verify Installation
minikube version

#Start Minikube
minikube start

#Verify Minikube Installation
minikube status
#Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

#Install minikube using Homebrew
brew install minikube

#Start minikube
minikube start

#Verify minikube Installation
minikube status

Istio 설치 완료

Oracle Blockchain Platform Enterprise Edition은 버전 1.20.2 이상을 지원합니다. 다음을 완료하기 전에 Install Istio의 단계를 완료해야 합니다.


# Install
    istioctl install --set profile=default --set values.pilot.env.ENABLE_TLS_ON_SIDECAR_INGRESS=true --set components.cni.enabled=true --set values.cni.repair.deletePods="true"
    ## Enter "y" when prompted for "Proceed? (y/N)"
 
# Verify:
    $ istioctl version
    client version: 1.22.1
    control plane version: 1.22.1
    data plane version: 1.22.1 (1 proxies)

Oracle Blockchain Platform Enterprise Edition 설치

minikube 인스턴스에 Oracle Blockchain Platform Enterprise Edition을 다운로드하여 설치하려면 다음을 수행합니다.

  1. Oracle Blockchain Platform Enterprise Edition 페이지에서 다운로드를 누르고 단계에 따라 Oracle Blockchain Platform Enterprise Edition 패키지를 다운로드합니다. 패키지의 압축을 풀고 다운로드한 아카이브 파일에서 패키지의 압축을 풉니다.
    tar -xzf <distribution-package-file>
    # example tar -xzf obpee_package_24.1.3-20240723083137.tgz
  2. 필요한 값으로 runme-input.yaml를 업데이트합니다. 다음은 참조로 사용할 수 있는 runme-input.yaml의 예입니다.
    imageRegistryConfiguration:
      registry: <container_registry_name>
      imageTagPrefix: <container-image-repository-prefix>
      username: <container-registry-username>
     
    imageReleaseVersion: 24.1.3-20240723083137
     
    # storageClassName should be set to create a dynamic persistent volume. If empty, default storageClass is used.
     
    controlPlaneStorage:
      storageClassName: 
      # Example 500Mi, 5Gi
      size: 4Gi
      
    parentDomainName: example.com
    #imagePullTimeout: Use this field to customize the wait time (in seconds) for pulling the required container images from the repository. Default is 1800 seconds.
        imagePullTimeout: 1800
    설명:
    • imageRegistryConfiguration.registry: 사용할 컨테이너 레지스트리 서버입니다. 예: iad.ocir.io
    • imageRegistryConfiguration.imageTagPrefix: 레지스트리가 포함된 컨테이너 기본 저장소 경로로, 이미지를 (풀링)하여 (from)으로 푸시합니다. 예: iad.ocir.io/obpee/bcs
    • imageRegistryConfiguration.username: 컨테이너 레지스트리 로그인 사용자 이름
    • imageReleaseVersion - Oracle Blockchain Platform Enterprise Edition 릴리스 버전
    • controlPlaneStorage.storageClassName: PVC에 사용할 Kubernetes 스토리지 클래스(PersistentVolumeClaim) 비어 있으면 기본 storageClass가 사용됩니다.
    • controlPlaneStorage.size: 블록체인 플랫폼 관리자(제어 플레인) 서비스를 위한 PVC 크기
    • parentDomainName: Blockchain Platform Manager 서비스에 사용할 도메인 이름입니다. 예: example.com
    • imagePullTimeout: Oracle Blockchain Platform Enterprise Edition 설치 중 이미지 풀 대기 시간 초과(초)입니다. 기본값은 1800초입니다.
  3. minikube가 실행 중인지 확인합니다.
  4. 새 터미널 window를 열고 배포 패키지 디렉토리로 이동합니다. runme_minikube.sh를 실행하고 스크립트 출력의 프롬프트에 따라 단계를 수행합니다.
    ./runme_minikube.sh [--publish-image]

    주:

    선택적 --publish-image 명령은 컨테이너를 Oracle Cloud Infrastructure Registry와 같은 컨테이너 이미지 레지스트리에 업로드합니다.
    • 기본 LDAP 관리자 비밀번호(비밀번호가 표시되지 않음): 내장 LDAP 인증 서버에 대한 관리자 사용자의 비밀번호를 설정하는 데 사용됩니다.
    • 기본 제어 플레인 관리 사용자 비밀번호를 입력합니다(비밀번호가 표시되지 않음). 이 비밀번호는 Blockchain Platform Manager 관리 사용자의 비밀번호를 설정하는 데 사용됩니다.
    • StorageClassrunme-input.yaml에 제공되지 않은 경우 시스템에서 기본 스토리지 클래스가 설정되었는지 확인하고 사용할지 여부를 묻습니다.
    • Istio 수신 게이트웨이 서비스 https 포트를 확인합니다. 기본값은 LoadBalancer 서비스 유형에 대해 443입니다.
    • 레지스트리 <registry name> 비밀번호 입력: 이미지 다운로드를 위해 runme-input.yaml에 지정된 대로 컨테이너 이미지 레지스트리에 접속하는 데 사용됩니다.
  5. 다른 터미널 window에서 다음 명령을 실행합니다.
    export KUBECONFIG=/<path_to>/.kube/minikube
  6. 블록체인 플랫폼 관리자 및 인스턴스에 액세스하기 위해 미니큐브 터널이 활성 상태인지 확인합니다.
    minikube tunnel --bind-address 0.0.0.0
  7. 스크립트는 obp-cp 네임스페이스 아래에 아래 서비스를 계속 설치해야 합니다.
    • control-plane
    • openldap
    • obp-auth-server
    • obp-operator
    • hlf-operator
  8. 스크립트는 제어 플레인 UI에 액세스할 수 있는 Blockchain Platform Manager URL을 출력합니다.

블록체인 플랫폼 관리자 액세스

설치 후 생성된 Blockchain Platform Manager 호스트 이름에 대한 호스트 이름 확인을 구성합니다.
  1. 다음 명령을 실행하여 구성된 호스트 이름 목록을 가져옵니다.
    kubectl get virtualservice -n obp-cp -o json | jq -r .items[].spec.hosts[0]
  2. 생성된 호스트 이름에 대한 매핑 IP 주소로 minikube 호스트의 IPv4 주소를 사용합니다.
  3. Blockchain Platform Manager 및 Oracle Blockchain Platform 인스턴스에 액세스하기 위해 미니큐브 터널이 활성 상태인지 확인합니다.