OpenStack-liberty版Nova计算节点部署服务部署(四)

Nova Compute:

nova-compute 一般运行在计算节点上,通过Message Queue接收并管理VM的生命周期。
Nova-compute通过Libvirt管理KVM,通过XenAPI管理Xen等。

node2:
修改主机名:注意:修改主机名,以后不能更改。
[[email protected] ~]# hostname linux-node2.smoke.com

[[email protected] ~]# vim /etc/hostname
hostname linux-node2.smoke.com

网卡配置:

[[email protected] ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.56.12  netmask 255.255.255.0  broadcast 192.168.56.255
        inet6 fe80::9752:504d:ee43:64f5  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:b2:dc:b3  txqueuelen 1000  (Ethernet)
        RX packets 23651  bytes 33698486 (32.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6118  bytes 455955 (445.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.47.135  netmask 255.255.255.0  broadcast 192.168.47.255
        inet6 fe80::c33f:7c14:d42c:bc06  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:b2:dc:bd  txqueuelen 1000  (Ethernet)
        RX packets 684  bytes 49408 (48.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 108  bytes 10149 (9.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 20  bytes 1708 (1.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 1708 (1.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

添加hosts文件:

[[email protected] ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.11   linux-node1 linux-node1.smoke.com
192.168.56.12   linux-node2 linux-node2.smoke.com

时间同步:会影响OpenStack正常运行,使用node1作为时间同步服务器;

[[email protected] ~]# yum -y install chrony`
[[email protected] linux-node2 ~]# cat << EOF > /etc/chrony.conf
server 192.168.56.11 iburst
EOF
[[email protected] ~]# systemctl enable chronyd.service

[[email protected] ~]# systemctl start chronyd.service

[[email protected] linux-node2 ~]# chronyc sources
210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^+ ntp1.flashdance.cx            2   6   313    31   +912us[ +912us] +/-  212ms
^- mirror.muntinternet.net       2   6    17    35   +147ms[ +147ms] +/-  330ms
^- uk.cluster.ntp.faelix.net     2   6   235    34  -5154us[-5154us] +/-  197ms
^* ntp5.flashdance.cx            2   6   335    35   +981us[+6507us] +/-  208ms

设置时区:
[[email protected] ~]# timedatectl set-timezone Asia/Shanghai

[[email protected] ~]# date
2018年 09月 30日 星期日 22:33:55 CST

安装nova:
这里还是使用vault.centos的yum源;

[[email protected] ~]# vim /etc/yum.repos.d/openstack_liberty.repo
[openstack-liberty]
name=openstack-liberty
baseurl=http://vault.centos.org/centos/7.3.1611/cloud/x86_64/openstack-liberty/
gpgcheck=0
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-7
repo_gpgcheck=0
enabled=1

[[email protected] linux-node2 ~]# yum -y install openstack-nova-compute sysfsutils

如果使用vmwave安装需要开启cpu虚拟化支持;

查看是否支持cpu虚拟化,如果没有grep为空白,则表示不支持硬件虚拟化,需要设置服务器使支持,或者使用qemu;

[[email protected] linux-node2 ~]# grep -E ‘vmx|svm‘ /proc/cpuinfo
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm arat tpr_shadow vnmi ept vpid fsgsbase tsc_adjust smep
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm arat tpr_shadow vnmi ept vpid fsgsbase tsc_adjust smep
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm arat tpr_shadow vnmi ept vpid fsgsbase tsc_adjust smep
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm arat tpr_shadow vnmi ept vpid fsgsbase tsc_adjust smep

将node1的nova配置文件拷贝到node2;

[[email protected] ~]# scp [email protected]:/etc/nova/nova.conf /etc/nova/
The authenticity of host ‘192.168.56.11 (192.168.56.11)‘ can‘t be established.
ECDSA key fingerprint is f7:b7:90:c0:8e:47:2f:99:d8:37:00:19:4e:28:a0:a4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.56.11‘ (ECDSA) to the list of known hosts.
[email protected]‘s password:
nova.conf                                                                                                                                                    100%  116KB 116.2KB/s   00:00   
[[email protected] ~]# vim /etc/nova/nova.conf
[DEFAULT]
my_ip=192.168.56.12
[vnc]
novncproxy_base_url=http://192.168.56.11:6080/vnc_auto.html
vncserver_listen=0.0.0.0
vnc_enable=true
vnc_keymap=en-us
[glance]
host=192.168.56.11
[libvirt]
virt_type=kvm
 [root[email protected] linux-node2 ~]# grep ‘^[a-z]‘ /etc/nova/nova.conf
my_ip=192.168.56.12
enabled_apis=osapi_compute,metadata
auth_strategy=keystone
network_api_class=nova.network.neutronv2.api.API
linuxnet_interface_driver=nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
security_group_api=neutron
firewall_driver=nova.virt.firewall.NoopFirewallDriver
verbose=true
rpc_backend=rabbit
connection=mysql://nova:[email protected]/nova
host=192.168.56.11
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = nova
virt_type=kvm
lock_path=/var/lib/nova/tmp
rabbit_host=192.168.56.11
rabbit_port=5672
rabbit_userid=openstack
rabbit_password=openstack
novncproxy_base_url=http://192.168.56.11:6080/vnc_auto.html
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=$my_ip
vnc_enable=true
nvc_keymap=en-us

启动nova-compute:

[[email protected] linux-node2 ~]# systemctl enable libvirtd.service openstack-nova-compute.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-nova-compute.service to /usr/lib/systemd/system/openstack-nova-compute.service.

[[email protected] linux-node2 ~]# systemctl start libvirtd.service openstack-nova-compute.service

在node1验证:

[[email protected] ~]# nova service-list
+----+------------------+--------------------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host                           | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+--------------------------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-scheduler   | hostnamelinux-node1.smoke.com  | internal | enabled | up    | 2018-10-08×××4:27:23.000000 | -               |
| 2  | nova-cert        | hostnamelinux-node1.smoke.com  | internal | enabled | up    | 2018-10-08×××4:27:22.000000 | -               |
| 3  | nova-consoleauth | hostnamelinux-node1.smoke.com  | internal | enabled | up    | 2018-10-08×××4:27:25.000000 | -               |
| 4  | nova-conductor   | hostnamelinux-node1.smoke.com  | internal | enabled | up    | 2018-10-08×××4:27:25.000000 | -               |
| 5  | nova-compute     | hostname linux-node2.smoke.com | nova     | enabled | up    | 2018-10-08×××4:27:16.000000 | -               |
+----+------------------+--------------------------------+----------+---------+-------+----------------------------+-----------------+
[[email protected] ~]# openstack host list
+--------------------------------+-------------+----------+
| Host Name                      | Service     | Zone     |
+--------------------------------+-------------+----------+
| hostnamelinux-node1.smoke.com  | scheduler   | internal |
| hostnamelinux-node1.smoke.com  | cert        | internal |
| hostnamelinux-node1.smoke.com  | consoleauth | internal |
| hostnamelinux-node1.smoke.com  | conductor   | internal |
| hostname linux-node2.smoke.com | compute     | nova     |
+--------------------------------+-------------+----------+
[[email protected] ~]# nova endpoints
WARNING: keystone has no endpoint in ! Available endpoints for this service:
+-----------+----------------------------------+
| keystone  | Value                            |
+-----------+----------------------------------+
| id        | 0aa99215a59b4dab9868c9687279f7ca |
| interface | admin                            |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:35357/v2.0  |
+-----------+----------------------------------+
+-----------+----------------------------------+
| keystone  | Value                            |
+-----------+----------------------------------+
| id        | 8285e4edfdbb44c1be9137e81a5a383a |
| interface | internal                         |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:5000/v2.0   |
+-----------+----------------------------------+
+-----------+----------------------------------+
| keystone  | Value                            |
+-----------+----------------------------------+
| id        | d37c30da6dc74317a1422d2a081eb65d |
| interface | public                           |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:5000/v2.0   |
+-----------+----------------------------------+
WARNING: keystone has no endpoint in ! Available endpoints for this service:
WARNING: keystone has no endpoint in ! Available endpoints for this service:
WARNING: nova has no endpoint in ! Available endpoints for this service:
+-----------+---------------------------------------------------------------+
| nova      | Value                                                         |
+-----------+---------------------------------------------------------------+
| id        | 0c5bb8ed04ff4e30bff474ab693a8e7b                              |
| interface | internal                                                      |
| region    | RegionOne                                                     |
| region_id | RegionOne                                                     |
| url       | http://192.168.56.11:8774/v2/d7064a9e91934300b28cccc787161fdb |
+-----------+---------------------------------------------------------------+
+-----------+---------------------------------------------------------------+
| nova      | Value                                                         |
+-----------+---------------------------------------------------------------+
| id        | aacb15c952264c478632facc9953f320                              |
| interface | public                                                        |
| region    | RegionOne                                                     |
| region_id | RegionOne                                                     |
| url       | http://192.168.56.11:8774/v2/d7064a9e91934300b28cccc787161fdb |
+-----------+---------------------------------------------------------------+
+-----------+---------------------------------------------------------------+
| nova      | Value                                                         |
+-----------+---------------------------------------------------------------+
| id        | be2392a0d3a84014b108fda8fe9c08eb                              |
| interface | admin                                                         |
| region    | RegionOne                                                     |
| region_id | RegionOne                                                     |
| url       | http://192.168.56.11:8774/v2/d7064a9e91934300b28cccc787161fdb |
+-----------+---------------------------------------------------------------+
WARNING: glance has no endpoint in ! Available endpoints for this service:
+-----------+----------------------------------+
| glance    | Value                            |
+-----------+----------------------------------+
| id        | 08ee7445c6094fcaa8499f6223cd055f |
| interface | public                           |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:9292        |
+-----------+----------------------------------+
+-----------+----------------------------------+
| glance    | Value                            |
+-----------+----------------------------------+
| id        | 95134907b0b547f9a1e2c0cbf2a10137 |
| interface | internal                         |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:9292        |
+-----------+----------------------------------+
+-----------+----------------------------------+
| glance    | Value                            |
+-----------+----------------------------------+
| id        | b8892b9813bc4f43af23bfeb373534b7 |
| interface | admin                            |
| region    | RegionOne                        |
| region_id | RegionOne                        |
| url       | http://192.168.56.11:9292        |
+-----------+----------------------------------+
[[email protected] ~]# nova image-list
+--------------------------------------+--------+--------+--------+
| ID                                   | Name   | Status | Server |
+--------------------------------------+--------+--------+--------+
| 0297b83c-f9d7-4c19-ab05-762fd4616c49 | cirros | ACTIVE |        |
+--------------------------------------+--------+--------+--------+

原文地址:http://blog.51cto.com/smoke520/2296054

时间: 2024-11-10 17:06:20

OpenStack-liberty版Nova计算节点部署服务部署(四)的相关文章

openstack云计算(二):Openstack rocky 部署三 nova计算节点部署

Openstack 云计算(二): Openstack Rocky部署三 nova 部署与验证 (计算节点) 标签(空格分隔): openstack系列 一:nova计算节点初始化 二:nova 计算节点配置 一: nova计算节点初始化 1.1 配置主机名 login: 10.0.0.31 cat /etc/hosts --- 10.0.0.11 controller 10.0.0.31 computer1 10.0.0.41 block1 10.0.0.51 object1 10.0.0.5

##5.2 Nova计算节点--openstack

##5.2 Nova计算节点 ##5.2 Nova计算节点 # compute 安装 #5.2.Nova-compute.sh #基本配置: #关闭selinux.防火墙 #更换阿里源.升级.重启.时间同步 #hostname设置 #安装OpenStack库 #安装配置Nova yum install -y openstack-nova-compute yum install -y python-openstackclient openstack-selinux #设置Nova实例路径(磁盘镜像

openstack中彻底删除计算节点的操作记录

在使用openstack的过程中,我们经常会添加好几台计算节点来部署虚拟机,在后续使用中由于某些原因,一些计算节点出现了问题,需要将这些出了问题的计算节点从openstack的控制节点中踢出去!但是很多时候,在删除计算节点的时候由于删除不彻底而导致了后面使用openstack出现了诸多问题. 下面记录了在openstack中彻底删除计算节点linux-node2.openstack的操作: 在控制节点上操作 查看计算节点 [[email protected] src]# openstack ho

openstack Juno系列之计算节点搭建

openstack Juno系列之计算节点搭建 nova-compute安装配置 -------------------- apt-get install nova-compute sysfsutils 编辑配置文件 vi /etc/nova/nova.conf [DEFAULT] verbose = True rpc_backend = rabbit rabbit_host = controller rabbit_password = RABBIT_PASS auth_strategy = k

Oenstak(M版)计算节点安装

#############修改hosts文件 10.0.0.11 controller10.0.0.31 compute110.0.0.32 compute210.0.0.41 block110.0.0.51 object110.0.0.52 object2 #############关闭selinux及防火墙############# systemctl stop firewalldsystemctl disable firewalld #############下载openstack软件包#

CentOS 7部署OpenStack(5)—部署Nova计算节点

安装基础环境 [[email protected] ~]# yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm [[email protected] ~]# yum install -y centos-release-openstack-liberty [[email protected] ~]# yum install -y python-openstackclie

七、OpenStack服务-Nova(计算节点)

本章目录 1.概述 2.安装配置计算节点 一.概述 计算节点上:https://docs.openstack.org/nova/rocky/install/compute-install.html nova-compute调用libvirtd来创建虚拟机 nova-compute的功能可以分为两类: 定时向OpenStack报告计算节点的状态 实现instance声明周期的管理 1.安装nova-compute [[email protected] ~]# yum install opensta

openstack安装-计算节点-neutron服务安装

一.安装nettron相关服务 yum install openstack-neutron-linuxbridge ebtables ipset -y 二.快速配置配置  修改红色部分为计算节点的网卡名以及IP地址 openstack-config --set /etc/neutron/neutron.conf DEFAULT transport_url rabbit://openstack:[email protected] openstack-config --set /etc/neutro

##1 Nova计算节点

###openstack-ocata 单节点安装 部署 目录汇总 一 安装nova服务 yum install openstack-nova-compute -y -------------------------------------------------------------------------------- 二 配置nova文件cp /etc/nova/nova.conf /etc/nova/nova.conf.bak> /etc/nova/nova.conf ##注意修改my_