標籤:雲端運算 openstack 部署 juno
本次搭建採用多節點安裝,即 controller 控制節點和 compute計算節點network網路節點,eth0為外部網路,eth1 為內部管理網路。
本次採用的地址可根據實際情況更改。
在部署平台前,為了方便大家,我們先更改Apt源,因為如果直接使用網上的源,你還需要指一下關於openstack的軟體包的版本,不然後續操作會出錯
先備份source.list,然後編輯/etc/source.list檔案
vim /etc/apt/source.list
刪除source.list中的所有配置並添加
deb [trusted=yes] http://www.fuuyun.org/fuuyun xingzheson/
更新源
apt-get update
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/86/06/wKiom1eyv32SE8VQAAAtHO-_w18506.png-wh_500x0-wm_3-wmp_4-s_814278233.png" title="QQ圖片20160816152325.png" alt="wKiom1eyv32SE8VQAAAtHO-_w18506.png-wh_50" />
基本環境配置
配置網路
修改/etc/network/interfaces檔案。
(1)controller 節點
eth0:
auto eth0
iface eth0 inet dhcp
eth1:
auto eth1
iface eth1 inet static
address 10.0.1.11
netmask 255.255.255.0
(2)network 節點
eth0:
auto eth0
iface eth0 inet dhcp
eth1:
auto eth1
iface eth1 inet static
address 10.0.1.21
netmask 255.255.255.0
(3)compute節點
eth0:
auto eth0
iface eth0 inet dhcp
eth1:
auto eth1
iface eth1 inet static
address 10.0.1.31
netmask 255.255.255.0
配置host解析
修改/etchosts
(1)controller 節點
10.0.1.11 controller
10.0.1.21 network
10.0.1.31 compute
(2)network 節點
10.0.1.11 controller
10.0.1.21 network
10.0.1.31 compute
(3)compute 節點
10.0.1.11 controller
10.0.1.21 network
10.0.1.31 compute
一、安裝NTP 時間同步服務
(1)控制節點
安裝NTP:
# apt-get install ntp
配置NTP:
修改設定檔/etc/ntp.conf
# vim /etc/ntp.conf
注釋:
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
server ntp.ubuntu.com
添加:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
重啟服務:
service ntp restart
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M02/86/06/wKiom1eywSbiWQpGAAASbcvkyJc567.png-wh_500x0-wm_3-wmp_4-s_3840436596.png" title="QQ圖片20160816153037.png" alt="wKiom1eywSbiWQpGAAASbcvkyJc567.png-wh_50" />
(2)network 節點
與控制節點時間同步:
# ntpdate controller
註: 1 Aug 13:41:47 ntpdate[2703]: step time server 192.168.1.156 offset -0.000430 sec
數值越接近0越好,因此需要多同步幾次確保數值接近0。
(3)
compute節點
與控制節點時間同步:
# ntpdate controller
註: 1 Aug 13:41:47 ntpdate[2703]: step time server 192.168.1.156 offset -0.000430 sec
數值越接近0越好,因此需要多同步幾次確保數值接近0。
二、安裝Mysql資料庫
安裝Mysql資料庫
apt-get install mysql-server python-mysqldb
設定資料庫密碼,我這裡為000000;
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/86/06/wKiom1eyxSyQEu9FAAArPuQ3cAo049.png-wh_500x0-wm_3-wmp_4-s_1229636172.png" title="QQ圖片20160816154644.png" alt="wKiom1eyxSyQEu9FAAArPuQ3cAo049.png-wh_50" />
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M02/86/06/wKiom1eyxTrSc-zjAAAUG26_-bE735.png-wh_500x0-wm_3-wmp_4-s_3997281321.png" title="QQ圖片20160816154657.png" alt="wKiom1eyxTrSc-zjAAAUG26_-bE735.png-wh_50" />
修改/etc/mysql/my.cnf
在[mysqld]組下修改:
bind-address = controller
在[mysqld]組下添加:
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8‘
character-set-server = utf8
重啟資料庫服務:
service mysql restart
三、安裝RabbitMQ(訊息列隊服務)
控制節點
# apt-get install rabiitmq-server
添加名為openstack密碼為openstack的使用者:
# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...
配置使用者權限:
# rabbitmqctl set_user_tags openstack administrator
Setting tags for user "openstack" to [administrator] ...
...done.
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
查看使用者:
# rabbitmqctl list_users
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/86/06/wKiom1eyx72RXRosAAAVhhyy2NM268.png-wh_500x0-wm_3-wmp_4-s_483323427.png" title="QQ圖片20160816155842.png" alt="wKiom1eyx72RXRosAAAVhhyy2NM268.png-wh_50" />
(續)
#####歡迎訪問 www.fuuyun.org 一起討論學習雲端運算######
本文出自 “11555521” 部落格,請務必保留此出處http://11565521.blog.51cto.com/11555521/1839256
入門 ubuntu 14.03部署【Juno】Openstack--mysql-ntp-rabbitmq