OpenStack RDO 部署流程 - 1(自动化部署)

OpenStack RDO 部署流程 - 1(自动化部署)


0.环境:

操作系统:CentOS6.5 amd64

目标系统:OpenStack Havana Release + Open vSwitch + GRE

网络环境:

10.1.101.0/24:负责外网流量

192.168.200.0/24:负责管理流量

192.168.300.0/24:负责隧道流量

计划部署3台服务器:

1ControllerNovaNeutronKeystoneCinderGlanceNagios

hostname: nick-controller

ip-eth0: 10.1.101.192

ip-eth1: 192.168.200.192

ip-eth2: 192.168.300.192

2NetworkNeutronAgents

hostname: nick-network

ip-eth0: 10.1.101.191

ip-eth1: 192.168.200.191

ip-eth2: 192.168.300.191

3ComputeNova-computeNeutron-L2-Agent

hostname: nick-compute-1

ip-eth0: 10.1.101.190

ip-eth1: 192.168.200.190

ip-eth2: 192.168.300.190

1.操作系统配置

(1) /etc/hosts:保证所有结点互相能pinghostname

(2) resolv.conf:保证DNS服务器正常

(3) SELinux: disabled

(4) sshd config: /etc/ssh/sshd_config: Listen 0.0.0.0

(5) EPEL Repo:

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

# rpm -Uvh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm

# rpm -Uvh http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpm

(6) RDO Repo:

# rpm -Uvh http://repos.fedorapeople.org/repos/openstack/openstack-havana/rdo-release-havana-7.noarch.rpm

(7) 更新操作系统到最新版本

# yum -y update

# reboot

2. RDO安装(在控制结点上操作)

(1) yum install -y ntp

(2) yum install -y openstack-packstack

生成RDO配置文件

(3) packstack --gen-answer-file my_answers.txt

3.编辑配置文件

# 安装Nagios监控

CONFIG_NAGIOS_INSTALL=y

# 测试Cinder,会mount一个本地文件作为卷

CONFIG_CINDER_VOLUMES_CREATE=y

# 安装Compute节点

CONFIG_NOVA_COMPUTE_HOSTS=192.168.200.190

# 开启GRE隧道(暂时RDO还不支持直接部署VxLAN)

CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE=gre

# 配置隧道ID范围,映射到租户

CONFIG_NEUTRON_OVS_TUNNEL_RANGES=1:10000

# 配置隧道通讯网卡,一般建议独占

CONFIG_NEUTRON_OVS_TUNNEL_IF=eth2

# 配置网络节点

CONFIG_NEUTRON_DHCP_HOSTS=192.168.200.191

CONFIG_NEUTRON_L3_HOSTS=192.168.200.191

CONFIG_NEUTRON_LBAAS_HOSTS=192.168.200.191

CONFIG_NEUTRON_METADATA_HOSTS=192.168.200.191

4.自动化部署

packstack --answer-file my_answers.txt

5.后续问题处理

(1) Horizon访问权限

在控制节点上,编辑/etc/openstack-dashboard/local_settings

ALLOWED_HOSTS = [ '*' ]

 

(2) 网桥配置

在网络节点上,需要手动配置一次OVS网桥

eth0外网网卡配置复制到br-ex,同时清除eth0的配置信息。

/etc/sysconfig/network-scripts/ifcfg-br-ex

/etc/sysconfig/network-scripts/ifcfg-eth0

添加br-ex、br-int网桥设备,将eth0绑定到网桥上。

# ovs-vsctl add-br br-ex

# ovs-vsctl add-port br-ex eth0

# ovs-vsctl add-br br-int

# service network restart


在计算节点上,需要手动配置一次OVS网桥

# ovs-vsctl add-br br-int

# service network restart

 

(3) 虚拟网卡MTU配置,降低MTU防止不必要的分片

在网络节点上,增加dnsmasq配置文件:

/etc/neutron/dnsmasq-neutron.conf:

内容为:dhcp-option-force=26,1400

将其指定到dhcp-agent配置文件中:

/etc/neutron/dhcp_agent.ini:

dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf

# service neutron-dhcp-agent restart

 

(4) 配置NoVNC

在计算节点上:/etc/nova/nova.conf

--vnc_enabled=true

--vncserver_listen=0.0.0.0

--vncserver_proxyclient_address=192.168.200.190

--novncproxy_base_url=http://10.1.101.190:6080/vnc_auto.html

--xvpvncproxy_base_url=http://10.1.101.190:6081/console

 

(5) Libvirt配置

在计算节点上:

/etc/libvirt/libvirtd.conf:

listen_tls = 0

listen_tcp = 1

auth_tcp = "none"

auth_tls = "none"

 

/etc/libvirt/qemu.conf:

cgroup_device_acl = [

"/dev/null", "/dev/full","/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc", "/dev/hpet","/dev/net/tun",
]


/etc/sysconfig/libvirtd:
LIBVIRTD_ARGS="-d -l"


你可能感兴趣的:(OpenStack,云计算)