openstack

OpenStack系列之一:手动部署OpenStack Quee

2019-02-23  本文已影响0人  小六的昵称已被使用

title: OpenStack系列之一:手动部署OpenStack Queens(4.计算服务)
categories: Linux
tags:
- OpenStack
timezone: Asia/Shanghai
date: 2019-01-21


计算服务概览

使用OpenStack计算服务来托管和管理云计算系统。OpenStack计算服务是基础设施即服务(IaaS)系统的主要部分,模块主要由Python实现。

OpenStack计算组件请求OpenStack Identity服务进行认证;请求OpenStack Image服务提供磁盘镜像;为OpenStack dashboard提供用户与管理员接口。磁盘镜像访问限制在项目与用户上;配额以每个项目进行设定(例如,每个项目下可以创建多少实例)。OpenStack组件可以在标准硬件上水平大规模扩展,并且下载磁盘镜像启动虚拟机实例。

OpenStack计算服务由下列组件所构成:

过程是蛮复杂的。最为基本的,守护进程同意了来自队列的动作请求,转换为一系列的系统命令如启动一个KVM实例,然后,到数据库中更新它的状态。

理论上,OpenStack计算可以支持任何和SQL-Alchemy所支持的后端数据库,通常使用SQLite3来做测试可开发工作,MySQL和PostgreSQL 作生产环境。

第一步:安装并配置控制节点(控制节点)

这个部分将描述如何在控制节点上安装和配置 Compute 服务,即 nova。

1.先决条件

在安装和配置 Compute 服务前,你必须创建数据库服务的凭据以及 API endpoints。

以下有6处xiaoliu,请根据实际情况更改

# 用数据库连接客户端以 root 用户连接到数据库服务器:
mysql -u root -p

# 2.创建 nova_api 和 nova 数据库:
CREATE DATABASE nova_api;
CREATE DATABASE nova;
CREATE DATABASE nova_cell0;

# 3.对数据库进行正确的授权:

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'xiaoliu';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'xiaoliu';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'xiaoliu';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'xiaoliu';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'xiaoliu';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'xiaoliu';
source /home/admin-openrc
echo $OS_USERNAME
# 1.创建 nova 用户:
openstack user create --domain default --password-prompt nova

# 2.给 nova 用户添加 admin 角色(这个命令执行后没有输出):
openstack role add --project service --user nova admin

# 3.创建 nova 服务实体:
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
openstack user create --domain default --password-prompt placement
openstack role add --project service --user placement admin
openstack service create --name placement --description "Placement API" placement
openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778
[root@controller html]# source /home/admin-openrc
[root@controller html]# echo $OS_USERNAME
admin
[root@controller html]# openstack user create --domain default --password-prompt nova
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 08eb041c35cf45fb85d69ad8a256e054 |
| name                | nova                             |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
[root@controller html]# openstack role add --project service --user nova admin
[root@controller html]# openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 20972a76b318429ea55e9e8b52a90632 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 938cac58c5ef433faf2da39e853e5e39 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 20972a76b318429ea55e9e8b52a90632 |
| service_name | nova                             |
| service_type | compute                          |
| url          | http://controller:8774/v2.1      |
+--------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 4f991b08697f41ba819f124e98bebd12 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 20972a76b318429ea55e9e8b52a90632 |
| service_name | nova                             |
| service_type | compute                          |
| url          | http://controller:8774/v2.1      |
+--------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | d15364459e214fc8bb199f388c857463 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 20972a76b318429ea55e9e8b52a90632 |
| service_name | nova                             |
| service_type | compute                          |
| url          | http://controller:8774/v2.1      |
+--------------+----------------------------------+
[root@controller html]# openstack user create --domain default --password-prompt placement
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | b6e431f29b8a4849a27d2651903cfde2 |
| name                | placement                        |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
[root@controller html]# openstack role add --project service --user placement admin
[root@controller html]# openstack service create --name placement --description "Placement API" placement
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Placement API                    |
| enabled     | True                             |
| id          | 617e334646ab4b099a2702b643d8c900 |
| name        | placement                        |
| type        | placement                        |
+-------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne placement public http://controller:8778
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 541b4dbee64b4b948b84aaba21f70e1c |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 617e334646ab4b099a2702b643d8c900 |
| service_name | placement                        |
| service_type | placement                        |
| url          | http://controller:8778           |
+--------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne placement internal http://controller:8778
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 604dd6ee7ef54e4e855d7d8688af0d18 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 617e334646ab4b099a2702b643d8c900 |
| service_name | placement                        |
| service_type | placement                        |
| url          | http://controller:8778           |
+--------------+----------------------------------+
[root@controller html]# openstack endpoint create --region RegionOne placement admin http://controller:8778
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 0bac998fd8ae45bb91787a08226883a5 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 617e334646ab4b099a2702b643d8c900 |
| service_name | placement                        |
| service_type | placement                        |
| url          | http://controller:8778           |
+--------------+----------------------------------+

