在每个target host上执行以下操作:
Deployment host到taget host无密码登陆:
Copy Deployment hos的public key到taget /root/.ssh/authorized_keys
ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.2.22
3.13.0-34-generic
or later
# apt-get install bridge-utils debootstrap ifenslave ifenslave-2.6 \
lsof lvm2 ntp ntpdate openssh-server sudo tcpdump vlan
加入kernel 模块到/etc/modules来enable VLAN和接口bond
# echo ‘bonding‘ >> /etc/modules
# echo ‘8021q‘ >> /etc/modules
Configure NTP
Reboot the host to activate the changes
Cinder节点上要一个cinder-volumes VG,metadata size必须是 2048
pvcreate --metadatasize 2048 /dev/vdb
vgcreate cinder-volumes /dev/vdb
target hosts上的网络必须手动配置因为它们随环境不同而变化很大。
target hosts contains the following components:
可以配置bond:
Bond1 (eth0/2) static IP address 作为管理网络
Bond2 (eth1/3) without an IP address
Bond0 interface and br-mgmt bridge with a static IP address.
bond1 interface and br-vxlan bridge with a static IP address.
VLAN br-vlan bridge on the bond1 interface without an IP
the bond0 interface and br-storage bridge with a static IP address.
Networks:
Addresses:
In VM:
sudo apt-get install vlan
配置taget上的 /etc/network/interfaces文件如下:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# NOTE: the primary ethernet device is defined in
# /etc/network/interfaces.d/eth0
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg
# Physical interface 1
auto eth1
iface eth1 inet manual
bond-master bond0
bond-primary eth1
# Physical interface 2
auto eth2
iface eth2 inet manual
bond-master bond1
bond-primary eth2
# Physical interface 3
auto eth3
iface eth3 inet manual
bond-master bond0
# Physical interface 4
auto eth4
iface eth4 inet manual
bond-master bond1
# Bond interface 0 (physical interfaces 1 and 3)
auto bond0
iface bond0 inet static
bond-slaves eth1 eth3
bond-mode active-backup
bond-miimon 100
bond-downdelay 200
bond-updelay 200
address 192.168.2.112
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 69.20.0.164 69.20.0.196
# Bond interface 1 (physical interfaces 2 and 4)
auto bond1
iface bond1 inet manual
bond-slaves eth2 eth4
bond-mode active-backup
bond-miimon 100
bond-downdelay 250
bond-updelay 250
# Container management VLAN interface
iface bond0.10 inet manual
vlan-raw-device bond0
# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
iface bond1.30 inet manual
vlan-raw-device bond1
# Storage network VLAN interface (optional)
iface bond0.20 inet manual
vlan-raw-device bond0
# Container management bridge
auto br-mgmt
iface br-mgmt inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references tagged interface
bridge_ports bond0.10
address 172.29.236.11
netmask 255.255.252.0
dns-nameservers 69.20.0.164 69.20.0.196
# OpenStack Networking VXLAN (tunnel/overlay) bridge
auto br-vxlan
iface br-vxlan inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references tagged interface
bridge_ports bond1.30
address 172.29.240.11
netmask 255.255.252.0
# OpenStack Networking VLAN bridge
auto br-vlan
iface br-vlan inet manual
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references untagged interface
bridge_ports bond1
# Storage bridge (optional)
auto br-storage
iface br-storage inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port reference tagged interface
bridge_ports bond0.20
address 172.29.244.11
netmask 255.255.252.0
Sudo service networking restart
之后验证网络配置:
ubuntu@rpc-3:~$ ifconfig -a
bond0 Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet addr:192.168.2.112 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1642 errors:0 dropped:611 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:89560 (89.5 KB) TX bytes:4360 (4.3 KB)
bond1 Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1643 errors:0 dropped:409 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:89610 (89.6 KB) TX bytes:3340 (3.3 KB)
bond0.10 Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1382 (1.3 KB)
bond0.20 Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1382 (1.3 KB)
bond1.30 Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1296 (1.2 KB)
br-mgmt Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet addr:172.29.236.11 Bcast:172.29.239.255 Mask:255.255.252.0
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
br-storage Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet addr:172.29.244.11 Bcast:172.29.247.255 Mask:255.255.252.0
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
br-vlan Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:309 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12444 (12.4 KB) TX bytes:180 (180.0 B)
br-vxlan Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet addr:172.29.240.11 Bcast:172.29.243.255 Mask:255.255.252.0
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
eth0 Link encap:Ethernet HWaddr fa:16:3e:1b:3f:54
inet addr:192.168.2.22 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::f816:3eff:fe1b:3f54/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1454 Metric:1
RX packets:724 errors:0 dropped:0 overruns:0 frame:0
TX packets:1149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68352 (68.3 KB) TX bytes:104396 (104.3 KB)
eth1 Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:820 errors:0 dropped:174 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44716 (44.7 KB) TX bytes:3504 (3.5 KB)
eth2 Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:821 errors:0 dropped:1 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44766 (44.7 KB) TX bytes:2762 (2.7 KB)
eth3 Link encap:Ethernet HWaddr fa:16:3e:59:7b:0a
inet6 addr: fe80::f816:3eff:fe59:7b0a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:822 errors:0 dropped:437 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44844 (44.8 KB) TX bytes:856 (856.0 B)
eth4 Link encap:Ethernet HWaddr fa:16:3e:51:2d:1a
inet6 addr: fe80::f816:3eff:fe51:2d1a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:822 errors:0 dropped:408 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44844 (44.8 KB) TX bytes:578 (578.0 B)
在openstack环境中安装rackspace private cloud --4 配置Target hosts
原文:http://www.cnblogs.com/allcloud/p/4896204.html