티스토리 뷰

728x90
반응형

본 포스팅은 OpenStack의 구성요소들을 수동으로 설치하는 방법에 대한 가이드입니다.


오픈스택은 Core 프로젝트 즉 주요 구성요소로 10가지를 채택하고 있습니다. 이들은 각자의 VM으로 구성되며 VM간의 연결을 위해 하이퍼바이저를 사용합니다. 본 포스팅에서는 각 구성요소들을 하나씩 수동으로 구성해 보고 연결과정에 대해 알아보겠습니다.

 

★Cloud★/OpenStack [OpenStack] Part 1. kestone (아이덴티티 서비스)

 

두번째 시간으로 설치할 구성요소는 Image Service인 glance입니다.

앞선 포스팅인 keystone 설치과정은 위 URL을 참고하세요.

OpenStack 이미지 서비스 (glance)는 사용자들이 가상 머신 이미지를 검색하여 반영하거나 복제하여 가져올 수 있습니다.

OpenStack Image 서비스는 IaaS(Infra Infrastructure as a Service)에서 핵심요소로 동작합니다. Disk 또는 서버 이미지에 대한 API 요청과 최종 사용자 또는 OpenStack Compute 구성 요소의 이미지 메타데이터를 접근을 위한 REST API를 제공합니다. 또한 OpenStack Object Storage를 비롯한 다양한 저장소 유형의 Disk 또는 서버 이미지를 저장할 수 있습니다.

glance 서비스에는 다음과 같은 구성 요소가 포함되어 있습니다.


- glance-api
이미지 검색 및 저장을 위한 이미지 API 호출을 수락합니다
- glance-registry
이미지에 대한 메타데이터를 저장, 처리, 검색합니다. 메타데이터에는 크기 및 유형이 같은 항목으로 구분합니다. 레지스트리는 OpenStack Image 서비스에서 사용하는 전용 내부 서비스로 외부사용자에게 노출되지 않도록 보안에 유의 해야합니다.
- Database
이미지 메타데이터를 저장합니다. 데이터베이스는 어떤것을 사용해도 무방하지만 대부분의 배포는 MySQL 또는 SQLite를 사용합니다.

- Storage repository for image files

일반 파일 시스템, Object 스토리지, RADOS block devices, HTTP 및 Amazon S3을 비롯한 다양한 저장소 유형이 지원됩니다. 일부 리포지토리는 읽기 전용 사용만 지원합니다.


 

OpenStack Image Service Installation

Image Service는 glance이라는 프로젝트로 개발되었습니다. OpenStack은 오픈소스로써 이러한 프로젝트들이 핵심프로젝트로 올라가면 이를 실제 OpenStack에 반영하여 사용하고 실제 프로젝트 Name은 Module Name 및 CLI 환경에서 Command로 사용할 수 있습니다.


- 본 테스트는 다음과 같은 환경에서 작성되었습니다.

[nrson@nrsonLinux~$]uname -a
Linux nrsonLinux 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[nrson@nrsonLinux~$]

- 본 포스팅에서는 다양한 설치가 이루어짐에 따라 필수로 설치되어야 하는 mysql, rabbitMQ등의 Install과정으 과감히 제거하였습니다. 별도의 포스팅에서 사전에 준비되야 하는 Package의 설치 과정을 설명드리겠습니다.

- 본 포스팅에서 설치되는 패키지들은 apt-get package manager를 통해 수행됩니다.


 

glance 설치 이전 선행 작업

==> 하단 작업에 앞서 현재 이미 생성되어 있는 서비스와 API 엔드포인트를 사용합니다. 앞선 keystone 포스팅을 통해 학습 이후 아래 스탭을 진행하시기 바랍니다.

1. Database 생성


[nrson@nrsonLinux~$]mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 5.7.23-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE glance;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql>


2. admin 접근 권한을 위한 nrsonOpenrc.sh 파일을 실행니다. (작성 방법 및 실행은 상단에 있는 keystone 포스팅을 참고하세요.)

root@nrsonLinux:~# source nrsonOpenrc.sh
root@nrsonLinux:~#


3. openstack glance user를 생성합니다.


root@nrsonLinux:~# openstack user create --domain default --password-prompt glance
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | default                          |
| enabled   | True                             |
| id        | fbbba74e92ba460a93dd1f74caec2039 |
| name      | glance                           |
+-----------+----------------------------------+
root@nrsonLinux:~#


4. glance user에게 admin Role 부여


root@nrsonLinux:~# openstack role add --project service --user glance admin
root@nrsonLinux:~#


5. glance service Entity 생성


root@nrsonLinux:~# openstack service create --name glance --description "OpenStack Image service" image
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Image service          |
| enabled     | True                             |
| id          | 77fa46625b8847388b34b181d6e3fb0b |
| name        | glance                           |
| type        | image                            |
+-------------+----------------------------------+
root@nrsonLinux:~#


