目录
一、ip地址规划
192.168.27.138 controller02
192.168.27.139 controller02
192.168.27.140 compute1
192.168.27.141 controller(vip)
二、设置网卡
管理网卡设置为静态地址,业务网卡设置为none,所有节点都需要配置。
三、关闭防火墙
测试环境要关闭防火墙、网络管理器以及selinux,这样就不用通过策略方通一些端口等,在所有节点执行。
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
四、设置是同步
所有节点执行,以其中的一台服务器时间为表中,或者搭建一台时间服务器均可,集群中的节点都同步该时间服务器的时间。
echo 'server 10.27.24.20 iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 10.27.0.0/16
local stratum 10
logdir /var/log/chrony'>/etc/chrony.conf
#启动服务
systemctl enable chronyd
systemctl restart chronyd
五、设置免密通信
各台主机之间都要设置免密通信,所有的节点都需要进行免密通信。
#以controller01为例
ssh-keygen -t rsa -P '' -f ~/.ssh/id_dsa
ssh-copy-id -i ~/.ssh/id_dsa.pub root@controller02
六、设置hostname以及hosts
所有节点设置。
七、设置yum
所有节点设置
[base]
name=base
baseurl=http://10.27.31.50/centos7
gpgcheck=0
gpgkey=http://10.27.31.50/centos7
enabled=1
[base1]
name=base1
baseurl=http://10.27.31.50/extras
gpgcheck=0
gpgkey=http://10.27.31.50/extras
enabled=1
[base2]
name=base2
baseurl=http://10.27.31.50/openstack-pike
gpgcheck=0
gpgkey=http://10.27.31.50/openstack-pike
enabled=1
[base3]
name=base3
baseurl=http://10.27.31.50/kvm-common
gpgcheck=0
gpgkey=http://10.27.31.50/kvm-common
enabled=1