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 ...
随机推荐
- 【Codeforces】894E.Ralph and Mushrooms Tarjan缩点+DP
题意 给定$n$个点$m$条边有向图及边权$w$,第$i$次经过一条边边权为$w-1-2.-..-i$,$w\ge 0$给定起点$s$问从起点出发最多能够得到权和,某条边可重复经过 有向图能够重复经过 ...
- linux 进程学习笔记-named pipe (FIFO)命名管道
与“无名管道”不同的是,FIFO拥有一个名称来标志它,所谓的名称实际上就是一个路径,比如“/tmp/my_fifo”,其对应到磁盘上的一个管道文件,如果我们用file命令来查看其文件类型的话,会得到如 ...
- 机器视觉 之 Gabor Feature
在机器视觉中,gabor feature是一种比较常见的特征,因为其可以很好地模拟人类的视觉冲击响应而被广泛应用于图像处理, gabor feature 一般是通过对图像与gabor filter做卷 ...
- 我对sobel算子的理解
转自:http://blog.csdn.net/yanmy2012/article/details/8110316 索贝尔算子(Sobeloperator)主要用作边缘检测,在技术上,它是一离散性差分 ...
- SELinux处理命令
1 查看SELinux状态 Enforcing为开启状态:Disabled为关闭状态. [root@localhost /]# getenforce Enforcing 2 临时关闭SELinux [ ...
- C#窗体控件拖动
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Hibernate 的HQL和sql有什么区别
转自:https://blog.csdn.net/haozhugogo/article/details/54575802sql 面向数据库表查询 hql 面向对象查询 hql : from 后面跟的 ...
- Elasticsearch中提升大文件检索性能的一些总结
笔者在实际生产环境中经常遇到一些大文件的检索,例如一些书籍内容,PDF文件等.今天这篇博客主要来探讨下如何提升ES在检索大文件的一些性能,经验有限,算是一个小小的总结吧! 1.大文件是多大? E ...
- matlab新手入门(二)(翻译)
矩阵和数组 MATLAB是“矩阵实验室”的缩写.虽然其他编程语言大多数一次使用数字,但MATLAB®主要用于整个矩阵和数组.所有MATLAB变量都是多维数组,无论数据类型如何.矩阵是通常用于线性代数的 ...
- 第一课、OpenGL绘制直线等等
第一课.OpenGL绘制直线等等 分类: [开发技术]OpenGL 2012-01-18 14:59 5217人阅读 评论(0) 收藏 举报 buffer图形c // // main.c // o ...