Ubuntu 14.04
Sponsored Link

OpenStack Icehouse : Configure Nova
2015/05/13
 
Install and Configure OpenStack Compute Service (Nova).
[1] Install Nova
If you separate the Compute Nodes, it's unnecessarry to include "nova-compute-kvm" below. Then, Refer to here to configure separated Compute Nodes.
root@dlp:~#
apt-get -y install nova-api nova-cert nova-conductor nova-consoleauth nova-objectstore nova-scheduler nova-compute-kvm python-novaclient
[2] Add a User and DB for Nova to 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.

# set any password for 'password' section

mysql>
create database nova character set utf8;

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

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

Query OK, 0 rows affected (0.00 sec)
mysql>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
mysql>
exit

Bye
[3] Configure Nova
root@dlp:~#
vi /etc/nova/nova.conf
# add at the last line

# add it if not need IPv6

use_ipv6=false
auth_strategy=keystone
rootwrap_config=/etc/nova/rootwrap.conf
# the one added in MySQL

connection=mysql://nova:password@10.0.0.30/nova
osapi_compute_listen="0.0.0.0"
osapi_compute_listen_port=8774
scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
# Glance server's hostname or IP

glance_host=10.0.0.30
glance_port=9292
glance_protocol=http
rpc_backend=nova.openstack.common.rpc.impl_kombu
notification_driver=nova.openstack.common.notifier.rpc_notifier
# Memcached server's hostname or IP

memcached_servers=10.0.0.30:11211
# RabbitMQ server's hostname or IP

rabbit_host=10.0.0.30
# RabbitMQ server's User for auth

rabbit_userid=guest
# RabbitMQ server's password of the User above

rabbit_password=password
[keystone_authtoken]
# Keystone server's hostname or IP

auth_host=10.0.0.30
auth_port=35357
auth_protocol=http
admin_tenant_name=service
admin_user=nova
# Nova user's password added in Keystone

admin_password=servicepassword
[4] Configure Networking.
The follows is for the case you use legacy nova-network function.
But if you use Neutron Networking function, Refer to here to configure it.
Anyway, legacy nova-network function is officially not recommended.
root@dlp:~#
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf

root@dlp:~#
sysctl -p

net.ipv4.ip_forward = 1
root@dlp:~#
apt-get -y install nova-network
root@dlp:~#
vi /etc/nova/nova.conf
# add follows in [DEFAULT] section

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
# specify nic for public

public_interface=eth0
# specify any name you like for bridge

flat_network_bridge=br100
# specify nic for flat DHCP bridge

flat_interface=lo
[5] Start Nova Service.
If you don't use legacy nova-network, exclude the word "network" below.
If you separate Compute Nodes, exclude the word "compute" below, too.
root@dlp:~#
nova-manage db sync

root@dlp:~#
for service in api conductor network scheduler objectstore cert consoleauth compute; do
service nova-$service restart
done

nova-api stop/waiting
nova-api start/running, process 4794
nova-conductor stop/waiting
nova-conductor start/running, process 4811
nova-network stop/waiting
nova-network start/running, process 4826
nova-scheduler stop/waiting
nova-scheduler start/running, process 4845
nova-objectstore stop/waiting
nova-objectstore start/running, process 4864
nova-cert stop/waiting
nova-cert start/running, process 4887
nova-consoleauth stop/waiting
nova-consoleauth start/running, process 4914
nova-compute stop/waiting
nova-compute start/running, process 4946
# show status

root@dlp:~#
nova-manage service list

Binary           Host         Zone             Status     State Updated_At
nova-cert        dlp          internal         enabled    :-)   2014-05-13 11:46:57.942848
nova-consoleauth dlp          internal         enabled    :-)   2014-05-13 11:46:58.136894
nova-scheduler   dlp          internal         enabled    :-)   2014-05-13 11:46:57.627822
nova-conductor   dlp          internal         enabled    :-)   2014-05-13 11:46:58.115143
nova-compute     dlp          nova             enabled    :-)   2014-05-13 11:46:58.738616
nova-network     dlp          internal         enabled    :-)   2014-05-13 11:46:58.386463
Matched Content