Install OpenStack Mitaka (all-in-one) on Ubuntu 16.04: Nova Installation and configuration

Source: Internet
Author: User
Tags create database

This article describes the process of installing Mitaka Nova in Ubuntu 16.04 under a single point

Step 1:root identity into MySQL, create two databases

CREATE DATABASE Nova_api;

CREATE DATABASE Nova;

Step 2: Still in the database, create a Nova user and give permissions, the following command to set a consistent Nova_dbpass value, and then quit MySQL

GRANT all privileges on nova_api.* to ' nova ' @ ' localhost ' identified by ' nova_dbpass ';

GRANT all privileges the nova_api.* to ' Nova ' @ ' percent ' identified by ' nova_dbpass ';

GRANT all privileges on nova.* to ' nova ' @ ' localhost ' identified by ' nova_dbpass ';

GRANT all privileges the nova.* to ' Nova ' @ ' percent ' identified by ' nova_dbpass ';

Step 3: Run the script. ADMIN-OPENRC to ensure the next command is run as admin

Step 4: Create a nova User: OpenStack user create--domain default--password-prompt Nova

Step 5:nova User gives admin permissions to service project: OpenStack role Add--project service--user Nova Admin

Step 6: Create Nova Services: OpenStack Service create--name nova--description "OpenStack Compute" Compute

Step 7: International practice, create three API URLs for Nova services, these three URLs are only different types

OpenStack Endpoint Create--region regionone \compute public http://controller:8774/v2.1/%\ (tenant_id\) s

OpenStack Endpoint Create--region regionone \compute internal http://controller:8774/v2.1/%\ (tenant_id\) s

OpenStack Endpoint Create--region regionone \compute admin http://controller:8774/v2.1/%\ (tenant_id\) s

Step 8: Install the Nova service all installation packages

Apt-get Install Nova-api nova-conductor nova-consoleauth nova-novncproxy Nova-scheduler

Step 9: Edit or create the file/etc/nova/nova.conf, there is no this file on my machine, you have to create, add or modify the content as follows

[DEFAULT]
Enabled_apis = Osapi_compute,metadata
Rpc_backend = Rabbit
Auth_strategy = Keystone
MY_IP = 192.168.1.110 #enp3s0的IP地址
Use_neutron = True
Firewall_driver = Nova.virt.firewall.NoopFirewallDriver

#logdir =/var/log/nova Be sure to comment this out.


                      [Api_database]
                      connection = Mysql+pymysql://nova:yourpassword@controller/nova_ API

                      [Database]
                      connection = Mysql+pymysql://nova:yourpassword@controller/nova

[Oslo_messaging_rabbit]
Rabbit_host = Controller
Rabbit_userid = OpenStack
Rabbit_password = YourPassword #环境配置时安装rabbitmq时创建的openstack用户名密码


[Keystone_authtoken]
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = Default
User_domain_name = Default
PROJECT_NAME = Service
Username = Nova
Password = YourPassword


[VNC]
Vncserver_listen = $my _ip
vncserver_proxyclient_address = $my _ip


[Oslo_concurrency]
Lock_path =/var/lib/nova/tmp


Step 10: Synchronize the database

Su-s/bin/sh-c "nova-manage api_db sync" Nova

Su-s/bin/sh-c "Nova-manage db Sync" Nova

Step 11: Restart the service

Service Nova-api Restart

Service Nova-consoleauth Restart

Service Nova-scheduler Restart

Service Nova-conductor Restart

Service Nova-novncproxy Restart

Step 12: If it is a distributed installation, install the official website documentation, and then perform a series of configurations on another machine as a compute node. However, in a single-node installation, the COMPUTE node configuration is continued directly on the controller's machine.

Installation: Apt-get Install Nova-compute

Step 13: Open/etc/nova/nova.conf again to modify

In the official website installation document, the [VNC] paragraph in the compute node nova.conf file reads as follows

[VNC]

Enabled = True
Vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my _ip
Novncproxy_base_url = http://controller:6080/vnc_auto.html

And in step 9, we've written [VNC]

[VNC]
Vncserver_listen = $my _ip
vncserver_proxyclient_address = $my _ip

As you can see, the Vncserver_listen values in the two configurations are different, so I finally wrote [VNC] like this:

[VNC]
#vncserver_listen = $my _ip
vncserver_proxyclient_address = $my _ip
Enabled = True
Vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my _ip
Novncproxy_base_url = http://controller:6080/vnc_auto.html


Continue, add glance paragraph

[Glance]
Api_servers = http://controller:9292

Step 14: Test whether the machine can support virtual machine hardware acceleration, Run command egrep-c ' (VMX|SVM) '/proc/cpuinfo, return value greater than 0 do nothing, conversely, in the/etc/nova/nova-compute.conf file [ Libvirt] Set virt_type = QEMU;

Step 15: Restart Service Nova-compute restart

Step 16: Verify that the Admin user runs the OpenStack Compute Service list, which displays the following information. Note that Zopen is the hostname of the host where my controller resides. Because it is a single point of installation, the following four services are shown running on Zopen host.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.