검증 과정

검증 과정

OpenStack 배포를 테스트하는데 돕는 작은 리눅스 이미지인 CirrOS 를 사용하여 이미지 서비스에 대한 동작을 검증합니다.

For more information about how to download and build images, see OpenStack Virtual Machine Image Guide. For information about how to manage images, see the OpenStack User Guide.

주석

해당 명령어들을 컨트롤러 노드에서 실행합니다.

  1. 각 클라이언트 환경 스크립트에서, 이미지 서비스 클라이언트가 API 버전 2.0을 사용하도록 구성합니다:

    $ echo "export OS_IMAGE_API_VERSION=2" \
      | tee -a admin-openrc.sh demo-openrc.sh
    
  2. admin credential에 대한 접근 권한을 얻기위해 관리자용 CLI 명령어 source 입력합니다:

    $ source admin-openrc.sh
    
  3. 원본 이미지를 다운로드합니다:

    $ wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
    

    주석

    배포판에서 포함하지 않고 있는 경우에는 ``wget``을 설치합니다.

  4. QCOW2 디스크 포맷, bare 컨테이너 포맷과 모든 프로젝트에서 액세스 가능하도록 하는 공용으로 보이기를 사용하여 이미지를 이미지 서비스에 업로드합니다:

    $ glance image-create --name "cirros" \
      --file cirros-0.3.4-x86_64-disk.img \
      --disk-format qcow2 --container-format bare \
      --visibility public --progress
    [=============================>] 100%
    +------------------+--------------------------------------+
    | Property         | Value                                |
    +------------------+--------------------------------------+
    | checksum         | 133eae9fb1c98f45894a4e60d8736619     |
    | container_format | bare                                 |
    | created_at       | 2015-03-26T16:52:10Z                 |
    | disk_format      | qcow2                                |
    | id               | 38047887-61a7-41ea-9b49-27987d5e8bb9 |
    | min_disk         | 0                                    |
    | min_ram          | 0                                    |
    | name             | cirros                               |
    | owner            | ae7a98326b9c455588edd2656d723b9d     |
    | protected        | False                                |
    | size             | 13200896                             |
    | status           | active                               |
    | tags             | []                                   |
    | updated_at       | 2015-03-26T16:52:10Z                 |
    | virtual_size     | None                                 |
    | visibility       | public                               |
    +------------------+--------------------------------------+
    

    glance image-create 매개변수에 관한 자세한 정보는 OpenStack Command-Line Interface ReferenceImage service command-line client 를 살펴봅니다.

    이미지에 대한 디스크 및 컨테이너 포맷에 관한 자세한 정보는 OpenStack Virtual Machine Image GuideDisk and container formats for images 를 살펴봅니다.

    주석

    OpenStack은 ID를 동적으로 생성하므로, 예제 명령어 결과에서와 다른 값들을 살펴볼 것입니다.

  5. 이미지 업로드를 확인하고 속성들을 검증합니다:

    $ glance image-list
    +--------------------------------------+--------+
    | ID                                   | Name   |
    +--------------------------------------+--------+
    | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros |
    +--------------------------------------+--------+
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.