Oracle® Solaris 11.2에서 OpenStack 설치 및 구성

인쇄 보기 종료

업데이트 날짜: 2015년 4월
 
 

이미지 저장소에 이미지 추가

OpenStack 이미지 서비스인 Glance는 디스크 및 서버 이미지에 대한 저장소, 검색, 등록 및 전달 서비스를 제공합니다. 레지스트리 서버는 클라이언트에 이미지 메타 데이터 정보를 제공하는 이미지 서비스입니다. 이미지 캐시는 이미지가 요청될 때마다 이미지 서비스가 이미지 서버에서 이미지를 다시 다운로드하지 않고 로컬 호스트에서 이미지를 가져오는 데 사용합니다.

다음 명령은 이전 절에서 만들어진 통합 아카이브를 Glance 저장소로 업로드합니다. raw를 포맷 유형으로 사용합니다. architecture 등록 정보를 지정해야 합니다.

global# glance image-create --container-format bare --disk-format raw \
--is-public true --name "Oracle Solaris 11.2 x86 NGZ" \
--property architecture=x86_64 \
--property hypervisor_type=solariszones \
--property vm_mode=solariszones < /var/tmp/myzone.uar

glance image-create 명령은 이미지를 업로드하고 모든 등록 정보 값을 한 번에 설정할 수 있습니다. 다음 스크립트는 architecture 등록 정보가 현재 호스트의 아키텍처로 설정된 이미지를 업로드하는 방법을 보여줍니다.

#!/bin/ksh

# Upload Unified Archive image to glance with proper Solaris decorations

arch=$(archiveadm info -p $1|grep ^archive|cut -d '|' -f 4)

if [[ "$arch" == "i386" ]]; then
        imgarch=x86_64
else
        imgarch=sparc64
fi

name=$(basename $1 .uar)

export OS_USERNAME=glance
export OS_PASSWORD=glance
export OS_TENANT_NAME=service
export OS_AUTH_URL=http://controller-name:5000/v2.0

glance image-create --name $name --container-format bare --disk-format raw --owner service
--file $1 --is-public True --property architecture=$imgarch --property hypervisor_type=solariszones
--property vm_mode=solariszones --progress