openstack安装newton版本Nova部署(三)
一、控制节点安装部署Nova
Nova 包含API(负责接收相应外部请求,支持OpenStackAPI,EC2API);cert:负责身份认证;schedule:用于云主机调度(虚拟机创建在哪台主机上);conductor:计算节点访问数据中间件;consoleauth:用户控制台授权验证;novncproxy:vnc代理。
1、安装
[root@linux-node1 ~]#yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient -y
2、创建用户:
[root@linux-node1 ~]# openstack user create --domain default --password=nova nova
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | d21d0715890447fb87f72e85dce6d4be |
| enabled | True |
| id | 5fbc8074b56843b0a1cdb7d4730bb7fa |
| name | nova |
| password_expires_at | None |
+---------------------+----------------------------------+
[root@linux-node1 ~]# openstack role add --project service --user nova admin
3、修改nova的配置文件,配置结果如下
[root@linux-node1 ~]# vi /etc/nova/nova.conf
[database]
connection=mysql://nova:nova@172.22.0.218/nova
[api_database]
connection=mysql://nova:nova@172.22.0.218/nova
[xvp]
rpc_backend=rabbit
[oslo_messaging_rabbit]
rabbit_host=172.22.0.218
rabbit_port=
rabbit_userid=openstack
rabbit_password=openstack
[keystone_authtoken]
auth_uri = http://172.22.0.218:5000
auth_url = http://172.22.0.218:35357
auth_plugin = password
memcached_servers = 172.22.0.218:
project_domain_id = d21d0715890447fb87f72e85dce6d4be
user_domain_id = d21d0715890447fb87f72e85dce6d4be
project_name = service
username = nova
password = nova
[DEFAULT]
my_ip=172.22.0.218
auth_strategy=keystone
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis=osapi_compute,metadata
transport_url=rabbit://openstack:openstack@172.22.0.218
[vnc]
vncserver_listen=$my_ip
vncserver_proxyclient_address=$my_ip
[glance]
api_servers=http://172.22.0.218:9292
[oslo_concurrency]
lock_path=/var/lib/nova/tmp
[root@linux-node1 ~]# grep -n "^[a-Z]" /etc/nova/nova.conf
:auth_strategy=keystone
:use_neutron = True
:my_ip=172.22.0.218
:enabled_apis=osapi_compute,metadata
:firewall_driver = nova.virt.firewall.NoopFirewallDriver
:transport_url=rabbit://openstack:openstack@172.22.0.218
:rpc_backend=rabbit
:connection=mysql://nova:nova@172.22.0.218/nova
:api_servers=http://172.22.0.218:9292
:auth_uri = http://172.22.0.218:5000
:auth_url = http://172.22.0.218:35357
:auth_plugin = password
:memcached_servers = 172.22.0.218:
:project_domain_id = d21d0715890447fb87f72e85dce6d4be
:user_domain_id = d21d0715890447fb87f72e85dce6d4be
:project_name = service
:username = nova
:password = nova
:lock_path=/var/lib/nova/tmp
:rabbit_host=172.22.0.218
:rabbit_port=
:rabbit_userid=openstack
:rabbit_password=openstack
:vncserver_listen=$my_ip
:vncserver_proxyclient_address=$my_ip
4、数据库同步并检查:
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage db sync" nova
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
MariaDB [nova]> show tables;
+--------------------------------------------+
| Tables_in_nova |
+--------------------------------------------+
| agent_builds |
| aggregate_hosts |
| aggregate_metadata |
| aggregates |
| allocations |
| block_device_mapping |
| bw_usage_cache |
| cells |
| certificates |
| compute_nodes |
| console_auth_tokens |
| console_pools |
| consoles |
| dns_domains |
| fixed_ips |
| floating_ips |
| instance_actions |
| instance_actions_events |
| instance_extra |
| instance_faults |
| instance_group_member |
| instance_group_policy |
| instance_groups |
| instance_id_mappings |
| instance_info_caches |
| instance_metadata |
| instance_system_metadata |
| instance_type_extra_specs |
| instance_type_projects |
| instance_types |
| instances |
| inventories |
| key_pairs |
| migrate_version |
| migrations |
| networks |
| pci_devices |
| project_user_quotas |
| provider_fw_rules |
| quota_classes |
| quota_usages |
| quotas |
| reservations |
| resource_provider_aggregates |
| resource_providers |
| s3_images |
| security_group_default_rules |
| security_group_instance_association |
| security_group_rules |
| security_groups |
| services |
| shadow_agent_builds |
| shadow_aggregate_hosts |
| shadow_aggregate_metadata |
| shadow_aggregates |
| shadow_block_device_mapping |
| shadow_bw_usage_cache |
| shadow_cells |
| shadow_certificates |
| shadow_compute_nodes |
| shadow_console_pools |
| shadow_consoles |
| shadow_dns_domains |
| shadow_fixed_ips |
| shadow_floating_ips |
| shadow_instance_actions |
| shadow_instance_actions_events |
| shadow_instance_extra |
| shadow_instance_faults |
| shadow_instance_group_member |
| shadow_instance_group_policy |
| shadow_instance_groups |
| shadow_instance_id_mappings |
| shadow_instance_info_caches |
| shadow_instance_metadata |
| shadow_instance_system_metadata |
| shadow_instance_type_extra_specs |
| shadow_instance_type_projects |
| shadow_instance_types |
| shadow_instances |
| shadow_key_pairs |
| shadow_migrate_version |
| shadow_migrations |
| shadow_networks |
| shadow_pci_devices |
| shadow_project_user_quotas |
| shadow_provider_fw_rules |
| shadow_quota_classes |
| shadow_quota_usages |
| shadow_quotas |
| shadow_reservations |
| shadow_s3_images |
| shadow_security_group_default_rules |
| shadow_security_group_instance_association |
| shadow_security_group_rules |
| shadow_security_groups |
| shadow_services |
| shadow_snapshot_id_mappings |
| shadow_snapshots |
| shadow_task_log |
| shadow_virtual_interfaces |
| shadow_volume_id_mappings |
| shadow_volume_usage_cache |
| snapshot_id_mappings |
| snapshots |
| tags |
| task_log |
| virtual_interfaces |
| volume_id_mappings |
| volume_usage_cache |
+--------------------------------------------+
rows in set (0.01 sec)
二、启动Nova并注册:
1、开机启动
[root@linux-node1 ~]# 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
2、在keystone上注册nova,并检查控制节点的nova服务是否配置成功
[root@linux-node1 ~]# openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Compute |
| enabled | True |
| id | 6e8e777cc27c4459aebc35458961a910 |
| name | nova |
| type | compute |
+-------------+----------------------------------+
[root@linux-node1 ~]# openstack endpoint create --region RegionOne compute public http://172.22.0.218:8774/v2/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field | Value |
+--------------+-------------------------------------------+
| enabled | True |
| id | 0a71c8fd893647b690c7574ca73ed9b9 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6e8e777cc27c4459aebc35458961a910 |
| service_name | nova |
| service_type | compute |
| url | http://172.22.0.218:8774/v2/%(tenant_id)s |
+--------------+-------------------------------------------+
[root@linux-node1 ~]# openstack endpoint create --region RegionOne compute internal http://172.22.0.218:8774/v2/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field | Value |
+--------------+-------------------------------------------+
| enabled | True |
| id | 5e99985fb4b14c3286d373e0b18dc311 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6e8e777cc27c4459aebc35458961a910 |
| service_name | nova |
| service_type | compute |
| url | http://172.22.0.218:8774/v2/%(tenant_id)s |
+--------------+-------------------------------------------+
[root@linux-node1 ~]# openstack endpoint create --region RegionOne compute admin http://172.22.0.218:8774/v2/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field | Value |
+--------------+-------------------------------------------+
| enabled | True |
| id | d7b07484b2f4437388cd67eb1bccda47 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6e8e777cc27c4459aebc35458961a910 |
| service_name | nova |
| service_type | compute |
| url | http://172.22.0.218:8774/v2/%(tenant_id)s |
+--------------+-------------------------------------------+
[root@linux-node1 ~]# openstack host list +-------------+-------------+----------+
| Host Name | Service | Zone |
+-------------+-------------+----------+
| linux-node1 | conductor | internal |
| linux-node1 | consoleauth | internal |
| linux-node1 | cert | internal |
| linux-node1 | scheduler | internal |
三、计算节点环境准备
1、Nova compute 计算节点的安装部署
1)环境部署安装:
[root@linux-node2 ~]# yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
[root@linux-node2 ~]# yum install centos-release-openstack-newton -y
[root@linux-node2 ~]# yum install python-openstackclient -y
[root@linux-node2 ~]#yum install openstack-nova-compute sysfsutils -y
2)开始部署计算节点
更改计算节点上的配置文件,直接使用控制节点的配置文件
[root@linux-node1 ~]# scp /etc/nova/nova.conf 172.22.0.209:/etc/nova
过滤配置文件有些需要更改:
[root@linux-node2 ~]# grep -n '^[a-z]' /etc/nova/nova.conf
:auth_strategy=keystone
:use_neutron = True
:my_ip=172.22.0.209
:enabled_apis=osapi_compute,metadata
:firewall_driver = nova.virt.firewall.NoopFirewallDriver
:transport_url=rabbit://openstack:openstack@172.22.0.218
:rpc_backend=rabbit
:connection=mysql://nova:nova@172.22.0.218/nova
:connection=mysql://nova:nova@172.22.0.218/nova
:api_servers=http://172.22.0.218:9292
:auth_uri = http://172.22.0.218:5000
:auth_url = http://172.22.0.218:35357
:auth_plugin = password
:memcached_servers = 172.22.0.218:
:project_domain_id = d21d0715890447fb87f72e85dce6d4be
:user_domain_id = d21d0715890447fb87f72e85dce6d4be
:project_name = service
:username = nova
:password = nova
:virt_type=qemu
:lock_path=/var/lib/nova/tmp
:rabbit_host=172.22.0.218
:rabbit_port=
:rabbit_userid=openstack
:rabbit_password=openstack
:enabled=true
:keymap=en-us
:vncserver_listen=0.0.0.0
:vncserver_proxyclient_address=$my_ip
:novncproxy_base_url=http://172.22.0.218:6080/vnc_auto.html
3)启动计算节点的libvirt和nova-compute
[root@linux-node2 ~]# systemctl enable libvirtd openstack-nova-compute
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-nova-compute.service to /usr/lib/systemd/system/openstack-nova-compute.service.
[root@linux-node2 ~]# systemctl start libvirtd openstack-nova-compute
2、安装时间服务:
[root@linux-node2 ~]# yum install chrony -y
[root@linux-node2 ~]# cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 172.22.0.218 iburst
[root@linux-node2 ~]# timedatectl set-timezone Asia/Shanghai
[root@linux-node2 ~]# timedatectl status
Local time: Wed -- :: CST
Universal time: Tue -- :: UTC
RTC time: Tue -- ::
Time zone: Asia/Shanghai (CST, +)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
[root@linux-node2 ~]# systemctl enable chronyd.service
[root@linux-node2 ~]# systemctl start chronyd.service
[root@linux-node2 ~]# chronyc sources
Number of sources =
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? linux-node1 - +0ns[ +0ns] +/- 0ns
四、查看是否部署成功:
1、在控制节点中查看注册的host,最后一个compute即是注册的host
[root@linux-node1 ~]# openstack host list
+-------------+-------------+----------+
| Host Name | Service | Zone |
+-------------+-------------+----------+
| linux-node1 | conductor | internal |
| linux-node1 | consoleauth | internal |
| linux-node1 | cert | internal |
| linux-node1 | scheduler | internal |
| linux-node2 | compute | nova |
+-------------+-------------+----------+
2、在控制节点中测试nova和glance连接正常,nova链接keystone是否正常
[root@linux-node1 ~]# nova image-list
WARNING: Command image-list is deprecated and will be removed after Nova 15.0. is released. Use python-glanceclient or openstackclient instead.
+--------------------------------------+--------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+--------+--------+--------+
| 8f5837b4-bbec-4ef5-96f6-aba989c27206 | cirros | ACTIVE | |
+--------------------------------------+--------+--------+--------+
[root@linux-node1 ~]# nova endpoints
/usr/lib/python2./site-packages/novaclient/v2/shell.py:: UserWarning: nova endpoints is deprecated, use openstack catalog list instead
"nova endpoints is deprecated, use openstack catalog list instead")
WARNING: nova has no endpoint in ! Available endpoints for this service:
+-----------+--------------------------------------------------------------+
| nova | Value |
+-----------+--------------------------------------------------------------+
| id | 0a71c8fd893647b690c7574ca73ed9b9 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:8774/v2/503b0eab0420454e909a46e476bf1ede |
+-----------+--------------------------------------------------------------+
+-----------+--------------------------------------------------------------+
| nova | Value |
+-----------+--------------------------------------------------------------+
| id | 5e99985fb4b14c3286d373e0b18dc311 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:8774/v2/503b0eab0420454e909a46e476bf1ede |
+-----------+--------------------------------------------------------------+
+-----------+--------------------------------------------------------------+
| nova | Value |
+-----------+--------------------------------------------------------------+
| id | d7b07484b2f4437388cd67eb1bccda47 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:8774/v2/503b0eab0420454e909a46e476bf1ede |
+-----------+--------------------------------------------------------------+
WARNING: glance has no endpoint in ! Available endpoints for this service:
+-----------+----------------------------------+
| glance | Value |
+-----------+----------------------------------+
| id | 2646c93f3cda442fb062887f6c510343 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:9292 |
+-----------+----------------------------------+
+-----------+----------------------------------+
| glance | Value |
+-----------+----------------------------------+
| id | 5cc3112ed5944f04935805467ad36ec8 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:9292 |
+-----------+----------------------------------+
+-----------+----------------------------------+
| glance | Value |
+-----------+----------------------------------+
| id | af6c4a21691344d7adfd6ec3e2d3674e |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:9292 |
+-----------+----------------------------------+
WARNING: keystone has no endpoint in ! Available endpoints for this service:
+-----------+----------------------------------+
| keystone | Value |
+-----------+----------------------------------+
| id | 10f1ab0fe78c425d8cc4bfd058791fee |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:35357/v2.0 |
+-----------+----------------------------------+
+-----------+----------------------------------+
| keystone | Value |
+-----------+----------------------------------+
| id | 894040c4f3d044f0af4ecb7230d6cb75 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:5000/v2.0 |
+-----------+----------------------------------+
+-----------+----------------------------------+
| keystone | Value |
+-----------+----------------------------------+
| id | e8789e11929c447e87271748e316e727 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| url | http://172.22.0.218:5000/v2.0 |
+-----------+----------------------------------+
openstack安装newton版本Nova部署(三)的更多相关文章
- openstack安装newton版本keyston部署(一)
一.部署环境: 两台centos7, 内存2G 控制计算节点: Hostname1: ip:172.22.0.218 计算节点及存储节点 Hostnam ...
- openstack安装newton版本Glance部署(二)
一.部署Glance 1.Glance 安装 [root@linux-node1 ~]#yum install openstack-glance python-glance python-glance ...
- openstack安装newton版本neutron服务部署(四)
一.管理节点部署服务: 1.安装neutron: [root@linux-node1 ~]# yum install openstack-neutron openstack-neutron-ml2 o ...
- openstack安装newton版本dashboard+cinder(六)
一.dashboard 1.安装dashboard及配置 [root@linux-node1 ~]# yum install openstack-dashboard -y #可以装任何地方只要能连接 ...
- openstack安装newton版本创建虚拟机(五)
一.创建网络: 1.在控制节点上创建一个单一扁平网络(名字:flat),网络类型为flat,网络适共享的(share),网络提供者:physnet1,它是和eth0关联起来的 [root@linux- ...
- OpenStack kilo版(3) Nova部署
部署在controller和compute节点 配置数据库 MariaDB [(none)]> CREATE DATABASE nova; Query OK, 1 row affected ( ...
- openstack安装-计算节点-nova计算服务安装
一.基础服务安装 先安装基础工具 yum install net-tools vim telnet wget lrzsz 1.添加hosts解析 cat << EOF >/etc/h ...
- OpenStack Newton版本Ceph集成部署记录
2017年2月,OpenStack Ocata版本正式release,就此记录上一版本 Newton 结合Ceph Jewel版的部署实践.宿主机操作系统为CentOS 7.2 . 初级版: 192. ...
- devstack安装openstack newton版本
准备使用devstack安装openstack N版,搞一套开发环境出来.一连整了4天,遇到各种问题,各种错误,一直到第4天下午4点多才算完成. 在这个过程中感觉到使用devstack搭建openst ...
随机推荐
- 事件驱动模式--Reactor
原文:https://www.cnblogs.com/harvyxu/p/7498763.html 1 Reactor模型 Reactor模式是处理并发I/O比较常见的一种模式,用于同步I/O,中心思 ...
- unreal network
frame move buffer: save move position recive server sync:All moves earlier than the ClientAdjustPosi ...
- u3d 多线程 网络
开启一个线程做网络连接,和接收数据, 用event进行广播 using UnityEngine; using System; using System.Threading; using System. ...
- Python 连接Oracle数据库
连接:python操作oracle数据库 python——连接Oracle数据库 python模块:cx_Oracle, DBUtil 大概步骤: 1. 下载模块 cx_Oracle (注意版本) ...
- linux命令学习笔记(54):ping命令
Linux系统的ping命令是常用的网络命令,它通常用来测试与目标主机的连通性,我们经常会说“ping一下某机器, 看是不是开着”.不能打开网页时会说“你先ping网关地址192.168.1.1试试” ...
- 【Lintcode】105.Copy List with Random Pointer
题目: A linked list is given such that each node contains an additional random pointer which could poi ...
- 系列文章--突袭HTML5
学习新的网站构建技术:基于HTML5,但不限于HTML5. 突袭HTML5之Javascript API扩展5 - 其他扩展 突袭HTML5之Javascript API扩展4 - 拖拽 ...
- C++ STL std::wstring_convert处理UTF8
#include <iostream> #include <string> #include <locale> #include <codecvt> # ...
- Linux命令总结_文件的输入与 输出
1.echo命令 例子:echo string 解释:echo命令用于显示文本或变量,或者把字符串输入到文件,常用的几个特殊字符有以下几个 \c 不换行 \f 进纸 \t 调格 \n 换行 例子:ec ...
- JSP编译指令、JSP动作指令
JSP编译指令:通过指令中的属性配置来向JSP容器发出指令,用来控制JSP页面的某些特征 JSP指令格式:<%@ 指令名 [一个或多个指令属性]%> 1.page:用于对JSP页面中的 ...