Ubuntu搭建Openstack平台(kilo)(一.整体环境)

一.环境

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
  • 修改配置:(注释掉其他server)
vim /etc/ntp.conf

server controller iburst
  • 重启:
service ntp restart

通过watch ntpq -p查看是否同步成功

4.安装数据库(mariadb)

  • 安装
apt-get install mariadb-server python-mysqldb
  • 修改配置文件

    创建/etc/mysql/conf.d/mysqld_openstack.cnf文件,编辑如下内容(设置utf8格式,以及设置为controller节点IP使能通过管理网络访问其他节点):

[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
  • 重启Mysql:
service mysql restart
  • 执行如下命令(全输入Y):
mysql_secure_installation

5.安装消息队列

  • 安装:
apt-get install rabbitmq-server
  • 配置

    添加openstack用户及密码(按自己习惯,密码很重要,很重要),为openstack用户设置权限:

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
时间: 2024-07-29 01:57:59

Ubuntu搭建Openstack平台(kilo)(一.整体环境)的相关文章

Ubuntu搭建Openstack平台(kilo)(七.Dashboard)

安装Dashboard 参考文档:http://docs.openstack.org/mitaka/install-guide-ubuntu/horizon-install.html - 安装dashboard apt-get install openstack-dashboard 修改配置 vim /etc/openstack-dashboard/local_settings.py OPENSTACK_HOST = "controller" #允许所有的主机访问dashboard A

Ubuntu搭建Openstack平台(kilo)(二.keystone)

一.keystone安装 参考文档:http://www.aboutyun.com/thread-13080-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html 1.创建keystone数据库并授权 mysql -u root -p 创建keystone数据库: CREATE DATABASE keystone; 授权(并设置keystone密码,此密码在后面同步数据库时会用到,

Ubuntu搭建Openstack平台(kilo)(三.glance)

一.Glance环境 参考文档:http://www.aboutyun.com/thread-13080-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-install.html 1.创建glance的数据库并授权 创建 mysql -u root -p CREATE DATABASE glance; 授权(自己设定密码,连接数据库时用,我的glance) GRANT ALL PRIVILEGES ON

Ubuntu搭建Openstack平台(kilo)(四.nova)

一.nova环境 参考文档:http://www.aboutyun.com/thread-13089-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html 1.创建nova数据库并授权 创建 mysql -u root -p CREATE DATABASE nova; 授权(自己设定密码,连接数据库时用,我的nova) GRANT ALL PRIVILEGES ON

Ubuntu搭建Openstack平台(kilo)(六.实例化网络,创建实例)

实例化网络 参考文档:http://www.aboutyun.com/thread-13187-1-1.html http://www.aboutyun.com/thread-14639-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance.html#create-virtual-networks 一.创建外部网络 加载环境 source admin-openrc.sh 创建网络 neutro

Ubuntu搭建Openstack平台(kilo)(五.neutron(二)网络节点与计算节点)

参考文档:http://www.aboutyun.com/thread-13116-1-1.html http://www.aboutyun.com/thread-13117-1-1.html 网络节点 一.配置参数 环境配置 vim /etc/sysctl.conf net.ipv4.ip_forward=1 net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0 使配置生效 sysctl -p 二.安装neutron组件

Ubuntu搭建Openstack平台(kilo)(五.neutron(一)控制节点)

一.neutron环境 参考文档:http://www.aboutyun.com/thread-13108-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html 1.创建neutron数据库并授权 创建 mysql -u root -p CREATE DATABASE neutron; 授权 GRANT ALL PRIVILEGES ON neutron.* T

Ubuntu搭建trac平台步骤

Ubuntu搭建trac平台步骤: # apt-get install apache2 # apt-get install libapache2-mod-python # apt-get install libapache2-mod-authnz-external # a2enmod authnz_ldap # apt-get install mysql-server-5.5  (设置root密码,如:123456) # apt-get install python-mysqldb # apt-

Ubuntu搭建 Apache、MySQL、PHP环境

以Ubuntu 16.04为例: 1.安装MysSQL 打开命令行输入 :sudo apt-get install mysql-server 输入管理员密码 选择Y 在安装的中间会出现输入Mysql的管理员密码的提示,设置一下Mysql的密码: 安装完成后查看服务:输入 sudo netstat -tap | grep mysql 显示监听的端口即表示安装成功 2.安装Apache 在命令行输入 sudo apt-get install apache2 输入管理员密码 并选择Y 检查是否安装成功