OpenStack kilo版 Nova部署

部署在controller和compute节点

配置数据库

MariaDB [(none)]> CREATE DATABASE nova;?
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';? ? ? ?
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'127.0.0.1' IDENTIFIED BY 'nova';
Query OK, 0 rows affected (0.00 sec

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

配置Nova服务认证

创建nova用户:

[email protected]:~# openstack user create --password-prompt nova
User Password:nova
Repeat User Password:nova
+----------+----------------------------------+
| Field? ? | Value? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+----------+----------------------------------+
| email? ? | None? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| enabled? | True? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| id? ? ? ?| 7b2efefe960f434f8119491deee1ef17 |
| name? ? ?| nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| username | nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
+----------+----------------------------------+

将admin角色添加给nova用户:

[email protected]:~# openstack role add --project service --user nova admin
+-------+----------------------------------+
| Field | Value? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+-------+----------------------------------+
| id? ? | 6d814860fbae4b9eb46c5e33835ba2a1 |
| name? | admin? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+-------+----------------------------------+

创建nova的服务实体:

[email protected]:~# openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field? ? ? ?| Value? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+-------------+----------------------------------+
| description | OpenStack Compute? ? ? ? ? ? ? ? |
| enabled? ? ?| True? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| id? ? ? ? ? | 58a99c547ee348339166a07ca9bb7b2c |
| name? ? ? ? | nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| type? ? ? ? | compute? ? ? ? ? ? ? ? ? ? ? ? ? |
+-------------+----------------------------------+

创建计算服务的API endpoint:

[email protected]:~# 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
+--------------+-----------------------------------------+
| Field? ? ? ? | Value? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
+--------------+-----------------------------------------+
| adminurl? ? ?| http://controller:8774/v2/%(tenant_id)s |
| id? ? ? ? ? ?| 8adca9694c1648bd8ef703ae2330f1c8? ? ? ? |
| internalurl? | http://controller:8774/v2/%(tenant_id)s |
| publicurl? ? | http://controller:8774/v2/%(tenant_id)s |
| region? ? ? ?| RegionOne? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| service_id? ?| 58a99c547ee348339166a07ca9bb7b2c? ? ? ? |
| service_name | nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| service_type | compute? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
+--------------+-----------------------------------------+
[email protected]:~# openstack service create --name nova --description "OpenStack Compute" computev3
+-------------+----------------------------------+
| Field? ? ? ?| Value? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+-------------+----------------------------------+
| description | OpenStack Compute? ? ? ? ? ? ? ? |
| enabled? ? ?| True? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| id? ? ? ? ? | 815f72af9d224da285fcf1ff3928bf66 |
| name? ? ? ? | nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| type? ? ? ? | computev3? ? ? ? ? ? ? ? ? ? ? ? |
+-------------+----------------------------------+
[email protected]:~# openstack endpoint create --publicurl http://controller:8774/v3 --internalurl http://controller:8774/v3 --adminurl http://controller:8774/v3 --region RegionOne computev3
+--------------+----------------------------------+
| Field? ? ? ? | Value? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+--------------+----------------------------------+
| adminurl? ? ?| http://controller:8774/v3? ? ? ? |
| id? ? ? ? ? ?| 7560a3156fef4a4c9d2e94495638dd61 |
| internalurl? | http://controller:8774/v3? ? ? ? |
| publicurl? ? | http://controller:8774/v3? ? ? ? |
| region? ? ? ?| RegionOne? ? ? ? ? ? ? ? ? ? ? ? |
| service_id? ?| 815f72af9d224da285fcf1ff3928bf66 |
| service_name | nova? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| service_type | computev3? ? ? ? ? ? ? ? ? ? ? ? |
+--------------+----------------------------------+

安装nova server

controller节点部署

[email protected]:~# apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient

配置nova

配置/etc/nova/nova.conf?:

#[DEFAULT]部分,添加以下配置
[DEFAULT]
logdir=/var/log/nova
verbose=True
rpc_backend = rabbit
auth_strategy= keystone
#controller节点管理网络的ip地址
my_ip= 192.168.1.200
#配置VNC代理以使用控制节点的管理IP地址
vncserver_listen =192.168.1.200
vncserver_proxyclient_address =192.168.1.200

#数据库连接
[database]
connection= mysql://nova:[email protected]/nova

#RabbitMQ消息队列
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack

#身份认证服务
[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

#配置镜像服务的位置
[glance]
host = controller

#配置锁路径
[oslo_concurrency]
lock_path = /var/lib/nova/tmp

#v3api
[osapi_v3]
enabled = true

配置初始化数据库:

[email protected]:~# su -s /bin/sh -c "nova-manage db sync" nova

重启服务:

[email protected]:~# service nova-api restart
nova-api stop/waiting
nova-api start/running, process 30242

[email protected]:~# service nova-cert restart
nova-cert stop/waiting
nova-cert start/running, process 30279

[email protected]:~# service nova-consoleauth restart
nova-consoleauth stop/waiting
nova-consoleauth start/running, process 30305

[email protected]:~# service nova-scheduler restart
nova-scheduler stop/waiting
nova-scheduler start/running, process 30330

[email protected]:~# service nova-conductor restart
nova-conductor stop/waiting
nova-conductor start/running, process 30358

[email protected]:~# service nova-novncproxy restart
nova-novncproxy stop/waiting
nova-novncproxy start/running, process 30389
[email protected]:~# rm -f /var/lib/nova/nova.sqlite

安装nova-compute

compute节点:

[email protected]:~# apt-get install nova-compute sysfsutils

配置nova-compute

配置/etc/nova/nova.conf?:

#[DEFAULT]部分,添加以下配置
[DEFAULT]
resume_guests_state_on_host_boot = true
running_deleted_instance_action = log
until_refresh = 5
max_age = 86400
rpc_backend = rabbit
auth_strategy = keystone
#compute节点管理网络的ip地址
my_ip = 192.168.31.21
#配置VNC代理以启用远程终端的访问
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.31.21
novncproxy_base_url = http://controller:6080/vnc_auto.html

#RabbitMQ消息队列
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack

#身份认证服务
[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

#配置镜像服务
[glance]?
host = controller

#配置锁路径
[oslo_concurrency]
lock_path = /var/lib/nova/tmp

重启计算服务:

[email protected]:~#?service nova-compute restart
nova-compute stop/waiting
nova-compute start/running, process 1952

删除ubuntu默认创建的SQLite数据库:

[email protected]:~#?rm -f /var/lib/nova/nova.sqlite

校验安装

[email protected]:~# nova?service-list?
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary? ? ? ? ? ?| Host? ? ? ?| Zone? ? ?| Status? | State | Updated_at? ? ? ? ? ? ? ? ?| Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1? | nova-cert? ? ? ? | controller | internal | enabled | up? ? | 2019-08-16T10:28:51.000000 | -? ? ? ? ? ? ? ?|
| 2? | nova-consoleauth | controller | internal | enabled | up? ? | 2019-08-16T10:28:51.000000 | -? ? ? ? ? ? ? ?|
| 3? | nova-scheduler? ?| controller | internal | enabled | up? ? | 2019-08-16T10:28:51.000000 | -? ? ? ? ? ? ? ?|
| 4? | nova-conductor? ?| controller | internal | enabled | up? ? | 2019-08-16T10:28:46.000000 | -? ? ? ? ? ? ? ?|
| 6? | nova-compute? ? ?| compute1? ?| nova? ? ?| enabled | up? ? | 2019-08-16T10:28:47.000000 | -? ? ? ? ? ? ? ?|
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

原文地址:https://www.cnblogs.com/wshenjin/p/11365928.html

时间: 2024-10-24 03:10:10

OpenStack kilo版 Nova部署的相关文章

OpenStack kilo版 Neutron部署

在 controller节点.network节点.compute节点部署 安装neutron-server [email protected]:~# apt-get install neutron-server neutron-plugin-ml2 python-neutronclient 配置neutron-server /etc/neutron/neutron.conf: [DEFAULT] router_distributed = False rpc_backend = rabbit au

OpenStack kilo版 keystone部署

部署在controller节点 配置数据库 MariaDB [(none)]> CREATE DATABASE keystone; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone'; Query OK, 0 rows affected (0.00 sec) MariaDB [(non

OpenStack kilo版 Glance部署

部署在controller节点 配置数据库 MariaDB [(none)]> CREATE DATABASE glance; Query OK, 1 row affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';? ? ? ? Query OK, 0 rows affected (0.00 sec) MariaDB [(none

OpenStack Kilo版加CEPH部署手册

OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.com/s__biz=MzAxOTAzMDEwMA==&mid=209225237&idx=1&sn=357afdabafc03e8fb75eb4e1fb9d4bf9&scene=5&ptlang=2052&ADUIN=724042315&ADSESSION

OpenStack kilo版 部署环境

虚拟机网络规划 管理网络: eth0, nat 192.168.31.0/24 外部网络: eth1, host only 192.168.32.0/24 数据网络: eth2, lan 192.168.33.0/24 节点规划 controller: 管理网络:eth0 192.168.31.10 外部网络:eth1 192.168.32.10 network: 管理网络:eth0 192.168.31.11 外部网络:eth1 192.168.32.11 数据网络:eth2 192.168.

OpenStack 计算服务 Nova部署(七)

介绍 Nova是openstack最早的两块模块之一,另一个是对象存储swift.在openstack体系中一个叫做计算节点,一个叫做控制节点.这个主要和nova相关,我们把安装为计算节点nova-compute,把除了nova-compute叫做控制节点.nova-compute是创建虚拟机的,只是创建虚拟机,所有的控制都在另一台上. nova组件(服务) API:负责接受和响应外部请求.支持OpenStack API,EC2 API Cert:负责身份认证EC2 Scheduler:用于云主

OpenStack kilo版(6) 启动第一台虚拟机

创建网络 提供者为external,类型为fla,网络名称为public,: [email protected]:~# neutron net-create --shared --provider:physical_network external? --provider:network_type flat public Created a new network: +---------------------------+------------------------------------

openstack【Kilo】汇总:包括20英文文档、各个组件新增功能及Kilo版部署

OpenStack Kilo版本发布 20英文文档OpenStack Kilo版本文档汇总:各个操作系统安装部署.配置文档.用户指南等文档 Kilo版部署 openstack[Kilo]入门 [准备篇]零:整体介绍 openstack[Kilo]入门 [准备篇]一: Ubuntu14.04远程连接(ssh安装) openstack[Kilo]入门 [准备篇]二:NTP安装 openstack[Kilo]入门 [准备篇]三:mysql(MariaDB)安装[控制节点] openstack[Kilo

OpenStack(kilo版本)计算服务Nova的安装部署

OpenStack计算服务是基础设施即服务(IaaS)系统的主要组成部分.OpenStack计算服务使用Keystone来执行其身份验证,使用Horizon作为其管理接口,并使用Glance提供其镜像服务. 一.OpenStack 计算服务包含的组件 图1.1. OpenStack Nova组件 二.OpenStack计算节点基本环境配置 1.配置主机名和网络信息1.1配置主机名 [email protected]:~# vim /etc/hostname compute1 1.2 配置IP地址