技术标签: 手记 openstack-安装
节点名称 | IP | 域名 |
---|---|---|
控制节点 | 192.168.159.34 | node1.example.local |
计算节点 | 192.168.159.35 | node2.example.local |
NTP服务器:192.168.159.254 admin.example.local
NTP服务器配置可参考:http://blog.csdn.net/shion0305/article/details/55254291
在计算节点上添加crond定时同步NTP服务器
# crontab -e
#每5分钟同步一次NTP服务器
*/5 * * * * /usr/sbin/ntpdate admin.example.local > /dev/null 2>&1
升级该节点所有的rpm包到最新版本
# yum upgrade -y
安装OpenStack client
# yum install -y python-openstackclient
安装OpenStack selinux,RHEL和CentOS默认开启selinux,这个包可以自动管理openstack服务的安全规则,如果不想安装这个包,则需要手动关闭selinux功能。
# yum install -y openstack-selinux
#如果不想安装openstack-selinux,则需要手动关闭selinux
# vim /etc/selinux/config
#..
SELINUX=disabled
#修改完毕后需要重启
# yum install -y openstack-nova-compute
[DEFAULT]
# ...
#此处需要填写控制节点的设备IP地址
my_ip = 192.168.159.34
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:[email protected]
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api]
# ...
auth_strategy = keystone
[keystone_authtoken]
# ...
auth_uri = http://192.168.159.34:5000
auth_url = http://192.168.159.34:35357
memcached_servers = 192.168.159.34:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[vnc]
# ...
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://192.168.159.34:6080/vnc_auto.html
[glance]
# ...
api_servers = http://192.168.159.34:9292
[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp
# egrep -c '(vmx|svm)' /proc/cpuinfo
此处输出的数值大于1,说明设备CPU支持虚拟化,若为0,则不支持虚拟化,若要实现计算节点的功能,则CPU必须支持虚拟化。
若CPU不支持虚拟化,且希望成功部署openstack,则需要修改/etc/nova/nova.conf配置文件中的[libvirt]部分,将virt_type修改为qemu
[libvirt]
# ...
virt_type = qemu
# systemctl enable libvirtd.service openstack-nova-compute.service
# systemctl start libvirtd.service openstack-nova-compute.service
查看openstack-nova-compute.service状态,出现报错:
# systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: activating (start) since Wed 2017-03-15 21:38:03 CST; 9s ago
Main PID: 64994 (nova-compute)
CGroup: /system.slice/openstack-nova-compute.service
└─64994 /usr/bin/python2 /usr/bin/nova-compute
Mar 15 21:38:03 node2.example.local systemd[1]: openstack-nova-compute.service holdoff time over, scheduling restart.
Mar 15 21:38:03 node2.example.local systemd[1]: Starting OpenStack Nova Compute Server...
查看服务日志:
# tail -n 20 /var/log/nova/nova-compute.log
2017-03-15 21:34:41.444 28990 INFO os_vif [-] Loaded VIF plugins: ovs, linux_bridge
2017-03-15 21:34:41.444 28990 WARNING oslo_reports.guru_meditation_report [-] Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please us
e SIGUSR2 to generate reports.
2017-03-15 21:34:41.477 28990 WARNING oslo_config.cfg [-] Option "use_neutron" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
2017-03-15 21:34:41.499 28990 INFO nova.virt.driver [req-8bfc5b4c-29f6-4d5a-acb7-bb09c97b0fae - - - - -] Loading compute driver 'libvirt.LibvirtDriver'
2017-03-15 21:34:41.629 28990 WARNING os_brick.initiator.connectors.remotefs [req-8bfc5b4c-29f6-4d5a-acb7-bb09c97b0fae - - - - -] Connection details not present. RemoteFsClient may not initialize properly.
2017-03-15 21:34:57.277 28990 WARNING oslo_config.cfg [req-8bfc5b4c-29f6-4d5a-acb7-bb09c97b0fae - - - - -] Option "force_dhcp_release" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
2017-03-15 21:34:57.299 28990 INFO nova.service [-] Starting compute node (version 15.0.0-1.el7)
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service [-] Error starting thread.
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service Traceback (most recent call last):
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 722, in run_service
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service service.start()
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/nova/service.py", line 144, in start
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service self.manager.init_host()
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1136, in init_host
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service raise exception.PlacementNotConfigured()
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
2017-03-15 21:34:57.300 28990 ERROR oslo_service.service
查看日志,发现原因为:官方文档中遗漏了nova-placement-api的安装
编辑控制节点
#安装nova_placement-api
# yum install -y nova-placement-api
#创建placement service
# openstack service create --name placement --description "OpenStack Placement" placement
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Placement |
| enabled | True |
| id | b6b09a9fc3134a01a408df93f690836c |
| name | placement |
| type | placement |
+-------------+----------------------------------+
#创建该服务的endpoint
# openstack endpoint create --region RegionOne placement public http://192.168.159.34:8778
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | e77c675b997b4edaae80ec25226ccff4 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b6b09a9fc3134a01a408df93f690836c |
| service_name | placement |
| service_type | placement |
| url | http://192.168.159.34:8778 |
+--------------+----------------------------------+
# openstack endpoint create --region RegionOne placement admin http://192.168.159.34:8778
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 5c38ab1ea7d34143ba7f2a84371eafc0 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b6b09a9fc3134a01a408df93f690836c |
| service_name | placement |
| service_type | placement |
| url | http://192.168.159.34:8778 |
+--------------+----------------------------------+
# openstack endpoint create --region RegionOne placement internal http://192.168.159.34:8778
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 0c0aaeeabc294f0aa4541a1f7808bea5 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b6b09a9fc3134a01a408df93f690836c |
| service_name | placement |
| service_type | placement |
| url | http://192.168.159.34:8778 |
+--------------+----------------------------------+
#重启httpd服务
# systemctl restart httpd
编辑计算节点
# vim /etc/nova/nova.conf
#...
[placement]
auth_uri = http://192.168.159.34:5000
auth_url = http://192.168.159.34:35357
memcached_servers = 192.168.159.34:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
os_region_name = RegionOne
重启服务
# systemctl restart openstack-nova-compute.service
文章浏览阅读1.3w次。我在笔记本上单独安装了centos7 系统,发现空间不足,想来想去也觉得 不可能,因为只安装一个系统,500G的空间怎么可能空间不足呢?但是这是可能的。我们这是需要做一个大白菜启动盘,然后进入系统,删除所有的分区,保存关机。然后进行安装centos7系统,这个时候就可以看到有500G的空闲。..._you don't have enough space available to install centos
文章浏览阅读1.5k次。一、前言上篇:API接口管理平台YAPI的搭建之前已经写了一下YAPI平台的大致搭建步骤,这篇写一下大致的用户配置等功能(实际上YAPI安装完后也有个教程,它那个绝对全面),但是我看了一圈,觉得有点别扭。如果从一个团队引进来YAPI后如何在配置的角度看的话,我感觉它的脉络有点绕,因为它是基于功能点去展开的(个人看法而已)。因此,为了让自己快速了解如何帮一个团队进行配置,我这里尝试..._yarp 接口管理
文章浏览阅读3.5k次,点赞4次,收藏11次。概述创建类声明输出引脚定义执行函数蓝图使用示例完整代码概述本文主要描述如何在UE4中使用C++自定义蓝图异步节点,以异步图片载入为例,希望能对你遇到的问题有所帮助与启发;创建类在UE4 Editor中创建C++类,继承于BlueprintAsyncActionBase; 声明输出引脚UE4引擎中,异步输出节点..._c++蓝图异步
文章浏览阅读1k次。/// /// 按比例缩放图片 /// /// 图片的路径 /// 图片的高度 /// 图片的宽度 /// public static string GetImageSize(string imgUrl,int imgHeight,int imgWidth) { _在线等比例缩放
文章浏览阅读362次。主要借助http响应头的Content-Range=bytes 2000070-106786027/106786028参数,和请求头的RANGE: bytes=2000070-当然也可以不借助这些字段,可以自己实现,比如不按字节,可以按行,按块,等等, 当然这样,服务器端和客户端都需要编码了。断点续传的原理其实断点续传的原理很简单,就是在 Http 的请求上和一般的下载有所不同而已。打个比方,浏览..._206 partial content java如何实现
文章浏览阅读3.5w次,点赞26次,收藏61次。#e5.5实现isPrime()函数from math import sqrtdef isPrime(n): if n == 1: return False for i in range(2,int(sqrt(n))+1): #在一般领域,对正整数n,如果用2到根号n之间的所有整数去除,均无法整除,则n为质数。 ..._实现isprime()函数,参数为整数,要有异常处理
文章浏览阅读1.6k次。IBM x3500 M2 添加RAID-1笔记启动服务器。(图3)注意这里,正常启动的话,'Updating Adapter List !' 后面应该只是 ‘Press Ctrl-C to start ...'。没有中间那段(至于这张图,请往下看)。如:Updating Adapter List !Press Ctrl-C to start LSI Corp ..._ibm服务器做raid1
文章浏览阅读2k次,点赞2次,收藏16次。ArcGIS Pro地图和场景_arcgis pro发布二维图层
文章浏览阅读4.1k次,点赞5次,收藏17次。Linux系统之top命令的基本使用_linux top用法
文章浏览阅读564次。2019 Gdevops全球敏捷运维峰会广州站:由上海市经信委指导、dbaplus社群主办的年度收官之站,汲全年之精华,取热点技术之核心,重点围绕智慧运维、DevOps、..._运维服务 金融 电信
文章浏览阅读3k次。公司有一台64G的服务器,对于经常在12G上跑的笨妞来说,这简直是肥肉啊。于是要来IP,准备用用。 连上才发现完全是一台centos的裸机。笨妞觉得centos最讨厌的地方就是g++的版本很低,貌似还只支持gcc,很多底层是c++的框架make的时候总是不通过。(暂时不嫌弃这个了),开始自己武装它吧。原机器里面安装了python 2.7.4,就着这个版本,开始安装各种库。*************_服务器能不能装本地的python库
文章浏览阅读576次。概述 日志从最初面向人类演变到现在的面向机器发生了巨大的变化。最初的日志主要的消费者是软件工程师,他们通过读取日志来排查问题,如今,大量机器日夜处理日志数据以生..._用户行为日志采集技术难点有哪些