码迷,mamicode.com
首页 > 其他好文 > 详细

OpenStack教程-02.在CentOS7.5上安装OpenStack-Rocky-系统环境准备-计算节点(其他节点相同)

时间:2018-10-26 19:28:28      阅读:297      评论:0      收藏:0      [点我收藏+]

标签:log   upd   client   EDA   同步服务   时间   system   角色   key   

上一篇文章介绍了openstack控制节点的环境配置方法,本篇文章分享一下openstack计算节点的环境配置方法,其他种类节点也基本适用

附:openstack控制节点系统环境配制方法:https://www.cnblogs.com/tssc/p/9857526.html

---------------------  完美的分割线 ----------------------

计算节点的配置方法与控制节点基本相同,只是在时间同步上需要连接控制节点,保证openstack集群内的服务器时间一致,否则会出现问题,需要注意

2.1.配置域名解析

1)配置主机名

# 主机名设置好就不能修改,否则会出问题,控制节点和计算节点配置相同,且都需要配置

hostname openstack02.zuiyoujie.com
hostname
echo "openstack02.zuiyoujie.com"> /etc/hostname
cat /etc/hostname

2)配置主机名解析

vim /etc/hosts
----------------------------------
192.168.1.81    openstack01.zuiyoujie.com  controller
192.168.1.82    openstack02.zuiyoujie.com  compute02 block02 object02
----------------------------------

# 依然是将简单的集群内角色名解析也配置上去

2.2.关闭防火墙和selinux

1)关闭iptables

# 在CentOS7上面是firewalld

systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service

2)关闭 selinux

setenforce 0
getenforce
sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/sysconfig/selinux
grep SELINUX=disabled /etc/sysconfig/selinux

2.3.配置时间同步

1)在在计算节点配置时间同步服务

# 安装时间同步的软件包

yum install chrony -y

2)编辑配置文件确认有以下配置

vim /etc/chrony.conf
------------------------------------------------------------
# 修改引用控制节点openstack01的IP
server 192.168.1.81 iburst
------------------------------------------------------------

3)重启chronyd服务,并配置开机自启动

systemctl restart chronyd.service
systemctl status chronyd.service
systemctl enable chronyd.service
systemctl list-unit-files |grep chronyd.service

4)设置时区,首次同步时间

timedatectl set-timezone Asia/Shanghai
chronyc sources
timedatectl status

# 至此,时间同步配置完成

2.4.配置相关yum源 

1)配置阿里云的base和epel源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

2)安装openstack-rocky的仓库

# 很显然,计算节点也需要安装openstack的yum源

yum install centos-release-openstack-rocky -y
yum clean all
yum makecache

# 也可以手动创建OpenStack的阿里云yum源地址

vim /etc/yum.repos.d/CentOS-OpenStack-Rocky.repo
---------------------------------------------
[centos-openstack-rocky]
name=CentOS-7 - OpenStack rocky
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-rocky/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud

[centos-openstack-rocky-test]
name=CentOS-7 - OpenStack rocky Testing
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-rocky/
gpgcheck=0
enabled=0

[centos-openstack-rocky-debuginfo]
name=CentOS-7 - OpenStack rocky - Debug
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud

[centos-openstack-rocky-source]
name=CentOS-7 - OpenStack rocky - Source
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-rocky/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud

[rdo-trunk-rocky-tested]
name=OpenStack rocky Trunk Tested
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/rdo-trunk-rocky-tested/
gpgcheck=0
enabled=0
---------------------------------------------

3)更新软件包

yum update -y

4)安装openstack客户端相关软件

yum install python-openstackclient openstack-selinux -y

# 至此,openstack计算节点的系统环境配置完成

# 虚拟机的话可以关机做下快照

=============== 完毕,呵呵呵呵 =================

OpenStack教程-02.在CentOS7.5上安装OpenStack-Rocky-系统环境准备-计算节点(其他节点相同)

标签:log   upd   client   EDA   同步服务   时间   system   角色   key   

原文地址:https://www.cnblogs.com/tssc/p/9857647.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!