控制节点

Before you install and configure the Compute service, you must create a database, service credentials, and API endpoint.

一、创建nova数据库并授权

1.登陆数据库

mysql -u root -p

2.创建数据库并授权

CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';

Replace NOVA_DBPASS with a suitable password.

Source the admin credentials to gain access to admin-only CLI commands:

source admin-openrc.sh

3.To create the service credentials, complete these steps:

Create the nova user:

openstack user create --password-prompt nova

Add the admin role to the nova user:

openstack role add --project service --user nova admin

Create the nova service entity:

openstack service create --name nova \
--description "OpenStack Compute" compute

4.Create the Compute service API endpoint:

openstack endpoint create \
--publicurl http://controller:8774/v2/%\(tenant_id\)s \
--internalurl http://controller:8774/v2/%\(tenant_id\)s \
--adminurl http://controller:8774/v2/%\(tenant_id\)s \
--region RegionOne \
compute

二、To install and configure Compute controller components

1.Install the packages:

yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor \
openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler \
python-novaclient

2.Edit the /etc/nova/nova.conf file and complete the following actions:

Add a [database] section, and configure database access:

[database]
...
connection = mysql://nova:NOVA_DBPASS@controller/nova

Replace NOVA_DBPASS with the password you chose for the Compute database.

In the [DEFAULT] and [oslo_messaging_rabbit] sections, configure RabbitMQ message queue access:

[DEFAULT]
...
rpc_backend = rabbit [oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS

Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.

In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:

[DEFAULT]
...
auth_strategy = keystone [keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = NOVA_PASS

Replace NOVA_PASS with the password you chose for the nova user in the Identity service.

注意:Comment out or remove any other options in the [keystone_authtoken] section.

In the [DEFAULT] section, configure the my_ip option to use the management interface IP address of the controller node:

[DEFAULT]
...
my_ip = 10.0.0.11

In the [DEFAULT] section, configure the VNC proxy to use the management interface IP address of the controller node:

[DEFAULT]
...
vncserver_listen = 10.0.0.11
vncserver_proxyclient_address = 10.0.0.11

In the [glance] section, configure the location of the Image service:

[glance]
...
host = controller

In the [oslo_concurrency] section, configure the lock path:

[oslo_concurrency]
...
lock_path = /var/lib/nova/tmp

(Optional) To assist with troubleshooting, enable verbose logging in the [DEFAULT] section:

[DEFAULT]
...
verbose = True

3.Populate the Compute database:

su -s /bin/sh -c "nova-manage db sync" nova

To finalize installation

Start the Compute services and configure them to start when the system boots:

systemctl enable openstack-nova-api.service openstack-nova-cert.service \
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service
systemctl start openstack-nova-api.service openstack-nova-cert.service \
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service

最新文章

  1. Android中,Context,什么是Context?
  2. RBAC权限设计
  3. 简介C#读取XML的两种方式
  4. Storyboard 跳转 和 传值
  5. (四)java程序基本组成
  6. Android 关于HttpClient上传中文乱码的解决办法
  7. Linux动态库的编译与使用
  8. 整理iOS开发常用的第三方资源
  9. ubuntu如何实现访问实际网络中windows共享文件夹
  10. backBarButtonItem无效
  11. Day01 Java环境变量配置
  12. spring boot系列03--spring security (基于数据库)登录和权限控制(下)
  13. 1095 A+B for Input-Output Practice (VII)
  14. 欧拉筛法模板and 洛谷 P3383 【模板】线性筛素数(包括清北的一些方法)
  15. 解决修改css或js文件后,浏览器缓存未更新问题
  16. 1.介绍(introduction)
  17. 前端 - js方式Ajax/ jquery方式Ajax / 伪 ajax /伪ajax 进阶方式
  18. css3整理--Animation
  19. php-fpm慢日志配置
  20. 第一次项目上Linux服务器(五:CentOS7下Mysql数据库的安装与配置(转))

热门文章

  1. 转:java中数组与List相互转换的方法
  2. webDriver API——第15部分Expected conditions Support
  3. Zoho CEO:云计算泡沫巨大 Salesforce仅仅是新的Siebel
  4. C# 之 FTPserver中文件上传与下载(二)
  5. 10-hibernate单表操作-组件属性
  6. Hibernate 入门示例
  7. JavaScript-深入理解JavaScript(一、预编译和执行过程)
  8. 关于spring中<context:component-scan base-package="" />写法
  9. 基于easyui fom分组插件
  10. Nginx常用配置整理