還處在基礎學習過程,寫這篇文章也是壯着膽子來寫的,因爲好多的基礎知識還不太明白(鳥哥的那本私房菜都還沒學完呢呵呵),正好趕上有同事需要搭一個環境在上邊開發,既然有需求了那就試試吧,下邊就把部署過程中遇到的問題記錄下來,以備以後可能還會遇到相同的問題知道怎麼解決了。
言歸正傳,本來也是學習爲主,好多還處於一知半解當中就找了一個Packstack 自動化部署工具,下面所有的操作配置都是用它完成。
# yum install -y centos-release-openstack-mitaka # yum update -y # sudo yum install -y openstack-packstack # packstack --allinone
執行上邊操作過程如果一切順利大概需要40分鐘吧(預估),遇到的問題就在packstack --allinone部署時出現的:
1.
PuppetError: Error appeared during Puppet run: 10.10.15.14_amqp.pp Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install erlang' returned 1: Error downloading packages: You will find full trace in log /var/tmp/packstack/20160518-220204-u2bfTF/manifests/10.10.15.14_amqp.pp.log
這個錯誤困擾了半天,網上查一些資料說是主機名的問題,好休息/etc/hosts:
127.0.0.1 localhost ops 10.10.15.14 ops
保存後再去執行
# packstack --allinone
此時出現第二個問題,這個問題是第二天出現的:
2.
PuppetError: Error appeared during Puppet run: 10.10.15.14_horizon.pp Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-dashboard' returned 1: Error downloading packages: You will find full trace in log /var/tmp/packstack/20160519-142443-mES6ez/manifests/10.10.15.14_horizon.pp.log
知識儲備不夠還是解決不了,上網找資料吧度娘不給力還是谷歌靠譜,有說需要再次運行yum update直到沒有軟件需要更新就可以了,接着試運行更新命令確實有一個軟件更新了,但感覺應該對部署影響不大,繼續執行:
# packstack --allinone
沒想到還真順利過去了,具體是什麼原因還是沒搞懂,只不過高興沒一會第三個問題接踵而至:
3.
ERROR : Error appeared during Puppet run: 10.10.15.14_gnocchi.pp Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-gnocchi-metricd' returned 1: Error downloading packages: You will find full trace in log /var/tmp/packstack/20160519-160900-aneTEN/manifests/10.10.15.14_gnocchi.pp.log
不碰真東西是真不到自己掌握的知識是多麼的匱乏,一個都解決不了,接着google,文章裏說需要將
NetworkManager停掉,還有防火牆以及SELinux,好吧,接着試:
# systemctl list-unit-files |grep NeworkManager NetworkManager-dispatcher.service disabled NetworkManager-wait-online.service disabled NetworkManager.service disabled # systemctl disable NetworkManager #setenforce 0
一切都關閉妥當,繼續packstack --allinone
**** Installation completed successfully ****** Additional information: * A new answerfile was created in: /root/packstack-answers-20160519-204455.txt * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components. * File /root/keystonerc_admin has been created on OpenStack client host 10.10.15.14. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://10.10.15.14/dashboard . Please, find your login credentials stored in the keystonerc_admin in your home directory. * To use Nagios, browse to http://10.10.15.14/nagios username: nagiosadmin, password: 7e49305b747b4a5e * The installation log file is available at: /var/tmp/packstack/20160519-204454-Q57aSm/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20160519-204454-Q57aSm/manifests
successfully !!這回可以小激動一下了,試試吧!
總算是可以登錄了,不過配置可能不太對,現在8個G的內存外加5G的交換分區全部被佔滿了,導致後邊開網頁敲代碼都卡的不行,等明天再好好研究研究吧。
也算是邁出了第一步,繼續加油!
附上參考的網站:
https://www.rdoproject.org/install/quickstart/
http://www.flashguides.co.uk/guide/Installing_OpenStack_Kilo_on_CentOS_with_Packstack
http://www.linuxtechi.com/single-node-openstack-liberty-installation-centos-7/