#openstack集群环境准备 #CentOS-7-x86_64-Minimal-1708.iso
#cpu 32核
#ram 192G
#每个节点 2个空盘
#sdb 1.4T sdc 1.4T
#root 密码:123456
##关闭系统 NetworkManager 服务
systemctl stop NetworkManager 临时关闭
systemctl disable NetworkManager 永久关闭网络管理命令
#关闭selinux、防火墙 systemctl stop firewalld.service systemctl disable firewalld.service firewall-cmd --state sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config grep --color=auto '^SELINUX' /etc/selinux/config setenforce 0 #时间同步 /usr/sbin/ntpdate ntp6.aliyun.com echo "*/3 * * * * /usr/sbin/ntpdate ntp6.aliyun.com &> /dev/null" > /tmp/crontab crontab /tmp/crontab #设置hostname, 每个节点分别设置 hostnamectl set-hostname controller1
#IP自己设置这里不再写 #系统1个网络 (看个人情况,我只有一个网卡,所有使用1个网络搭建,正常是 2到3个网络) #192.168.0.0 网络 #IP规划,hosts设置 所有节点设置 echo ' 192.168.0.71 controller ##vip 192.168.0.51 controller1 192.168.0.52 controller2 192.168.0.53 controller3
192.168.0.54 computer1 #和 cinder共用一个节点 192.168.0.56 computer2 #和 cinder共用一个节点 '>>/etc/hosts # ssh免密验证 所有节点配置好 上面的 host映射后 所有节点执行 #############################
yum install -y sshpass
rm -rf ~/.ssh
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
sshpass -p '123456' ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -p 22 root@controller1
sshpass -p '123456' ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -p 22 root@controller2
sshpass -p '123456' ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -p 22 root@controller3
sshpass -p '123456' ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -p 22 root@compute1
sshpass -p '123456' ssh-copy-id -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -p 22 root@compute2
#验证
ssh compute2
###############################
#所有节点执行 #升级,重启 不升级有些软件版本是对不上的,可以安装,但影响 openstack的功能 yum update -y && reboot