Openstack Folsom 发布好久了,但由于新的组件Quantum的加入,以及知识的跨度,比如同时需要系统管理及网络工程方面的知识,所以Folsom的安装还是挺费事的。
经过几天的测试,参考各种文档,终于完成了Folsom基于双网卡的安装,香港服务器,网站空间,总结至此。
本文HTML版本见:https://github.com/888888/OpenStack-Folsom-Install-guide/blob/GRE/2NICs/OpenStack_Folsom_Install_Guide_WebVersion.rst
1. 需求说明
====================
:节点名称: NICs
:控制节点: eth0 (100.10.10.51), eth1 (192.168.100.51)
:网络节点: eth0 (100.10.10.52), eth2 (0.0.0.0)
:计算节点: eth0 (100.10.10.53)
**备注 1: ** 本文为双网卡安装Folsom设计,根据官方说明,网络节点最好采用三块网卡控制节点可以和计算节点合二为一.
**备注 2:** 本文安装指南环境为实现Folsom功能评估,力求简单方便,安全性差,不可用于生产环境。
**备注 3: ** 本文不适用于虚拟机环境.请使用物理计算机安装.
.. image::
2. 控制节点
===============
2.1. 准备系统
—————–
* 安装系统注意事项::
– ubuntu-12.10-server-amd64.iso
– 为Cinder服务预留独立分区 例如: /dev/sda5
– 提前定义好各服务器主机名及IP,尽量别改,一定要改,请修改/etc/hosts中的对应关系
* 以下所有命令均在root权限下完成,所以在装好ubuntu后,请切换到root::
sudo passwd
su
* 更新系统(依据笔者经验,安装完Folsom环境后最好别再使用dist-upgrade,以免产生些许小问题,如虚拟机获得不了ip等..)::
apt-get update
apt-get upgrade
apt-get dist-upgrade
* 因为要更新和下载的软件比较多,可以在空闲时间一次更新系统并提前安装所需要软件,以后只需要配置就行了: 也可以使用squid代理,香港虚拟主机,这样,其它几台机器不用连外网更新软件了
apt-get update && apt-get dist-upgrade -y && apt-get update -y && apt-get dist-upgrade -y && apt-get install -y rabbitmq-server ntp vlan bridge-utils keystone curl openssl glance quantum-server quantum-plugin-openvswitch nova-api nova-cert novnc nova-consoleauth nova-scheduler nova-novncproxy cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms openstack-dashboard memcached python-mysqldb mysql-server
2.2.配置网卡
————
* 主控应该有一个外网网卡::
#访问Openstack API
auto eth1
iface eth1 inet static
address 192.168.100.51
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 8.8.8.8
#管理网络和虚拟机网络合二为一
auto eth0
iface eth0 inet static
address 100.10.10.51
netmask 255.255.255.0
* 重启网络服务::
service networking restart
2.3. MySQL & RabbitMQ
————
* 安装 MySQL 和 RabbitMQ::
apt-get install mysql-server python-mysqldb rabbitmq-server
* 配置Mysql监听所有地址::
sed -i ‘s/127.0.0.1/0.0.0.0/g’ /etc/mysql/my.cnf
service mysql restart
* 为了简化安装,以后所有连接mysql服务均使用 root:password登录,将root权限更改为所有主机可以访问(默认只能本机访问)
mysql -uroot -ppassword
use mysql;
update user set host=’%’ where user=’root’ and host=’localhost’;
flush privileges;
* 创建所有必须的数据库::
create database keystone;
create database nova;
create database glance;
create database cinder;
create database quantum;
2.4. 节点时间同步
——————
* 安装时间服务器,其它节点时间同此服务器同步::
apt-get install ntp
sed -i ‘s/server ntp.ubuntu.com/server ntp.ubuntu.comserver 127.127.1.0fudge 127.127.1.0 stratum 10/g’ /etc/ntp.conf
service ntp restart
2.5. Others
——————-
* 安装其它服务::
apt-get install vlan bridge-utils
* 允许IP转发::
vi /etc/sysctl.conf
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
sysctl net.ipv4.ip_forward=1
# 检查一下
sysctl -p
2.6. Keystone
——————-
* 安装组件::
apt-get install keystone
* 编辑 /etc/keystone/keystone.conf 数据库连接::
connection = mysql://root:password@100.10.10.51/keystone
* 重启keystone并初始化数据库::
service keystone restart
keystone-manage db_sync
思念带着一种默默地忧伤,