6. Image Service API 엔드포인트 생성


root@nrsonLinux:~# openstack endpoint create --region RegionOne image public http://172.21.70.22:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | ab46c29fd99646558db20db44ce08086 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 77fa46625b8847388b34b181d6e3fb0b |
| service_name | glance                           |
| service_type | image                            |
| url          | http://172.21.70.22:9292         |
+--------------+----------------------------------+
root@nrsonLinux:~# openstack endpoint create --region RegionOne image internal http://172.21.70.22:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | c14f6ebf5a774964bc1a5deb12a2ca3e |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 77fa46625b8847388b34b181d6e3fb0b |
| service_name | glance                           |
| service_type | image                            |
| url          | http://172.21.70.22:9292         |
+--------------+----------------------------------+
root@nrsonLinux:~# openstack endpoint create --region RegionOne image admin http://172.21.70.22:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | b7811d3161b549c1b0969a246b3be176 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 77fa46625b8847388b34b181d6e3fb0b |
| service_name | glance                           |
| service_type | image                            |
| url          | http://172.21.70.22:9292         |
+--------------+----------------------------------+
root@nrsonLinux:~#


 

glance Install

1. 필수 패키지를 설치합니다.


[nrson@nrsonLinux~$]apt-get install glance python-glanceclient
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료

...

...
glance is the newest version (2:12.0.0-0ubuntu2).
python-glanceclient is the newest version (1:2.0.0-2ubuntu0.16.04.1).


2. /etc/glance/glance-api.conf modify


[nrson@nrsonLinux~$]sudo vi /etc/glance/glance-api.conf

...

[database]

...

# connection을 선행작업에서 진행했던 정보를 기반으로 mysql+pymysql://dbid:dbpasswd@controller/databasename 으로 변경

# connection = <None>

connection = mysql+pymysql://glance:glance@localhost:3306/glance

...

[keystone_authtoken]

...

# auth_uri = <None>
auth_uri = http://172.21.70.22:5000
auth_url = http://172.21.70.22:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance

...

[paste_deploy]

...

# flavor = <None>
flavor = keystone

...

[glance_store]

# 로컬 파일 시스템 저장소와 이미지 파일 위치를 구성합니다.

...

# default_store = file
default_store = file

...

# filesystem_store_datadir = /var/lib/glance/images
filesystem_store_datadir = /var/lib/glance/images

...

[DEFAULT]

...
notification_driver = noop

...


3. /etc/glance/glance-repository.conf modify 

root@nrsonLinux:~# vi /etc/glance/glance-registry.conf

...

[database]

...

# connection = <None>
connection = mysql+pymysql://glance:glance@localhost:3306/glance

...

[keystone_authtoken]

...

# auth_uri = <None>
auth_uri = http://172.21.70.22:5000
auth_url = http://172.21.70.22:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance

...

[paste_deploy]

...

# flavor = <None>
flavor = keystone

...

[DEFAULT]

...
notification_driver = noop

...


4. glance 데이터베이스 초기화

글랜스 데이터베이스를 생성하고 글랜스 서비스가 이 데이터베이스를 사용하도록 구성했지만 데이터베이스가 지금은 비어있는 상태입니다. 이에 작성한 glance-api.conf, glance-repository.conf 파일을 기준으로 데이터베이스의 스키마를 구축합니다.


root@nrsonLinux:~# su -s /bin/sh -c "glance-manage db_sync" glance
/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py:1056: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade
  expire_on_commit=expire_on_commit, _conf=conf)
/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead
  result = self._query(query)
2018-08-09 16:51:29.013 17624 INFO migrate.versioning.api [-] 0 -> 1...
2018-08-09 16:51:29.015 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table images
2018-08-09 16:51:29.923 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:29.923 17624 INFO migrate.versioning.api [-] 1 -> 2...
2018-08-09 16:51:29.926 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_properties
2018-08-09 16:51:31.186 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:31.186 17624 INFO migrate.versioning.api [-] 2 -> 3...
2018-08-09 16:51:33.208 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:33.208 17624 INFO migrate.versioning.api [-] 3 -> 4...
2018-08-09 16:51:33.919 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:33.919 17624 INFO migrate.versioning.api [-] 4 -> 5...
2018-08-09 16:51:34.880 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:34.881 17624 INFO migrate.versioning.api [-] 5 -> 6...
/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: Duplicate index 'ix_image_properties_image_id_name' defined on the table 'glance.image_properties'. This is deprecated and will be disallowed in a future release.
  result = self._query(query)
