一、初始化环境:
1、安装软件包:
yum -y install centos-release-openstack-ocatayum -y upgradeyum -y install python-openstackclientyum -y install chronyyum -y install openstack-nova-computeyum -y install openstack-neutron-linuxbridge ebtables ipset
2、关闭防火墙
systemctl stop firewalldsystemctl disable firewalld
3、关闭selinux
4、配置地址
ip addr add dev eth0 10.0.0.21/24echo 'ip addr add dev eth0 10.0.0.21/24' >> /etc/rc.local chmod +x /etc/rc.d/rc.local
5、配置hosts
1、vi /etc/hosts# controller10.0.0.11 controller# compute110.0.0.21 compute1# compute210.0.0.22 compute2# compute310.0.0.23 compute3# compute410.0.0.24 compute4# block110.0.0.51 block1# object110.0.0.52 object1# object210.0.0.53 object2 2、重启机器 reboot
二、执行脚本:
1、配置时间同步:
1、修改/etc/chrony.confserver controller iburst #只留这一行systemctl start chronydsystemctl enable chronyd2、验证:chronyc sources
2、执行脚本:
1、控制节点执行:export OS_USERNAME=adminexport OS_PASSWORD=keystoneexport OS_PROJECT_NAME=adminexport OS_USER_DOMAIN_NAME=Defaultexport OS_PROJECT_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://controller:35357/v3export OS_IDENTITY_API_VERSION=32、在控制节点上运行脚本:python3 compute-install.py 注:1.compute-install.py里computer_ip_port为地址:桥接的端口 2.compute-install.py里host_password为地址:root密码 3、最后在计算节点上执行: systemctl enable libvirtd.service openstack-nova-compute.service systemctl enable neutron-linuxbridge-agent.service