前提

Openstack I 版本 结合Ceph分布式存储的手工安装过程记录.(仅供参考)

希望分享给任何有需要的人,在安装过程中会加上一些自己的见解,感谢各位.

网络拓扑

物理拓扑图

逻辑拓扑图

IP地址规划

Hostname Management(eth0) Gateway(eth0) Function
controller 10.0.0.11/24 10.0.0.2 Controller Node
neutron 10.0.0.21/24 10.0.0.2 Network Node
compute01 10.0.0.31/24 10.0.0.2 Compute Node
compute02 10.0.0.32/24 10.0.0.2 Compute Node
ceph-node01 10.0.0.41/24 10.0.0.2 MON/MDS Node
ceph-node02 10.0.0.42/24 10.0.0.2 OSD Node
ceph-node03 10.0.0.43/24 10.0.0.2 OSD Node

注意要求

neutron 主机拥有三块网卡,eth1 IP为10.0.1.21/24 无网关,eth2暂不配置
compute主机拥有两块网卡,eth1 IP为10.0.1.31/24 , 10.0.1.32/24

后端存储:统一使用ceph,提供rbd,cephfs,object storage
虚拟网络:GRE
基础操作系统:CentOS release 6.6 X86_64
Management:API调用,服务验证,调用存储
外网: 访问instances
计算节点:相互免密码登陆、使用共享存储、实现相互迁移

主机基本配置

笔者所有的Host都是通过VMware Workstation虚拟的机器
版本信息如下:

1
2
3
4
5
6
[root@centos ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final

所有主机都要配置以下设置

配置Yum源

删除系统默认源,防止源之间的冲突

1
2
cd /etc/yum.repo.d/
rm -f *

添加epel源
1
yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -y

添加USTC源 (笔者比较习惯用这个)
1
vim /etc/yum.repo.d/ustc.repo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[ustc]
name = ustc
baseurl = http://centos.ustc.edu.cn/centos/6.6/os/x86_64/
gpgcheck=0
enable=1

[update]
name = update
baseurl = http://centos.ustc.edu.cn/centos/6.6/updates/x86_64/
gpgcheck=0
enable=1

[extras]
name = extras
baseurl = http://centos.ustc.edu.cn/centos/6.6/extras/x86_64/
gpgcheck=0
enable=1

导入RPM包签名信息

1
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

关闭iptables和SELinux

1
2
3
service iptables stop
chkconfig --level 35 iptables off
sed -i 's/enforcing/disabled/g' /etc/selinux/config

添加主机hosts解析

1
vim /etc/hosts
1
2
3
4
5
6
7
10.0.0.11       controller
10.0.0.21 neutron
10.0.0.31 compute01
10.0.0.32 compute02
10.0.0.41 ceph-node01
10.0.0.42 ceph-node02
10.0.0.43 ceph-node03

配置NTP时间服务器

1
yum install ntp -y

把配置文件默认的NTP服务器注释掉,以Controller节点作为NTP服务器
在controller主机上设置NTP服务器

1
2
3
4
echo 'server 127.127.1.0' >> /etc/ntp.conf
echo 'fudge 127.127.1.0 stratum 10' >> /etc/ntp.conf
service ntpd start
chkconfig ntpd on

在其他主机上设置NTP客户端
1
2
3
4
5
echo 'server controller' >> /etc/ntp.conf
service ntpd stop
ntpdate controller ; hwclock -w
service ntpd start
chkconfig ntpd on

配置Openstack Yum源

在controller , neutron ,compute 节点上配置

1
2
3
4
5
6
yum install yum-plugin-priorities -y
yum install http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-3.noarch.rpm -y
yum install openstack-utils -y
yum install openstack-selinux -y
yum upgrade -y
init 6

要注意的是:rdo-release-icehouse-3.noarch.rpm 这个包直接yum安装可能会出现网络不可达报错,可以先在电脑上通过浏览器下载然后上传安装.同时最后所有主机一定之执行upgrade , 因为现在icehouse最新的包是-4版本了,upgrade会自动更新的.并且可以减少需要依赖问题

所有主机准备结束后开始先安装ceph分布式存储,这个可以参考上一遍博客Ceph快速部署