3、部署O+G环境
3.1、每台机器上安装gfs组件
# yum install -y glusterfs-server
3.2、在YUN21上安装packstack,并部署openstack
首先更新每台机器
# yum update -y && reboot
这里在更新的时候由于系统的原因(和最简化系统对比),没有在Centos软件源中找到google为开头的两个软件,可以通过wget的方式把系统镜像源里边的这两个软件下载到本地并安装,之后再次运行命令。
# yum install -y openstack-packstack
# packstack --gen-answer-file answers.txt
# vi answers.txt
修改密码
CONFIG_KEYSTONE_ADMIN_PW=openstack
CONFIG_PROVISION_DEMO=n
修改网络
CONFIG_NOVA_COMPUTE_PRIVIF=eth1
CONFIG_NOVA_NETWORK_PUBIF=eth0
CONFIG_NOVA_NETWORK_PRIVIF=eth1
to
CONFIG_NOVA_COMPUTE_PRIVIF=eth1
CONFIG_NOVA_NETWORK_PUBIF=eth2
CONFIG_NOVA_NETWORK_PRIVIF=eth1
(上边网卡的修改在不同的物理环境中,也就是物理机不同的环境中是不一样的,要视情况而修改,两个参数有“PRIVIF”的表示内部网络,中间一个有“PUBIF”标识的表示外部网络,也就是分配浮动IP的网络。)
添加计算节点
CONFIG_COMPUTE_HOSTS=192.168.0.121
to
CONFIG_COMPUTE_HOSTS=192.168.0.121,192.168.0.122,192.168.0.123,192.168.0.124
# packstack --answer-file answers.txt
配置网桥
[root@YUN21 ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth2 ifcfg-eth2.bak
[root@YUN21 ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-br-ex
[root@YUN21 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=OVSPort
OVS_BRIDGE=br-ex
DEVICETYPE=ovs
ONBOOT=yes
[root@YUN21 ~]# vi /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
TYPE=OVSBridge
DEVICETYPE=ovs
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.121
NETMASK=255.255.255.128
GATEWAY=10.231.29.1
[root@YUN21 ~]# vi /etc/neutron/plugin.ini
添加
network_vlan_ranges = physnet1
bridge_mappings = physnet1:br-ex
[root@YUN21 ~]# service network restart
[root@YUN21 ~]# ifconfig
br-ex Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.0.121 Bcast:192.168.0.127 Mask:255.255.255.0
inet6 addr: fe80::49b:36ff:fed3:bb5e/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:1407 errors:0 dropped:0 overruns:0 frame:0
TX packets:856 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:309542 (302.2 KiB) TX bytes:171147 (167.1 KiB)
eth1 Link encap:Ethernet HWaddr