바. Glance 설치 및 설정
1) 데이터베이스 설정
mysql
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \ IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \ IDENTIFIED BY 'GLANCE_DBPASS';
exit
2) glance user 생성
. admin-openrc
openstack user create --domain default --password-prompt glance
* 비밀번호 : GLANCE_PASS
openstack role add --project service --user glance admin
* service 프로젝트에 넣고 admin 권한 부여
3) glance 서비스 엔트리 생성
openstack service create --name glance \ --description "OpenStack Image" image
* 다른 컴포넌트들이 glance 서비스를 인식하도록 함
4) glance 서비스 엔드포인트 생성
openstack endpoint create --region RegionOne \ image public http://controller:9292
openstack endpoint create --region RegionOne \ image internal http://controller:9292
openstack endpoint create --region RegionOne \ image admin http://controller:9292
5) glance 설치
apt install glance
6) glance config 파일 설정
vi /etc/glance/glance-api.conf
[database]
# ...
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
[keystone_authtoken]
# ...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = GLANCE_PASS
[paste_deploy]
# ...
flavor = keystone
[glance_store]
# ...
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
su -s /bin/sh -c "glance-manage db_sync" glance
* glance DB 동기화
service glance-api restart
* glance-api 재시작
7) glance api 테스트(cirros 이미지 테스트)
. admin-openrc
* admin 권한 적용
wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
* 이미지 다운로드
glance image-create --name "cirros" \
--file cirros-0.4.0-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--visibility=public
* glance에 등록
glance image-list
* 등록한 이미지 리스트 확인
'인턴' 카테고리의 다른 글
오픈스택 멀티 노드 설치 - Nova (Controller) (0) | 2024.07.02 |
---|---|
오픈스택 멀티 노드 설치-Placement (0) | 2024.07.02 |
오픈스택 멀티노드 설치-기본 컴포넌트 설치 (0) | 2024.07.02 |
오픈스택 멀티노드 설치-사전 구성 (0) | 2024.07.02 |
오픈스택 싱글노드 설치 및 vm생성 (0) | 2024.05.29 |