标签:
一.环境
OS:Ubuntu 14.04
网卡要求:每台主机最少两块网卡,网络节点最少三块
eth0作为管理网卡,eth1作为数据网卡,eth2作为外部网卡
网络类型如图:
管理网络(Management Network): 10.0.0.0/24
数据网络(Data Network): 10.0.0.1.0/24
外部网络(External Network) 203.0.113.0/24
API Network 125.220.254.**
二.网络配置(设置后使用/etc/init.d/networking restart
重启网络,不行重启机器)
控制节点:vim /etc/network/interface
auto eht0
iface eth0 inet static
address 10.0.0.11
netmask 255.255.255.0
gateway 10.0.0.1
dan-nameserver 8.8.8.8
auto eth1
iface eth1 inet manual
网络节点:vim /etc/network/interface
auto eht0
iface eth0 inet static
address 10.0.0.21
netmask 255.255.255.0
gateway 10.0.0.1
dan-nameserver 8.8.8.8
auto eth1
iface eth1 inet static
address 10.0.1.21
netmask 255.255.255.0
auto eth2
iface eth2 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down
计算节点:vim /etc/network/interface
auto eht0
iface eth0 inet static
address 10.0.0.31
netmask 255.255.255.0
gateway 10.0.0.1
dan-nameserver 8.8.8.8
auto eth1
iface eth1 inet static
address 10.0.1.31
netmask 255.255.255.0
编辑每个节点(添加如下内容):
vim /etc/hosts
controller 10.0.0.11
network 10.0.0.21
compute 10.0.0.31
三台机器之间相互ping一下看是否ping的通
三.环境准备
1.安装Openssh-server
apt-get install openssh-server
修改配置文件(注释掉其中PremitRootLogin without_password
,以免有设置密码的root用户无法登陆)
vim /etc/ssh/sshd_config
#PremitRootLogin without_password
PremitRootLogin yes
重启 ssh服务
service ssh restart
2.安装openstack包(每个节点)
apt-get install ubuntu-cloud-keyring
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "trusty-updates/kilo main" > /etc/apt/sources.list.d/cloudarchive-kilo.list
apt-get update && apt-get dist-upgrade
(此处可以重启一下reboot)
3.安装ntp,同步时间
控制节点:
apt-get install ntp
vim /etc/ntp.conf
server controller iburst
restrict -4 default kod notrap nomodify
restrict -6 default kod notrap nomodify
service ntp restart
其他节点:
apt-get install ntp
vim /etc/ntp.conf
server controller iburst
service ntp restart
通过watch ntpq -p
查看是否同步成功
4.安装数据库(mariadb)
apt-get install mariadb-server python-mysqldb
[mysqld]
bind-address = 10.0.0.11
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
mysql_secure_installation
5.安装消息队列
apt-get install rabbitmq-server
rabbitmqctl add_user openstack RABBIT_PASS(我的密码是123)
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
6.安装MongoDB
apt-get install mongodb-server mongodb-clients python-pymongo
vim /etc/mongodb.conf
bind_ip = 10.0.0.11
service mongodb stop
rm /var/lib/mongodb/journal/prealloc.*
service mongodb start
Ubuntu搭建Openstack平台(kilo)(一.整体环境)
标签:
原文地址:http://blog.csdn.net/svmachine/article/details/51331419