6.2. 컨테이너 내부에서 컨테이너화된 Tempest 실행


  1. 컨테이너 내에서 실행할 수 있는 tempest 스크립트를 생성하여 tempest.conf 파일을 생성하고 tempest 테스트를 실행합니다. 이 스크립트는 다음 작업을 수행합니다.

    • set -e 명령의 종료 상태를 설정합니다.
    • 오버클라우드에 대해 tempest를 실행하려면 overcloudrc 파일을 소싱합니다. 언더클라우드에 대해 tempest를 실행하려면 stackrc 파일을 소싱합니다.
    • tempest init 을 실행하여 tempest Workspace를 생성합니다. 호스트에서 파일도 액세스할 수 있도록 공유 디렉터리를 사용합니다.
    • 디렉토리를 tempest_workspace로 변경
    • 이후 단계에서 쉽게 사용할 수 있도록 TEMPESTCONF 환경 변수를 내보냅니다.
    • discover-tempest-config 를 실행하여 tempest.conf 파일을 생성합니다. discover-tempest-config 명령에 포함할 수 있는 옵션에 대한 자세한 내용은 discover-tempest-config --help 를 실행합니다.
    • 호스트 시스템에서 tempest.conf 파일에 액세스할 수 있도록 --outhome/stack/tempest_workspace/tempest.conf 로 설정합니다.
    • 공유 디렉터리에서 tempest-deployer-input.conf 파일을 가리키도록 --deployer-input.conf를 설정합니다.
    • Tempest 테스트를 실행합니다. 이 예제 스크립트는 스모크 테스트 tempest run --smoke.

      $ cat <<'EOF'>> /home/stack/container_tempest/tempest_script.sh
      set -e
      source /home/stack/container_tempest/overcloudrc
      tempest init /home/stack/tempest_workspace
      pushd /home/stack/tempest_workspace
      
      export TEMPESTCONF="/usr/bin/discover-tempest-config"
      
      $TEMPESTCONF \
        --out /home/stack/tempest_workspace/etc/tempest.conf \
        --deployer-input /home/stack/container_tempest/tempest-deployer-input.conf \
        --debug \
        --create \
        object-storage.reseller_admin ResellerAdmin
      
      tempest run --smoke
      
      EOF

      이미 tempest.conf 파일이 있고 tempest 테스트만 실행하려면 스크립트에서 TEMPESTCONF 를 생략하고 이를 container_tempest 디렉터리의 tempest.conf 파일을 tempest_workspace/etc 디렉터리로 복사하십시오.

    $ cp /home/stack/container_tempest/tempest.conf /home/stack/tempest_workspace/etc/tempest.conf
  2. tempest_script.sh 스크립트에 실행 가능한 권한을 설정합니다.

    $ chmod +x container_tempest/tempest_script.sh
  3. 이전 단계에서 생성한 별칭을 사용하여 컨테이너에서 tempest 스크립트를 실행합니다.

    $ docker-tempest -c 'set -e; /home/stack/container_tempest/tempest_script.sh'
  4. 테스트 결과에 대한 정보는 .stestr 디렉토리를 검사합니다.
  5. tempest 테스트를 다시 실행하려면 먼저 tempest 작업 영역을 제거하고 다시 생성해야 합니다.

    $ sudo rm -rf /home/stack/tempest_workspace
    $ mkdir /home/stack/tempest_workspace
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.