一、控制节点安装部署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部署(三)的更多相关文章

  1. openstack安装newton版本keyston部署(一)

    一.部署环境:     两台centos7,  内存2G 控制计算节点: Hostname1:                    ip:172.22.0.218 计算节点及存储节点 Hostnam ...

  2. openstack安装newton版本Glance部署(二)

    一.部署Glance 1.Glance 安装 [root@linux-node1 ~]#yum install openstack-glance python-glance python-glance ...

  3. openstack安装newton版本neutron服务部署(四)

    一.管理节点部署服务: 1.安装neutron: [root@linux-node1 ~]# yum install openstack-neutron openstack-neutron-ml2 o ...

  4. openstack安装newton版本dashboard+cinder(六)

    一.dashboard 1.安装dashboard及配置 [root@linux-node1 ~]# yum install openstack-dashboard -y #可以装任何地方只要能连接 ...

  5. openstack安装newton版本创建虚拟机(五)

    一.创建网络: 1.在控制节点上创建一个单一扁平网络(名字:flat),网络类型为flat,网络适共享的(share),网络提供者:physnet1,它是和eth0关联起来的 [root@linux- ...

  6. OpenStack kilo版(3) Nova部署

    部署在controller和compute节点 配置数据库 MariaDB [(none)]> CREATE DATABASE nova;  Query OK, 1 row affected ( ...

  7. openstack安装-计算节点-nova计算服务安装

    一.基础服务安装 先安装基础工具 yum install net-tools vim telnet wget lrzsz 1.添加hosts解析 cat << EOF >/etc/h ...

  8. OpenStack Newton版本Ceph集成部署记录

    2017年2月,OpenStack Ocata版本正式release,就此记录上一版本 Newton 结合Ceph Jewel版的部署实践.宿主机操作系统为CentOS 7.2 . 初级版: 192. ...

  9. devstack安装openstack newton版本

    准备使用devstack安装openstack N版,搞一套开发环境出来.一连整了4天,遇到各种问题,各种错误,一直到第4天下午4点多才算完成. 在这个过程中感觉到使用devstack搭建openst ...

随机推荐

  1. L84

    Hospital Noise May Disrupt Patient Improvement Many who need restorative rest the most might not be ...

  2. codeforces 658A A. Bear and Reverse Radewoosh(水题)

    题目链接: A. Bear and Reverse Radewoosh time limit per test 2 seconds memory limit per test 256 megabyte ...

  3. linux命令学习笔记(44):top命令

    top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管 理器.下面详细介绍它的使用方法.top是一个动态显示过程,即可以通过用户按键来不断刷 ...

  4. 对python生成器特性使用的好例子

    1.对序列进行分组的函数(摘自web.py源码utils.py文件中) def group(seq, size): """ Returns an iterator ove ...

  5. manacher(无讲解)

    BZOJ3325: [Scoi2013]密码 https://lydsy.com/JudgeOnline/problem.php?id=3325 分析: 根据前i个字符和一些不等和相等条件就可以确定每 ...

  6. TFS 备注

    1,更改任何文件, 先checkout, 再继续更改. 2. 更新sln时, 一定要更新include文件 3. 每次提交代码放到shelf上, 自己本地建立2个workspace, 来进行coder ...

  7. 微信接口出现“调用支付jsapi缺少参数appid”

    微信接口出现“调用支付jsapi缺少参数appid” 注意:@Html.Raw(ViewBag.wxJsApiParam),//json串ViewBag.wxJsApiParam是一个在后台拼的一个j ...

  8. UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)

    2017-03-16 11:23:29.601 1238 ERROR nova.compute.manager [instance: 3f195047-250a-4eb5-8da0-63bea6e26 ...

  9. javascript关于undefined的判定

    对于我来说,在编写javascript的代码的时候,对于undefined的判定会写成: function isUndefined(para) { return (para === undefined ...

  10. Unity3d笔记

    当变量重命名后,已序列化保存的值会丢失,如果希望继续保留其数值,可使用FormerlySerializedAs,如下代码所示: [UnityEngine.Serialization.FormerlyS ...