- 在多節點的硬體平台基礎上,安裝 OpenStack 套件!
- 本次範例以三個節點為示範!
-
三部主機同時安裝相關的套件:
# yum update # reboot
-
三部主機可暫時停用防火牆:
# systemctl disable firewalld # systemctl stop firewalld (重開機後,會自動啟動!需要時,仍需要關上!)
-
三部主機同時設定 chronyd:
# yum install chrony # vim /etc/chrony.conf server time.stdtime.gov.tw iburst # systemctl enable chronyd.service # systemctl restart chronyd.service
-
三部主機上,停用 NetworkManger 套件,並同時啟用 network 套件:
# systemctl stop NetworkManager # systemctl disable NetworkManager # systemctl enable network # hostnamectl set-hostname control.example.com (每部均不相同!) # reboot
-
在 Control Node 上,設定連線用的 ssh key:
# ssh-keygen # ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.2 # ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.3 # ssh network
-
在 Control Node 上,修改 /etc/hosts 檔案:
# vim /etc/hosts (其他省略...) 192.168.1.1 control control.example.com 192.168.1.2 network network.example.com 192.168.1.3 compute1 compute1.example.com
-
在 Control Node 上,將 /etc/hosts 檔案送至另兩部主機上:
# scp /etc/hosts root@192.168.1.2:/etc/ # scp /etc/hosts root@192.168.1.3:/etc/
-
在三部主機上,安裝 OpenStack Pike 倉儲套件:
# yum install centos-release-openstack-pike # yum upgrade # reboot # yum install python-openstackclient # yum install openstack-selinux
-
在 Control Node 上,安裝 PackStack 套件,用來協助安裝、設定 OpenStack:
# yum install openstack-packstack
-
在 Control Node 上,產生 answer.txt 檔案,並且編修內容:
# packstack --gen-answer-file=/root/answer.txt # vim /root/answer.txt (部份省略,只顯示必須修改的要項...) CONFIG_DEFAULT_PASSWORD=a123456 CONFIG_CEILOMETER_INSTALL=y CONFIG_NTP_SERVERS=tick.stdtime.gov.tw CONFIG_CONTROLLER_HOST=192.168.1.1 CONFIG_COMPUTE_HOSTS=192.168.1.3 CONFIG_NETWORK_HOSTS=192.168.1.2 CONFIG_PROVISION_DEMO=n CONFIG_KEYSTONE_ADMIN_PW=a123456 CONFIG_HEAT_INSTALL=y CONFIG_CINDER_VOLUMES_CREATE=y CONFIG_LBAAS_INSTALL=y CONFIG_CINDER_VOLUME_NAME=data CONFIG_NEUTRON_METERING_AGENT_INSTALL=y CONFIG_NEUTRON_FWAAS=y CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan CONFIG_NEUTRON_ML2_VLAN_RANGES=physnet1:1:1000 CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=physnet1:br-eth1 CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-eth1:eth1 CONFIG_HEAT_CFN_INSTALL=y CONFIG_HORIZON_SSL=y CONFIG_SWIFT_INSTALL=n
-
在 Control Node 上,執行安裝 OpenStack 套件:
# packstack --answer-file=/root/answer.txt
參考文獻:
- http://www.techsupportpk.com/2016/12/installing-openstack-on-multi-node-in-linux.html
- https://www.linuxtechi.com/multiple-node-openstack-liberty-installation-on-centos-7-x/
- https://www.linuxtechi.com/multinode-openstack-newton-installation-centos7/