2018-08-09 16:51:35.482 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:35.482 17624 INFO migrate.versioning.api [-] 6 -> 7...
2018-08-09 16:51:36.193 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:36.193 17624 INFO migrate.versioning.api [-] 7 -> 8...
2018-08-09 16:51:36.196 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_members
2018-08-09 16:51:37.480 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:37.480 17624 INFO migrate.versioning.api [-] 8 -> 9...
2018-08-09 16:51:39.017 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:39.017 17624 INFO migrate.versioning.api [-] 9 -> 10...
2018-08-09 16:51:39.067 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:39.068 17624 INFO migrate.versioning.api [-] 10 -> 11...
2018-08-09 16:51:40.414 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:40.414 17624 INFO migrate.versioning.api [-] 11 -> 12...
2018-08-09 16:51:45.762 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:45.762 17624 INFO migrate.versioning.api [-] 12 -> 13...
2018-08-09 16:51:46.482 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:46.482 17624 INFO migrate.versioning.api [-] 13 -> 14...
2018-08-09 16:51:46.485 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_tags
2018-08-09 16:51:47.559 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:47.560 17624 INFO migrate.versioning.api [-] 14 -> 15...
2018-08-09 16:51:47.618 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:47.618 17624 INFO migrate.versioning.api [-] 15 -> 16...
2018-08-09 16:51:48.520 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:48.520 17624 INFO migrate.versioning.api [-] 16 -> 17...
2018-08-09 16:51:48.521 17624 INFO 017_quote_encrypted_swift_credentials [-] 'metadata_encryption_key' was not specified in the config file or a config file was not specified. This means that this migration is a NOOP.
2018-08-09 16:51:48.570 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:48.570 17624 INFO migrate.versioning.api [-] 17 -> 18...
2018-08-09 16:51:48.573 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_locations
2018-08-09 16:51:49.640 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:49.641 17624 INFO migrate.versioning.api [-] 18 -> 19...
2018-08-09 16:51:49.699 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:49.699 17624 INFO migrate.versioning.api [-] 19 -> 20...
2018-08-09 16:51:50.427 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:50.427 17624 INFO migrate.versioning.api [-] 20 -> 21...
2018-08-09 16:51:50.476 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:50.476 17624 INFO migrate.versioning.api [-] 21 -> 22...
2018-08-09 16:51:50.960 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:50.960 17624 INFO migrate.versioning.api [-] 22 -> 23...
2018-08-09 16:51:51.011 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:51.011 17624 INFO migrate.versioning.api [-] 23 -> 24...
2018-08-09 16:51:51.061 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:51.061 17624 INFO migrate.versioning.api [-] 24 -> 25...
2018-08-09 16:51:51.111 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:51.111 17624 INFO migrate.versioning.api [-] 25 -> 26...
2018-08-09 16:51:51.863 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:51.863 17624 INFO migrate.versioning.api [-] 26 -> 27...
2018-08-09 16:51:52.205 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:52.205 17624 INFO migrate.versioning.api [-] 27 -> 28...
2018-08-09 16:51:52.541 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:52.541 17624 INFO migrate.versioning.api [-] 28 -> 29...
2018-08-09 16:51:54.136 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:54.137 17624 INFO migrate.versioning.api [-] 29 -> 30...
2018-08-09 16:51:54.138 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table tasks
2018-08-09 16:51:56.116 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:56.116 17624 INFO migrate.versioning.api [-] 30 -> 31...
2018-08-09 16:51:56.174 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:56.174 17624 INFO migrate.versioning.api [-] 31 -> 32...
2018-08-09 16:51:56.176 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table task_info
2018-08-09 16:51:59.076 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:59.076 17624 INFO migrate.versioning.api [-] 32 -> 33...
2018-08-09 16:51:59.811 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:51:59.811 17624 INFO migrate.versioning.api [-] 33 -> 34...
2018-08-09 16:52:00.723 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:00.723 17624 INFO migrate.versioning.api [-] 34 -> 35...
2018-08-09 16:52:00.726 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_namespaces
2018-08-09 16:52:01.491 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_objects
2018-08-09 16:52:02.126 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_properties
2018-08-09 16:52:02.812 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_resource_types
2018-08-09 16:52:03.522 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_namespace_resource_types
2018-08-09 16:52:04.526 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:04.526 17624 INFO migrate.versioning.api [-] 35 -> 36...
2018-08-09 16:52:04.736 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:04.736 17624 INFO migrate.versioning.api [-] 36 -> 37...
2018-08-09 16:52:06.342 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:06.342 17624 INFO migrate.versioning.api [-] 37 -> 38...
2018-08-09 16:52:06.343 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table metadef_tags
2018-08-09 16:52:06.944 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:06.944 17624 INFO migrate.versioning.api [-] 38 -> 39...
2018-08-09 16:52:15.052 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:15.052 17624 INFO migrate.versioning.api [-] 39 -> 40...
2018-08-09 16:52:15.360 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:15.360 17624 INFO migrate.versioning.api [-] 40 -> 41...
2018-08-09 16:52:15.364 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifacts
2018-08-09 16:52:17.165 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifact_tags
2018-08-09 16:52:18.273 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifact_properties
2018-08-09 16:52:19.254 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifact_blobs
2018-08-09 16:52:20.215 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifact_blob_locations
2018-08-09 16:52:20.968 17624 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table artifact_dependencies
2018-08-09 16:52:22.990 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:22.991 17624 INFO migrate.versioning.api [-] 41 -> 42...
2018-08-09 16:52:29.435 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:29.435 17624 INFO migrate.versioning.api [-] 42 -> 43...
2018-08-09 16:52:30.069 17624 INFO migrate.versioning.api [-] done
2018-08-09 16:52:30.069 17624 INFO migrate.versioning.api [-] 43 -> 44...
2018-08-09 16:52:30.136 17624 INFO migrate.versioning.api [-] done
root@nrsonLinux:~#


