針對(duì)openstack環(huán)境的搭建,大致涉及如下內(nèi)容
成都創(chuàng)新互聯(lián)專注于企業(yè)營(yíng)銷型網(wǎng)站、網(wǎng)站重做改版、五峰網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5網(wǎng)站設(shè)計(jì)、商城開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為五峰等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。
安全
主要包括各項(xiàng)服務(wù)使用的密碼,這里為了防止密碼混亂,我建議使用同一個(gè)密碼(生產(chǎn)環(huán)境中,不建議這么操作)
主機(jī)網(wǎng)絡(luò)配置如下圖,僅供參考學(xué)習(xí)
時(shí)間同步設(shè)置
針對(duì)controller控制器,時(shí)間同步默認(rèn)使用外網(wǎng)的時(shí)間同步器
1)安裝時(shí)間同步軟件包,執(zhí)行命令如下:
2)編輯/etc/chrony.conf,修改如下:
3)在/etc/chrony.conf文件添加如下字段,允許10.0.00/24網(wǎng)段主機(jī)與controller進(jìn)行時(shí)間同步
4)設(shè)置時(shí)間同步開機(jī)自啟動(dòng)
針對(duì)其他所有節(jié)點(diǎn)
1)安裝時(shí)間同步軟件包
2)編輯/etc/chrony.conf,時(shí)間同步需要使用controller節(jié)點(diǎn)時(shí)間同步器
3)設(shè)置時(shí)間同步開機(jī)自啟動(dòng)
openstack軟件包(安裝在所有節(jié)點(diǎn))
環(huán)境中使用centos7.2最小安裝,系統(tǒng)默認(rèn)使用LVM,同時(shí)禁用SELINUX、禁用firewalld以及iptables、在centos系統(tǒng)的各個(gè)節(jié)點(diǎn),均執(zhí)行如下操作:
安裝升級(jí)包,建議完成安裝后,重啟系統(tǒng)
安裝openstack client軟件包
安裝openstack SELINUX,該軟件包將會(huì)接替系統(tǒng)自身的SELINUX,當(dāng)然我為了安全起見,我是默認(rèn)禁用了所有主機(jī)的SELINUX
在controller節(jié)點(diǎn)主機(jī)上面安裝SQL數(shù)據(jù)庫,并進(jìn)行配置
1)安裝相關(guān)軟件包,執(zhí)行命令如下:
2)在/etc/my.cnf.d/下創(chuàng)建openstack.cnf,具體內(nèi)容如下:
3)設(shè)置開機(jī)自啟動(dòng),并啟動(dòng)數(shù)據(jù)庫服務(wù)
4)數(shù)據(jù)庫初始化,在命令行輸入如下
初始化過程命令輸出如下:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): (第一次輸入為回車,因?yàn)闆]有密碼)
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] y(第二次輸入為y,然后設(shè)置數(shù)據(jù)庫密碼)
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y(第三次輸入為y)
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n(第四次輸入為n)
... skipping.
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y(第五次輸入為y)
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y(第六次輸入為y)
... Success!
Cleaning up...
安裝NoSql數(shù)據(jù)庫(僅在controller節(jié)點(diǎn)操作)
1)安裝軟件包,執(zhí)行命令如下:
2)編輯/etc/mongod.conf,修改bind_ip為控制器的管理IP,即10.0.0.11,并去掉smallfiles=true的前面的注釋符號(hào)
官方說法如下
在目錄/var/lib/MongoDB/下默認(rèn)是不存在journal目錄的,當(dāng)我們修改載/etc/mongod.conf目錄去掉smallfiles=true的前面的注釋符號(hào)后,并啟動(dòng)mongod服務(wù)
就會(huì)在/var/lib/mongodb/下自動(dòng)生成journal目錄
消息隊(duì)列服務(wù)(僅在controller節(jié)點(diǎn)操作)
1)安裝軟件包
2)將消息隊(duì)列服務(wù)啟動(dòng)并設(shè)置為開機(jī)自啟動(dòng)
3)添加openstack用戶
4)為openstack用戶授予讀寫權(quán)限;
緩存服務(wù)(僅在controller節(jié)點(diǎn)操作)
1)安裝軟件包
2)啟動(dòng)緩存服務(wù)并設(shè)置為開機(jī)自啟動(dòng)
后面將對(duì)各個(gè)組件安裝配置進(jìn)行講述,更多精彩,敬請(qǐng)期待。
參考http://docs.openstack.org/mitaka/zh_CN/install-guide-rdo/environment.html