OpenStack Havana - Glance 設定2013/11/22 |
OpenStack Image Service(Glance)をインストールします。
|
|
[1] | Glance インストール |
# 事前にOpenStack Havana 用リポジトリを登録しておく root@dlp:~# aptitude -y install glance
|
[2] | Glance 用のユーザーとデータベースを MySQL に登録しておく |
root@dlp:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 37 Server version: 5.5.34-0ubuntu0.12.04.1 (Ubuntu) Copyright (c) 2000, 2013, 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. # 「glance」データベース作成 ( 'password'の箇所は設定するパスワードを入力 )
mysql>
create database glance character set utf8; Query OK, 1 row affected (0.00 sec)
mysql>
grant all privileges on glance.* to glance@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
[3] | Glance の基本設定 |
root@dlp:~#
vi /etc/glance/glance-registry.conf # 32行目:変更 ( MySQL に登録したもの ) sql_connection = mysql://glance:password@10.0.0.30/glance
# 84行目:以下のように変更 (Keystone に登録した値) [keystone_authtoken] auth_host = 10.0.0.30 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = servicepassword
# 最終行に追記 flavor = keystone
root@dlp:~#
vi /etc/glance/glance-api.conf # 55行目:変更 ( MySQL に登録したもの ) sql_connection = mysql://glance:password@10.0.0.30/glance
# 429行目:以下のように変更 (Keystone に登録した値) [keystone_authtoken] auth_host = 10.0.0.30 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = servicepassword
# 最終行に追記 flavor = keystone
glance-manage db_sync root@dlp:~# for service in api registry; do service glance-$service restart done glance-api stop/waiting glance-api start/running, process 2460 glance-registry stop/waiting glance-registry start/running, process 2465 |
Sponsored Link |