5. 글랜스 재시작


root@nrsonLinux:~# service glance-registry restart
root@nrsonLinux:~# service glance-api restart
root@nrsonLinux:~#


6. SQLite 데이터베이스 제거


root@nrsonLinux:~# rm -rf /var/lib/glance/glance.sqlite
root@nrsonLinux:~#


 

검증 과정

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

검증에 앞서 문제가 발생 시 확인 가능한 로그경로 및 파일이름입니다.

root@nrsonLinux:/var/log/glance# tail -f glance-api.log

 

1. Image Service Clinet가 API 버전 2.0을 사용하도록 변경합니다.


root@nrsonLinux:~# echo "export OS_IMAGE_API_VERSION=2" | tee -a nrsonOpenrc.sh demoOpenrc.sh
export OS_IMAGE_API_VERSION=2
root@nrsonLinux:~#


2. admin 권한을 부여합니다.


root@nrsonLinux:~# source nrsonOpenrc.sh
root@nrsonLinux:~#


3. 원본이미지 CirrOS를 다운로드 합니다.


root@nrsonLinux:~# wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
--2018-08-09 17:29:11--  http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 64.90.42.85, 2607:f298:6:a036::bd6:a72a
Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|64.90.42.85|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13287936 (13M) [text/plain]
Saving to: ‘cirros-0.3.4-x86_64-disk.img’

cirros-0.3.4-x86_64-disk.img  100%[==============================================>]  12.67M  4.80MB/s    in 2.6s

2018-08-09 17:29:14 (4.80 MB/s) - ‘cirros-0.3.4-x86_64-disk.img’ saved [13287936/13287936]

root@nrsonLinux:~# ls
cirros-0.3.4-x86_64-disk.img  demo-openrc.sh  demoOpenrc.sh  keystone.auth  nrsonOpenrc.sh
root@nrsonLinux:~#


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


root@nrsonLinux:~# glance image-create --name "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress
An auth plugin is required to determine endpoint URL
root@nrsonLinux:~#

- 위와 같이 An auth plugin is required to determine endpoint URL가 발생 할 수 있습니다. 이럴 경우 당황하지 말고~ 위에 glance-api.conf, glance-repository.conf 파일을 다시한번 정확히 확인 합니다. 저 같은 경우는 flavor =  [none]을 수정하지 않아서 발생했고, 수정 이후 아래처럼 정상적으로 이미지가 업로드 됩니다.

root@nrsonLinux:~# 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         | ee1eca47dc88f4879d8a229cc70a07c6     |
| container_format | bare                                 |
| created_at       | 2018-08-09T10:53:34Z                 |
| disk_format      | qcow2                                |
| id               | 362f5a23-8083-4cbe-b0db-ba3abc3762fb |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | f0811cb886984f4a801578be8a06edfc     |
| protected        | False                                |
| size             | 13287936                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2018-08-09T10:53:34Z                 |
| virtual_size     | None                                 |
| visibility       | public                               |
+------------------+--------------------------------------+
root@nrsonLinux:~#


5. 업로드 된 이미지 확인


root@nrsonLinux:~# glance image-list
+--------------------------------------+--------+
| ID                                   | Name   |
+--------------------------------------+--------+
| 362f5a23-8083-4cbe-b0db-ba3abc3762fb | cirros |
+--------------------------------------+--------+
root@nrsonLinux:~#


지금까지 OpenStack 구성요소 인 글랜스(glance) 이미지 서비스를 구성해 보았습니다.

다음시간에는 노바(nova) 컴퓨트 서비스에 대해 알아보겠습니다.

728x90
반응형