Fedora 21
Sponsored Link

OpenStack Juno : Nova 設定2015/01/03

 
OpenStack Compute Service(Nova)をインストールします。
[1] Nova をインストールします。
[root@dlp ~]#
yum -y install openstack-nova
[2] Nova 用のユーザーとデータベースを MariaDB に登録しておきます。
[root@dlp ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.0.13-MariaDB-wsrep MariaDB Server, wsrep_25.10.r4123

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

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

MariaDB [(none)]>
create database nova;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova.* to nova@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova.* to nova@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[3] Nova の基本設定です。
[root@dlp ~]#
mv /etc/nova/nova.conf /etc/nova/nova.conf.org

[root@dlp ~]#
vi /etc/nova/nova.conf
# 新規作成

[DEFAULT]
# RabbitMQ サーバーのホスト名またはIP

rabbit_host=10.0.0.30
rabbit_port=5672
# RabbitMQ ユーザー指定

rabbit_userid=guest
# RabbitMQ ユーザーのパスワード指定

rabbit_password=password
notification_driver=nova.openstack.common.notifier.rpc_notifier
rpc_backend=rabbit
# 自ホストのIP

my_ip=10.0.0.30
# IPv6が不要な場合は記述

use_ipv6=false
state_path=/var/lib/nova
enabled_apis=ec2,osapi_compute,metadata
osapi_compute_listen=0.0.0.0
osapi_compute_listen_port=8774
rootwrap_config=/etc/nova/rootwrap.conf
api_paste_config=api-paste.ini
auth_strategy=keystone
# Glance サーバーのホスト名またはIP

glance_host=10.0.0.30
glance_port=9292
glance_protocol=http
lock_path=/var/lib/nova/tmp
log_dir=/var/log/nova
# Memcached サーバーのホスト名またはIP

memcached_servers=10.0.0.30:11211
scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
[database]
# MariaDB サーバー接続情報 (「password」は「openstack-db」コマンドで設定したもの)

connection=mysql://nova:password@10.0.0.30/nova
[keystone_authtoken]
# Keystone サーバーのホスト名またはIP

auth_host=10.0.0.30
auth_port=35357
auth_protocol=http
auth_version=v2.0
admin_user=nova
# Keystone に登録した Nova ユーザーのパスワード

admin_password=servicepassword
admin_tenant_name=service
signing_dir=/var/lib/nova/keystone-signing
[root@dlp ~]#
chmod 640 /etc/nova/nova.conf

[root@dlp ~]#
chgrp nova /etc/nova/nova.conf

[3] ネットワークの設定
以下はレガシーネットワーク ( nova-network ) を利用する場合の設定です。
[root@dlp ~]#
vi /etc/nova/nova.conf
# [DEFAULT] セクション内の適当な場所へ追記

network_driver=nova.network.linux_net
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
network_api_class=nova.network.api.API
security_group_api=nova
network_manager=nova.network.manager.FlatDHCPManager
network_size=254
allow_same_net_traffic=False
multi_host=True
send_arp_for_ha=True
share_dhcp_address=True
force_dhcp_release=True
# パブリック用のインターフェース名

public_interface=eno16777736
# 適当なブリッジインターフェイス名

flat_network_bridge=br100
# フラットDHCPブリッジに使用するインターフェース名

flat_interface=dummy0
# フラットDHCPブリッジに指定したダミーインターフェースを追加して起動

[root@dlp ~]#
cat > /etc/sysconfig/network-scripts/ifcfg-dummy0 <<EOF
DEVICE=dummy0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
NM_CONTROLLED=no
EOF
[root@dlp ~]#
echo "alias dummy0 dummy" > /etc/modprobe.d/dummy.conf

[root@dlp ~]#
ifup dummy0

[4] Nova サービス起動
レガシーネットワーク ( nova-network ) を利用しない場合は「network」を除外してください。
[root@dlp ~]#
nova-manage db sync

[root@dlp ~]#
for service in api objectstore conductor scheduler cert consoleauth compute network; do
systemctl start openstack-nova-$service
systemctl enable openstack-nova-$service
done
# 動作確認

[root@dlp ~]#
nova-manage service list

Binary           Host                  Zone             Status     State Updated_At
nova-conductor   dlp.srv.world      internal         enabled    :-)   2015-01-05 16:13:14
nova-scheduler   dlp.srv.world      internal         enabled    :-)   2015-01-05 16:13:15
nova-cert        dlp.srv.world      internal         enabled    :-)   2015-01-05 16:13:06
nova-consoleauth dlp.srv.world      internal         enabled    :-)   2015-01-05 16:13:07
nova-compute     dlp.srv.world      nova             enabled    :-)   2015-01-05 16:13:08
nova-network     dlp.srv.world      internal         enabled    :-)   2015-01-05 16:13:09
関連コンテンツ