2.安全并配置组件

默认配置文件在各发行版本中可能不同。你可能需要添加这些部分,选项而不是修改已经存在的部分和选项。另外,在配置片段中的省略号(...)表示默认的配置选项你应该保留。

yum install -y openstack-nova-api openstack-nova-conductor \
                openstack-nova-console openstack-nova-novncproxy \
                openstack-nova-scheduler openstack-nova-placement-api

以下有4处xiaoliu,请根据自己实际情况更改

以下有一处IP地址为控制端IP地址,请根据自己实际情况更改

cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
cat /etc/nova/nova.conf.bak | grep -v "^#" | grep -v '^$' > /etc/nova/nova.conf
vim /etc/nova/nova.conf

# 1.在``[DEFAULT]``部分,只启用计算和元数据API:
[DEFAULT]
# ...
enabled_apis = osapi_compute,metadata

# 2.在``[api_database]``和``[database]``部分,配置数据库的连接:
# 用你为 Compute 数据库选择的密码来代替 NOVA_DBPASS。
[api_database]
# ...
connection = mysql+pymysql://nova:xiaoliu@controller/nova_api

[database]
# ...
connection = mysql+pymysql://nova:xiaoliu@controller/nova

# 3.在 “[DEFAULT]” 和 “[oslo_messaging_rabbit]”部分,配置 “RabbitMQ” 消息队列访问:
# 用你在 “RabbitMQ” 中为 “openstack” 选择的密码替换 “RABBIT_PASS”。
[DEFAULT]
# ...
transport_url = rabbit://openstack:xiaoliu@controller

# 4.在 “[api]” 和 “[keystone_authtoken]” 部分,配置认证服务访问:
# 使用你在身份认证服务中设置的``nova`` 用户的密码替换``NOVA_PASS``。
[api]
# ...
auth_strategy = keystone

[keystone_authtoken]
# ...
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = xiaoliu

# 5.在 [DEFAULT 部分,配置``my_ip`` 来使用控制节点的管理接口的IP 地址。
[DEFAULT]
...
my_ip = 10.0.1.61

# 6.在 [DEFAULT] 部分,使能 Networking 服务:
# 默认情况下,计算服务使用内置的防火墙服务。
# 由于网络服务包含了防火墙服务,
# 你必须使用``nova.virt.firewall.NoopFirewallDriver``防火墙服务来禁用掉计算服务内置的防火墙服务
[DEFAULT]
...
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

# 7.在``[vnc]``部分,配置VNC代理使用控制节点的管理接口IP地址 :
[vnc]
enabled = true
# ...
server_listen = $my_ip
server_proxyclient_address = $my_ip

# 8.在 [glance] 区域,配置镜像服务 API 的位置:
[glance]
# ...
api_servers = http://controller:9292

