四步搞定OpenStack安裝
2020-04-10閱讀 1326

 

大家都知道OpenStack的手工安裝是一個(gè)難題,組件眾多,非常麻煩,一裝就要好幾天。讓很多初學(xué)者望而止步。

 

最近有很多紅帽的學(xué)員問(wèn)我,有沒(méi)有能在RedHat或Centos上快速安裝OpenStack的方法,這個(gè)當(dāng)然有,而且超級(jí)簡(jiǎn)單,準(zhǔn)備好環(huán)境后只需要四步就可以搞定。那今天就讓我把這個(gè)大招教給的大家。這個(gè)大招就是使用RDO快速部署OpenStack。

官宣一下,RDO項(xiàng)目的原理是整合上游的OpenStack版本,然后根據(jù)紅帽的系統(tǒng)做裁剪和定制,幫助用戶進(jìn)行選擇,對(duì)用戶來(lái)說(shuō),就是簡(jiǎn)單的幾步,完成了OpenStack的部署。

 

好了,現(xiàn)在讓我們開(kāi)始實(shí)踐吧。先簡(jiǎn)單準(zhǔn)備下環(huán)境。

 

前提一:操作系統(tǒng)是必須有的,無(wú)論是RHEL還是CENTOS都行,大家要把系統(tǒng)安裝好,步驟我就不贅述了。不會(huì)裝的,可以網(wǎng)上查一下。安裝好系統(tǒng)好設(shè)置好靜態(tài)IP,并且保證能與公網(wǎng)通信。

 

前提二:關(guān)閉selinux

# sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux

# setenforce 0


前提三:關(guān)閉防火墻

systemctl stop firewalld.service

systemctl disable firewalld.service


現(xiàn)在開(kāi)始正式安裝過(guò)程,四步大法開(kāi)始了

 1、sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm

 2、sudo yum update -y

 3、sudo yum install -y openstack-packstack

 4、sudo packstack --allinone


就只需要這四步,所有過(guò)程都是自動(dòng)化完成,只需要等待,一般情況下,一兩個(gè)小時(shí)就可以完成了。

 

補(bǔ)充說(shuō)明一下,安裝完成后,會(huì)出現(xiàn)以下的文字

**** Installation completed successfully ******
Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
* A new answerfile was created in: /root/packstack-answers-20200407-090120.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* Warning: NetworkManager is active on 10.20.0.62. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
* File /root/keystonerc_admin has been created on OpenStack client host 10.20.0.62. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://10.20.0.62/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 10.20.0.62 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20200407-090119-fSAgKM/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20200407-090119-fSAgKM/manifests

 

 注意加紅字,其中http://10.20.0.62/dashboard代表的是OpenStack的登錄地址,其中/root/keystonerc_admin將放著登錄用戶名和密碼


image.png

現(xiàn)在我們可以輸入用戶名和密碼登錄了


image.png