Ubuntu 16.04
Sponsored Link

OpenStack Ocata : Nova 設定#22017/03/12

 
OpenStack Compute Service(Nova)をインストールします。
当例では以下のような環境に Nova API サービスをインストールします。
                  eth0|10.0.0.30 
          +-----------+-----------+
          |    [ Control Node ]   |
          |                       |
          |  MariaDB    RabbitMQ  |
          |  Memcached  httpd     |
          |  Keystone   Glance    |
          |  Nova API             |
          +-----------------------+

[1] Nova をインストールします。
root@dlp ~(keystone)#
apt-get -y install nova-api nova-placement-api nova-cert nova-conductor nova-consoleauth nova-scheduler nova-novncproxy python-novaclient
[2] Nova の基本設定です。
root@dlp ~(keystone)#
mv /etc/nova/nova.conf /etc/nova/nova.conf.org

root@dlp ~(keystone)#
vi /etc/nova/nova.conf
# 新規作成

[DEFAULT]
# 自ホストのIP
my_ip = 10.0.0.30
state_path = /var/lib/nova
enabled_apis = osapi_compute,metadata
log_dir = /var/log/nova
# RabbitMQ サーバー接続情報
transport_url = rabbit://openstack:password@10.0.0.30

[api]
auth_strategy = keystone

# Glance サーバーを指定
[glance]
api_servers = http://10.0.0.30:9292

[oslo_concurrency]
lock_path = $state_path/tmp

# MariaDB サーバー接続情報
[api_database]
connection = mysql+pymysql://nova:password@10.0.0.30/nova_api

[database]
connection = mysql+pymysql://nova:password@10.0.0.30/nova

# Keystone サーバー接続情報
[keystone_authtoken]
auth_uri = http://10.0.0.30:5000
auth_url = http://10.0.0.30:35357
memcached_servers = 10.0.0.30:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = servicepassword

[placement]
auth_url = http://10.0.0.30:35357
os_region_name = RegionOne
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = placement
password = servicepassword

[placement_database]
connection = mysql+pymysql://nova:password@10.0.0.30/nova_placement

[wsgi]
api_paste_config = /etc/nova/api-paste.ini

root@dlp ~(keystone)#
chmod 640 /etc/nova/nova.conf

root@dlp ~(keystone)#
chgrp nova /etc/nova/nova.conf

[3] データベースにデータを追加して Nova をサービス起動します。
なお、データ投入の際に表示される deprecated ~ な Warning メッセージは気にする必要はありません。
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage api_db sync"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0 \
--database_connection mysql+pymysql://nova:password@10.0.0.30/nova_cell0"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage db sync"
root@dlp ~(keystone)#
su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1 \
--database_connection mysql+pymysql://nova:password@10.0.0.30/nova \
--transport-url rabbit://openstack:password@10.0.0.30:5672"
root@dlp ~(keystone)#
systemctl restart apache2

root@dlp ~(keystone)#
for service in api conductor scheduler cert consoleauth novncproxy; do
systemctl restart nova-$service
done
# 動作確認

root@dlp ~(keystone)#
openstack compute service list

+----+--------------+--------------+----------+---------+-------+--------------+
| ID | Binary       | Host         | Zone     | Status  | State | Updated At   |
+----+--------------+--------------+----------+---------+-------+--------------+
|  1 | nova-        | dlp.srv.worl | internal | enabled | up    | 2017-03-10T0 |
|    | conductor    | d            |          |         |       | 2:27:38.0000 |
|    |              |              |          |         |       | 00           |
|  6 | nova-        | dlp.srv.worl | internal | enabled | up    | 2017-03-10T0 |
|    | scheduler    | d            |          |         |       | 2:27:37.0000 |
|    |              |              |          |         |       | 00           |
|  7 | nova-cert    | dlp.srv.worl | internal | enabled | up    | 2017-03-10T0 |
|    |              | d            |          |         |       | 2:27:29.0000 |
|    |              |              |          |         |       | 00           |
|  8 | nova-        | dlp.srv.worl | internal | enabled | up    | 2017-03-10T0 |
|    | consoleauth  | d            |          |         |       | 2:27:30.0000 |
|    |              |              |          |         |       | 00           |
+----+--------------+--------------+----------+---------+-------+--------------+
関連コンテンツ