업그레이드 IBM Software Hub ( 5.1 버전에서 5.3 버전으로 업그레이드)
인스턴스를 IBM Software Hub업그레이드하려면 해당 인스턴스에 필요한 연산자와 사용자 지정 리소스의 등급을 지정해야 합니다.
- 업그레이드 단계
클라이언트 워크스테이션 업데이트
필요한 정보 수집
제한된 네트워크에서 업그레이드 실행 준비
사설 컨테이너 레지스트리에서 업그레이드 실행 준비
필수 소프트웨어 업그레이드
공유 클러스터 구성 요소 업그레이드
인스턴스 업그레이드 준비
인스턴스 업그레이드
- 누가 이 작업을 완료해야 합니까?
인스턴스 관리자 인스턴스 관리자가 이 작업을 완료할 수 있습니다.
- 이 작업을 언제까지 완료해야 합니까?
필요에 따라 반복하십시오. 클러스터에 여러 IBM Software Hub 인스턴스가 있는 경우, 업그레이드하려는 각 인스턴스에 대해 이 작업을 완료하십시오.
시작하기 전에
또한, 이 작업의 명령어를 실행하기 전에 환경 변수를 반드시 로드해야 합니다.
- 서비스별 필수 사전 작업
이 인스턴스에서 다음 서비스 중 IBM Software Hub 하나라도 사용 중인 경우, 업그레이드 전에 필수 단계를 IBM Software Hub 완료하십시오:
watsonx Assistant
소유권을 이전하십시오
watsonx Code Assistant Red Hat 용 Ansible Lightspeed
다음
ibm-granite-3b-code-v1ibm-granite-20b-code-8k-ansibleInferenceService객체를 삭제하십시오:oc delete isvc ibm-granite-3b-code-v1 ibm-granite-20b-code-8k-ansible \ -n ${PROJECT_CPD_INST_OPERANDS} \ --ignore-not-found
- Common core services
업그레이드하기 전에 IBM Software Hub, 다음 포드들이 이 인스턴스에서 실행 중인지 IBM Software Hub확인하십시오:
- 글로벌 검색 포드가 실행 중인지 확인하십시오:
oc get pods --namespace=${PROJECT_CPD_INST_OPERANDS} | grep elasticsea-0ac3- 명령어가 빈 응답을 반환하면 다음 단계로 진행하십시오.
- 명령어가 포드 목록을 반환하는 경우, 업그레이드 중 문제가 발생할 수 있는 구성이 있는지 확인하려면 '글로벌 검색이 잘못 구성되었을 때 업그레이드 실패' 항목을 검토하십시오.
- 포드가
catalog-api실행 중인지 확인하십시오:oc get pods --namespace=${PROJECT_CPD_INST_OPERANDS} | grep catalog-api- 명령어가 빈 응답을 반환하면 업그레이드할 준비가 된 IBM Software Hub 것입니다.
- 명령어가 포드 목록을 반환하는 경우, 업그레이드 중 서비스
catalog-api중단 시간을 확인하려면 다음 지침을 참조하십시오.
5.3 버전으로 common core servicesIBM Software Hub 업그레이드할 때, 서비스의
catalog-api기본 저장소가 로 PostgreSQL마이그레이션됩니다.마이그레이션의 최종 단계 동안 해당
catalog-api서비스는 오프라인 상태이며, 이 서비스에 종속된 서비스들은 사용할 수 없습니다. 마이그레이션 소요 시간은 인스턴스에 저장된 자산 및 관계의 수에 따라 달라집니다. 중단 시간은 인스턴스에 있는 데이터베이스(프로젝트, 카탈로그 및 공간)의 수에 따라 달라집니다. 일반적인 업그레이드 시나리오에서는 중단 시간이 전체 마이그레이션 시간보다 상당히 짧아야 합니다.이동될 데이터베이스의 수를 결정하기 위해:
- 환경
INSTANCE_URL변수를 다음의 IBM Software HubURL 로 설정하십시오:export INSTANCE_URL=<URL>팁: 웹 클라이언트의 URL 를 확인하려면 다음 명령을 실행하세요:cpd-cli manage get-cpd-instance-details \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} - 다음에 대한 자격 증명을
wdp-service획득하십시오:TOKEN=$(oc get -n ${PROJECT_CPD_INST_OPERANDS} secrets wdp-service-id -o yaml | grep service-id-credentials | cut -d':' -f2- | sed -e 's/ //g' | base64 -d) - 인스턴스 내 카탈로그 수 확인:
curl -sk -X GET "https://${INSTANCE_URL}/v2/catalogs?limit=10001&skip=0&include=catalogs&bss_account_id=999" -H 'accept: application/json' -H "Authorization: Basic ${TOKEN}" | jq -r '.catalogs | length' - 인스턴스의 프로젝트 수를 가져옵니다:
curl -sk -X GET "https://${INSTANCE_URL}/v2/catalogs?limit=10001&skip=0&include=projects&bss_account_id=999" -H 'accept: application/json' -H "Authorization: Basic ${TOKEN}" | jq -r '.catalogs | length' - 인스턴스 내 공백 수를 가져옵니다:
curl -sk -X GET "https://${INSTANCE_URL}/v2/catalogs?limit=10001&skip=0&include=spaces&bss_account_id=999" -H 'accept: application/json' -H "Authorization: Basic ${TOKEN}" | jq -r '.catalogs | length' - 이전 명령어들이 반환한 카탈로그, 프로젝트, 공간의 수를 합산하십시오. 그런 다음 다음 표를 사용하여 마이그레이션 중 서비스가 중단될 대략적인 시간을 확인하십시오:
데이터베이스 마이그레이션으로 인한 중단 시간 (예상) 최대 1,000개의 데이터베이스 6분 1,001 - 10,000개 데이터베이스 20분 10,001 - 70,000 데이터베이스 60분
- 다음 스크립트를 클라이언트 워크스테이션에 파일 이름
precheck_migration.sh: 로 저장하십시오#!/bin/bash # Default ranges for couchdb size SMALL=50 MEDIUM=100 LARGE=200 echo "Performing pre-migration checks" patch_for_small() { echo -e "Run the following command to increase the CPU and memory:\n" cat << EOF oc patch ccs ccs-cr -n ${PROJECT_CPD_INST_OPERANDS} --type merge --patch '{"spec": { "catalog_api_postgres_migration_threads": 4, "catalog_api_migration_job_resources": { "requests": {"cpu": "2", "ephemeral-storage": "10Mi", "memory": "2Gi"}, "limits": {"cpu": "6", "ephemeral-storage": "1Gi", "memory": "6Gi"}} }}' EOF echo echo "The system is ready for migration. Upgrade your cluster as usual." } patch_for_medium() { echo -e "Run the following command to increase the CPU and memory:\n" cat << EOF oc patch ccs ccs-cr -n ${PROJECT_CPD_INST_OPERANDS} --type merge --patch '{"spec": { "catalog_api_postgres_migration_threads": 6, "catalog_api_migration_job_resources": { "requests": {"cpu": "3", "ephemeral-storage": "10Mi", "memory": "4Gi"}, "limits": {"cpu": "8", "ephemeral-storage": "4Gi", "memory": "8Gi"}} }}' EOF echo echo "The system is ready for migration. Upgrade your cluster as usual." } patch_for_large() { echo -e "Run the following command to increase the CPU and memory:\n" cat << EOF oc patch ccs ccs-cr -n ${PROJECT_CPD_INST_OPERANDS} --type merge --patch '{"spec": { "catalog_api_postgres_migration_threads": 8, "catalog_api_migration_job_resources": { "requests": {"cpu": "6", "ephemeral-storage": "10Mi", "memory": "6Gi"}, "limits": {"cpu": "10", "ephemeral-storage": "6Gi", "memory": "10Gi"}} }}' EOF echo echo "Before you can start the upgrade, you must prepare the system for migration." } check_resources(){ scale_config=$1 pvc_size=$(oc get pvc -n ${PROJECT_CPD_INST_OPERANDS} database-storage-wdp-couchdb-0 --no-headers | awk '{print $4}') size=$(awk '{print substr($0, 1, length($0)-2)}' <<< "$pvc_size") if [[ $scale_config == "small" ]];then if [[ "$size" -le "$SMALL" ]];then echo "The system is ready for migration. Upgrade your cluster as usual." elif [ "$size" -ge "$SMALL" ] && [ "$size" -le "$MEDIUM" ];then patch_for_medium elif [ "$size" -ge "$MEDIUM" ] && [ "$size" -le "$LARGE" ];then patch_for_large else patch_for_large fi elif [[ $scale_config == "medium" ]];then if [[ "$size" -le "$SMALL" ]];then patch_for_small elif [ "$size" -ge "$SMALL" ] && [ "$size" -le "$MEDIUM" ];then echo "The system is ready for migration. Upgrade your cluster as usual." elif [ "$size" -ge "$MEDIUM" ] && [ "$size" -le "$LARGE" ];then patch_for_large else patch_for_large fi elif [[ $scale_config == "large" ]];then if [[ "$size" -le "$SMALL" ]];then patch_for_small elif [ "$size" -ge "$SMALL" ] && [ "$size" -le "$MEDIUM" ];then patch_for_medium elif [ "$size" -ge "$MEDIUM" ] && [ "$size" -le "$LARGE" ];then echo "The system is ready for migration. Upgrade your cluster as usual." else patch_for_large fi fi } check_upgrade_case(){ echo -e "Checking if automatic upgrade or semi-automatic upgrade is needed" scale_config=$(oc get ccs -n ${PROJECT_CPD_INST_OPERANDS} ccs-cr -o json | jq -r '.spec.scaleConfig') # Default case, scale config is set to small if [[ -z "${scale_config}" ]];then scale_config=small fi check_resources $scale_config } check_upgrade_case - 실행하여 자동 마이그레이션을 실행할 수 common core services 있는지, 아니면 반자동
precheck_migration.sh마이그레이션을 실행하도록 common core services 구성을 해야 하는지 확인하십시오:
스크립트가 반환한 메시지에 따라 적절한 조치를 취하십시오:./precheck_migration.sh스크립트가 반환한 메시지 마이그레이션 유형 다음에 수행할 작업 The system is ready for migration. Upgrade your cluster as usual. 자동 업그레이드할 준비가 되었습니다 IBM Software Hub. 중요: 환경 내 서비스를 업그레이드한 후에는 서비스catalog-api마이그레이션 완료를 반드시 수행하십시오Run the following command to increase the CPU and memory. 자동 - 스크립트가 반환한 패치 명령어를 실행하십시오.
- 업그레이드 IBM Software Hub.
중요: 환경 내 서비스를 업그레이드한 후에는 서비스catalog-api마이그레이션 완료를 반드시 수행하십시오스크립트는 다음 두 메시지를 모두 반환합니다: - Run the following command to increase the CPU and memory.
- Before you can start the upgrade, you must prepare the system for migration.
반자동 - 스크립트가 반환한 패치 명령어를 실행하십시오.
- 다음 명령어를 실행하여 반자동 마이그레이션을 활성화하십시오:
oc patch ccs ccs-cr \ -n ${PROJECT_CPD_INST_OPERANDS} \ --type merge \ --patch '{"spec": {"use_semi_auto_catalog_api_migration": true}}' - 업그레이드 IBM Software Hub.
중요: 환경 내 서비스를 업그레이드한 후에는 서비스catalog-api마이그레이션 완료를 반드시 수행하십시오
- 글로벌 검색 포드가 실행 중인지 확인하십시오:
이 태스크에 대한 정보
명령어를 cpd-cli
manage
install-components 사용하여 인스턴스에 필요한 연산자와 사용자 지정 IBM Software
Hub 리소스를 업그레이드하십시오.
install-components 명령어에는 옵션이 --run_storage_tests 포함됩니다. 환경의 스토리지가 성능에 대한 최소 요구 사항을 충족하는지 확인하기 위해 해당 --run_storage_tests 옵션을 사용하여 명령을 실행할 것을 강력히 권장합니다.저장 공간이 최소 요구 사항을 충족하지 않는 경우, 옵션을 --run_storage_tests 제거하여 업그레이드를 계속할 수 있습니다. 그러나 저장 장치의 문제로 인해 환경에서 문제가 발생할 가능성이 높습니다.
프로시저
다음에 수행할 작업
이제 업그레이드를 IBM Software Hubcontrol plane 완료하셨으므로, cpdbr 서비스 업데이트( 5.1 버전에서 5.3 버전으로 업그레이드)를 완료할 준비가 되었습니다.
해당 cpdbr 서비스를 사용하지 않는 경우, 업그레이드 안내를 참조하십시오. IBMSoftware Hub 구성 승인 컨트롤러 웹훅 업그레이드 (버전 5.1 에서 버전 5.3 으로 업그레이드)