# 9.在 [oslo_concurrency] 部分,配置锁路径:
[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp

# 10.在该[placement]部分中,配置Placement API:
[placement]
# ...
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = xiaoliu

# 11.由于打包错误,您必须通过将以下配置添加到以下内容来启用对Placement API的访问

vim /etc/httpd/conf.d/00-nova-placement-api.conf
<Directory /usr/bin>
   <IfVersion >= 2.4>
      Require all granted
   </IfVersion>
   <IfVersion < 2.4>
      Order allow,deny
      Allow from all
   </IfVersion>
</Directory>

# Restart the httpd service:
systemctl restart httpd
systemctl status httpd
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
su -s /bin/sh -c "nova-manage db sync" nova
nova-manage cell_v2 list_cells
[root@controller html]# su -s /bin/sh -c "nova-manage api_db sync" nova
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning

[root@controller html]# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning

[root@controller html]# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning
48e8e55e-7b55-40f6-84bb-e1acc878140c

[root@controller html]# su -s /bin/sh -c "nova-manage db sync" nova
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning
/usr/lib/python2.7/site-packages/pymysql/cursors.py:166: Warning: (1831, u'Duplicate index `block_device_mapping_instance_uuid_virtual_name_device_name_idx`. This is deprecated and will be disallowed in a future release.')
  result = self._query(query)
/usr/lib/python2.7/site-packages/pymysql/cursors.py:166: Warning: (1831, u'Duplicate index `uniq_instances0uuid`. This is deprecated and will be disallowed in a future release.')
  result = self._query(query)

[root@controller html]# nova-manage cell_v2 list_cells
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning
+-------+--------------------------------------+------------------------------------+-------------------------------------------------+
|  名称 |                 UUID                 |           Transport URL            |                    数据库连接                   |
+-------+--------------------------------------+------------------------------------+-------------------------------------------------+
| cell0 | 00000000-0000-0000-0000-000000000000 |               none:/               | mysql+pymysql://nova:****@controller/nova_cell0 |
| cell1 | 48e8e55e-7b55-40f6-84bb-e1acc878140c | rabbit://openstack:****@controller |    mysql+pymysql://nova:****@controller/nova    |
+-------+--------------------------------------+------------------------------------+-------------------------------------------------+
# 应该有110张表
mysql -uroot -p'xiaoliu' -D nova -se "show tables"
mysql -uroot -p'xiaoliu' -D nova -se "show tables" | wc -l

# 应该有32张表
mysql -uroot -p'xiaoliu' -D nova_api -se "show tables"
mysql -uroot -p'xiaoliu' -D nova_api -se "show tables" | wc -l

mysql -uroot -p'xiaoliu' -D nova_cell0 -se "show tables"
mysql -uroot -p'xiaoliu' -D nova_cell0 -se "show tables" | wc -l

3.完成安装:启动 Compute 服务并将其设置为随系统启动

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

systemctl stop openstack-nova-api.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-consoleauth.service openstack-nova-scheduler.service \
                    openstack-nova-conductor.service openstack-nova-novncproxy.service

systemctl status openstack-nova-api.service \
                    openstack-nova-consoleauth.service openstack-nova-scheduler.service \
                    openstack-nova-conductor.service openstack-nova-novncproxy.service

第二步:安装和配置计算节点(计算节点)

该服务支持多个虚拟机管理程序来部署实例或虚拟机(VM)。为简单起见,此配置使用Quick EMUlator(QEMU)虚拟机管理程序和支持虚拟机硬件加速的计算节点上的基于内核的VM(KVM)扩展。在传统硬件上,此配置使用通用QEMU管理程序。您可以通过稍作修改来遵循这些说明,以使用其他计算节点水平扩展您的环境。

1.启用OpenStack库

在CentOS中, extras仓库提供用于启用 OpenStack 仓库的RPM包。 CentOS 默认启用extras仓库,因此你可以直接安装用于启用OpenStack仓库的包。

# 如果更新了一个新内核,重启主机来使用新内核。
yum repolist
yum install -y centos-release-openstack-queens
yum upgrade -y

2.安全并配置组件

yum install -y openstack-nova-compute

以下有两处xiaoliu, 请根据自己实际情况修改

以下有六处controller,请根据自己实际情况修改

cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
cat /etc/nova/nova.conf.bak | grep -v "^#" | grep -v '^$' > /etc/nova/nova.conf
vim /etc/nova/nova.conf

# 1.在该[DEFAULT]部分中,仅启用计算和元数据API:
# 在该[DEFAULT]部分中,配置RabbitMQ消息队列访问:
[DEFAULT]
# ...
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:xiaoliu@controller

# 2.在[api]和[keystone_authtoken]部分中,配置身份服务访问:
# 注释掉或删除该[keystone_authtoken] 部分中的任何其他选项。
[api]
# ...
auth_strategy = keystone

[keystone_authtoken]
# ...
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = xiaoliu

# 3.在该[DEFAULT]部分中,配置my_ip选项:
# 替换MANAGEMENT_INTERFACE_IP_ADDRESS为计算节点上管理网络接口的IP地址
[DEFAULT]
# ...
my_ip = 10.0.1.62

# 4.在该[DEFAULT]部分中,启用对网络服务的支持:
# 默认情况下,Compute使用内部防火墙服务。由于Networking包含防火墙服务
# 因此必须使用nova.virt.firewall.NoopFirewallDriver防火墙驱动程序禁用Compute防火墙服务。
[DEFAULT]
# ...
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

# 5.在该[vnc]部分中,启用并配置远程控制台访问:
# 如果要访问远程控制台的Web浏览器驻留在无法解析controller主机名的主机上
# 则必须controller使用控制器节点的管理接口IP地址替换 
[vnc]
# ...
enabled = True
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html

# 6.在该[glance]部分中,配置Image服务API的位置:
[glance]
# ...
api_servers = http://controller:9292

# 7.在该[oslo_concurrency]部分中,配置锁定路径:
[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp

# 8.在该[placement]部分中,配置Placement API:
# 注释掉该[placement]部分中的任何其他选项。
[placement]
# ...
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = xiaoliu

3.完成安装

egrep -c '(vmx|svm)' /proc/cpuinfo

# 如果这个命令返回了 one or greater 的值,那么你的计算节点支持硬件加速且不需要额外的配置。
# 如果这个命令返回了 zero 值,那么你的计算节点不支持硬件加速。你必须配置 libvirt 来使用 QEMU 去代替 KVM
# 在 /etc/nova/nova.conf 文件的 [libvirt] 区域做出如下的编辑:
[libvirt]
...
virt_type = qemu
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl stop libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
systemctl status libvirtd.service openstack-nova-compute.service

第三步:将计算节点添加到单元数据库(控制节点)

# 获取管理员凭据以启用仅管理员CLI命令,然后确认数据库中是否存在计算主机:
source /home/admin-openrc
echo $OS_USERNAME
openstack compute service list --service nova-compute

# 发现计算主机:
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

# 输出结果展示:
[root@controller html]# source /home/admin-openrc

[root@controller html]# echo $OS_USERNAME
admin

[root@controller html]# openstack compute service list --service nova-compute
+----+--------------+----------+------+---------+-------+----------------------------+
| ID | Binary       | Host     | Zone | Status  | State | Updated At                 |
+----+--------------+----------+------+---------+-------+----------------------------+
|  6 | nova-compute | compute1 | nova | enabled | up    | 2019-01-20T13:58:26.000000 |
+----+--------------+----------+------+---------+-------+----------------------------+

[root@controller html]# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'cell1': 48e8e55e-7b55-40f6-84bb-e1acc878140c
Checking host mapping for compute host 'compute1': a42100e8-83de-4500-b22a-831d3f6de399
Creating host mapping for compute host 'compute1': a42100e8-83de-4500-b22a-831d3f6de399
Found 1 unmapped computes in cell: 48e8e55e-7b55-40f6-84bb-e1acc878140c

注意:

添加新计算节点时,必须在控制器节点上运行以注册这些新计算节点。或者,您可以在以下位置设置适当的间隔

When you add new compute nodes, you must run nova-manage cell_v2 discover_hosts on the controller node to register those new compute nodes. Alternatively, you can set an appropriate interval in /etc/nova/nova.conf:

vim /etc/nova/nova.conf
[scheduler] 
discover_hosts_in_cells_interval  =  300

第四步:验证操作(在控制器节点上执行这些命令)

验证Compute服务的运行。

1.来源admin凭据来访问仅管理员CLI命令:

source /home/admin-openrc
echo $OS_USERNAME

2.列出服务组件以验证每个进程的成功启动和注册:

此输出应指示控制器节点上启用的三个服务组件以及计算节点上启用的一个服务组件。

openstack compute service list

[root@controller html]# openstack compute service list
+----+------------------+------------+----------+---------+-------+----------------------------+
| ID | Binary           | Host       | Zone     | Status  | State | Updated At                 |
+----+------------------+------------+----------+---------+-------+----------------------------+
|  1 | nova-consoleauth | controller | internal | enabled | up    | 2019-01-20T13:59:49.000000 |
|  2 | nova-conductor   | controller | internal | enabled | up    | 2019-01-20T13:59:49.000000 |
|  3 | nova-scheduler   | controller | internal | enabled | up    | 2019-01-20T13:59:49.000000 |
|  6 | nova-compute     | compute1   | nova     | enabled | up    | 2019-01-20T13:59:56.000000 |
+----+------------------+------------+----------+---------+-------+----------------------------+

3.列出Identity服务中的API端点以验证与Identity服务的连接:

端点列表可能会有所不同,具体取决于OpenStack组件的安装。

忽略此输出中的任何警告。

openstack catalog list

[root@controller html]# openstack catalog list
+-----------+-----------+-----------------------------------------+
| Name      | Type      | Endpoints                               |
+-----------+-----------+-----------------------------------------+
| keystone  | identity  | RegionOne                               |
|           |           |   admin: http://controller:5000/v3/     |
|           |           | RegionOne                               |
|           |           |   internal: http://controller:5000/v3/  |
|           |           | RegionOne                               |
|           |           |   public: http://controller:5000/v3/    |
|           |           |                                         |
| nova      | compute   | RegionOne                               |
|           |           |   internal: http://controller:8774/v2.1 |
|           |           | RegionOne                               |
|           |           |   public: http://controller:8774/v2.1   |
|           |           | RegionOne                               |
|           |           |   admin: http://controller:8774/v2.1    |
|           |           |                                         |
| glance    | image     | RegionOne                               |
|           |           |   internal: http://controller:9292      |
|           |           | RegionOne                               |
|           |           |   public: http://controller:9292        |
|           |           | RegionOne                               |
|           |           |   admin: http://controller:9292         |
|           |           |                                         |
| placement | placement | RegionOne                               |
|           |           |   admin: http://controller:8778         |
|           |           | RegionOne                               |
|           |           |   public: http://controller:8778        |
|           |           | RegionOne                               |
|           |           |   internal: http://controller:8778      |
|           |           |                                         |
+-----------+-----------+-----------------------------------------+

4.列出Image服务中的图像以验证与Image服务的连接:

openstack image list

[root@controller html]# openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 6cc21209-0d33-477c-a37e-eeed6b34f3ad | cirros | active |
+--------------------------------------+--------+--------+

5.检查单元格和放置API是否成功运行:

nova-status upgrade check

[root@controller ~]# nova-status upgrade check
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
  exception.NotSupportedWarning
Option "os_region_name" from group "placement" is deprecated. Use option "region-name" from group "placement".
+-------------------------------+
| 升级检查结果                  |
+-------------------------------+
| 检查: Cells v2                |
| 结果: 成功                    |
| 详情: None                    |
+-------------------------------+
| 检查: Placement API           |
| 结果: 成功                    |
| 详情: None                    |
+-------------------------------+
| 检查: Resource Providers      |
| 结果: 成功                    |
| 详情: None                    |
+-------------------------------+
| 检查: Ironic Flavor Migration |
| 结果: 成功                    |
| 详情: None                    |
+-------------------------------+
| 检查: API Service Version     |
| 结果: 成功                    |
| 详情: None                    |
+-------------------------------+
上一篇下一篇

猜你喜欢

热点阅读