본문 바로가기
WIKI 기술 지식 베이스

Accessing the Migration Console

원문 보기 위키 갱신

출처: 문서

본문

Migration Console 접속하기

Migration Assistant를 통해 배포된 부트스트랩 박스에는 해당 인스턴스를 통해 Migration Console에 접속하는 과정을 간소화해 주는 스크립트가 포함되어 있어요.

Migration Console에 접속하려면 다음 명령을 사용하세요:

export STAGE=dev  # Use the same stage value from your cdk.context.json deployment
export AWS_REGION=us-west-2
/opensearch-migrations/deployment/cdk/opensearch-service-migration/accessContainer.sh migration-console ${STAGE} ${AWS_REGION}

{% include copy.html %}

중요: STAGE 값은 CDK 컨텍스트 구성에서 사용한 stage 파라미터와 일치해야 해요. 예를 들어:

  • "stage": "test"로 배포했다면 export STAGE=test를 사용하세요.
  • "stage": "prod"로 배포했다면 export STAGE=prod를 사용하세요.
  • "stage": "dev"로 배포했다면 export STAGE=dev를 사용하세요.

콘솔을 열면 명령 프롬프트 위에 Welcome to the Migration Assistant Console이라는 메시지가 표시돼요.

AWS Command Line Interface (AWS CLI)와 AWS Session Manager plugin이 설치된 머신에서는 Migration Console에 직접 연결할 수 있어요. 환경에 대한 접근 권한이 있는 자격 증명으로 aws configure를 실행했는지 확인하세요.

다음 명령을 사용하세요:

export STAGE=dev  # Match your deployment stage
export SERVICE_NAME=migration-console
export TASK_ARN=$(aws ecs list-tasks --cluster migration-${STAGE}-ecs-cluster --family "migration-${STAGE}-${SERVICE_NAME}" | jq --raw-output '.taskArns[0]')
aws ecs execute-command --cluster "migration-${STAGE}-ecs-cluster" --task "${TASK_ARN}" --container "${SERVICE_NAME}" --interactive --command "/bin/bash"

{% include copy.html %}

Stage 구성 예시

배포 환경이 다르면 stage를 그에 맞게 조정하세요:

# For test environment deployment
export STAGE=test
./accessContainer.sh migration-console test us-west-2

# For production environment deployment  
export STAGE=prod
./accessContainer.sh migration-console prod us-west-2

# For development environment deployment
export STAGE=dev
./accessContainer.sh migration-console dev us-west-2

{% include copy.html %}

STAGE 값은 배포 시 AWS CDK 컨텍스트 구성에서 지정한 stage 파라미터에 해당해요.

더 알아보기 (Learn more)