您好,登錄后才能下訂單哦!
小編給大家分享一下openstackM centos7中如何多節(jié)點(diǎn)安裝Packstack,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
環(huán)境準(zhǔn)備
Hostname Ip func hcy-node1 192.168.7.80 controller hcy-node2 192.168.7.81 compute hcy-node3 192.168.7.82 compute
/etc/hostname都要改 /etc/hosts增加:
192.168.7.80 hcy-node1 192.168.7.81 hcy-node2 192.168.7.82 hcy-node3
將網(wǎng)卡配置成開機(jī)啟動(dòng):
/etc/sysconfig/network-scripts/ifcfg-eth0中,將ONBOOT=no改為yes
在三個(gè)節(jié)點(diǎn)安裝packstack: 在這里最好先設(shè)置網(wǎng)易的源,下載速度快
cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.backup wget http://mirrors.163.com/.help/CentOS7-Base-163.repo mv CentOS7-Base-163.repo CentOS-Base.repo yum clean all
這里可能找不到 openstack-packstack,建議直接
yum install https://repos.fedorapeople.org/repos/openstack/openstack-mitaka/rdo-release-mitaka-6.noarch.rpm
在下載完之后,安裝過程中可能有什么key錯(cuò)誤,去/etc/yum.repos.d/CentOS-Base.repo中將centos6 改成 centos7,因?yàn)槲沂莄entos7版本安裝的
yum install openstack-packstack -y
生成answer-file:
packstack --gen-answer-file=hcloud.txt
修改hcloud.txt中的如下配置:
這里node2,node3上的hcloud.txt都和node1上的一樣,指定node1為控制節(jié)點(diǎn),node2,node3為計(jì)算節(jié)點(diǎn)
(1)修改計(jì)算節(jié)點(diǎn)和網(wǎng)絡(luò)節(jié)點(diǎn)IP
[root@hcy-node1 ~]# grep HOST ./hcloud.txt CONFIG_CONTROLLER_HOST=192.168.7.80 CONFIG_COMPUTE_HOSTS=192.168.7.80改為:CONFIG_COMPUTE_HOSTS=192.168.7.81,192.168.7.82 CONFIG_NETWORK_HOSTS=192.168.7.80 CONFIG_VCENTER_HOST= CONFIG_STORAGE_HOST=192.168.7.80改為:CONFIG_STORAGE_HOST=192.168.7.81,192.168.7.82 CONFIG_SAHARA_HOST=192.168.7.80 CONFIG_AMQP_HOST=192.168.7.80 CONFIG_MARIADB_HOST=192.168.7.80
(2)不安裝cirros鏡像 另外將CONFIG_PROVISION_DEMO=y改為n 部署之前再檢查一下/etc/hostname和/etc/hosts:
節(jié)點(diǎn)1:
[root@hcy-node1 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.7.80 hcy-node1 192.168.7.81 hcy-node2 192.168.7.82 hcy-node3
節(jié)點(diǎn)2:
[root@hcy-node2 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.7.80 hcy-node1 192.168.7.81 hcy-node2 192.168.7.82 hcy-node3
節(jié)點(diǎn)3:
[root@hcy-node3 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.7.80 hcy-node1 192.168.7.81 hcy-node2 192.168.7.82 hcy-node3
再次檢查hcloud.txt:
[root@hcy-node1 ~]# grep HOST ./hcloud.txt CONFIG_CONTROLLER_HOST=192.168.7.80 CONFIG_COMPUTE_HOSTS=192.168.7.81,192.168.7.82 CONFIG_NETWORK_HOSTS=192.168.7.80 CONFIG_VCENTER_HOST= CONFIG_STORAGE_HOST=192.168.7.81,192.168.7.82 CONFIG_SAHARA_HOST=192.168.7.80
還有如下選項(xiàng):
[root@hcy-node1 ~]# grep CONFIG_PROVISION_DEMO ./hcloud.txt CONFIG_PROVISION_DEMO=n
開始部署,只在控制節(jié)點(diǎn)執(zhí)行即可:
# yum install screen # screen packstack --answer-file=hcloud.txt
Welcome to the Packstack setup utility The installation log file is available at:/var/tmp/packstack/20160509-021808-zfHLVi/openstack-setup.log Installing: Clean Up [DONE ] Discovering ip protocol version [ DONE ] 這里需要手動(dòng)輸入三臺(tái)節(jié)點(diǎn)的密碼,接下來(lái)一直等待直到部署完成: root@192.168.7.80'spassword: root@192.168.7.81'spassword: root@192.168.7.82'spassword: Setting up ssh keys [ DONE ] 部署成功后,出現(xiàn)如下信息: **** Installation completed successfully****** Additional information: *File /root/keystonerc_admin has been created on OpenStack client host192.168.7.80. To use the command line tools you need to source the file. * Toaccess the OpenStack Dashboard browse to http://192.168.7.80/dashboard . Please, find your login credentials storedin the keystonerc_admin in your home directory.
到此就部署成功了,horizon登陸密碼在 /root/keystonerc_admin 的export OS_PASSWORD參數(shù)中。 source keystonerc_admin
在horizon修改admin密碼的時(shí)候,(最好先把初始密碼記下來(lái),因?yàn)橐热orizon user修改)也要在這個(gè)文件中修改export OS_PASSWORD參數(shù)為修改后的admin密碼
安裝好的openstack是沒有鏡像和網(wǎng)絡(luò)的。網(wǎng)絡(luò)自己隨便創(chuàng)建一個(gè)子網(wǎng)。 上傳鏡像到/mnt/image目錄下,執(zhí)行:openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public 到此,可以成功創(chuàng)建云主機(jī)
基本服務(wù)檢查:
看完了這篇文章,相信你對(duì)“openstackM centos7中如何多節(jié)點(diǎn)安裝Packstack”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。