標籤:
Installing the operating system
Install the Ubuntu Server 14.04 (Trusty Tahr) LTS 64-bit operating system
至少一個network interface可以訪問外網
locale to en_US.UTF-8
Configuring the operating system
Deployment host到taget host無密碼登陸:
Copy Deployment hos的public key到taget /root/.ssh/authorized_keysssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
kernel版本為3.13.0-34-generic or later
$ uname -aLinux rpc-3 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
# 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
Configuring LVM
OpenStack-Ansible會自動設定LVM,手動設定如下:
# pvcreate --metadatasize 2048 physical_volume_device_path# vgcreate cinder-volumes physical_volume_device_path
Designing the network
下表描述了container 網路如何串連host bridge和物理網路介面:
Target hosts 包含以下 network bridges:
- LXC internal lxcbr0:
- 必須的,自動產生,containers的外網串連,不串連到host上任何物理/邏輯介面,由iptable來做連通,它串連到container裡面的eth0。
配置在openstack_user_config.yml in theprovider_networks dictionary.
- Container management br-mgmt:
- 必須的.
- Provides management of and communication among infrastructure and OpenStack services.
- 手動建立,串連到物理/邏輯介面(一般是bond0上的一個vlan子介面),串連容器的eth1.
- container network interface配置在openstack_user_config.yml
- Storage br-storage:
- Optional.但推薦
- Provides segregated access to block storage devices between Compute and Block Storage hosts.
- 手動建立,串連到物理/邏輯介面(一般是bond0上的一個vlan子介面),串連容器的eth2.
- OpenStack Networking tunnel/overlay br-vxlan:
- Mandatory.
- Provides infrastructure for VXLAN tunnel/overlay networks.
- 手動建立,串連到物理/邏輯介面(一般是bond1上的一個vlan子介面),串連容器的eth10.
- OpenStack Networking provider br-vlan:
- Mandatory.
- Provides infrastructure for VLAN and flat networks.
- 手動建立串連到物理/邏輯介面(一般是bond1上的一個vlan子介面),串連容器的eth11. Does not contain an IP address because it only handles layer 2 connectivity.
compute service直接部署在物理機器而不是容器上。
how to use bridges for network connectivity
其中,計算節點有br-vxlan和br-vlan來分別做vxlan和vlan的聯通,br-vxlan連到物理vlan的一個子節點,br-vlan不需要。
以下是網路節點上,DHCP agent, L3 agent, and Linux Bridge agent都部署在networking-agents container
以下是計算節點上vm如何串連:
Reference architecture
| Bridge name |
Best configured on |
With a static IP |
| br-mgmt |
On every node |
Always |
| br-storage |
On every storage node |
When component is deployed on metal |
| On every compute node |
Always |
| br-vxlan |
On every network node |
When component is deployed on metal |
| On every compute node |
Always |
| br-vlan |
On every network node |
Never |
| On every compute node |
Never |
host management節點的網路設定檔:
Physical interfaces:
# Physical interface 1auto eth0iface eth0 inet manual bond-master bond0 bond-primary eth0# Physical interface 2auto eth1iface eth1 inet manual bond-master bond1 bond-primary eth1# Physical interface 3auto eth2iface eth2 inet manual bond-master bond0# Physical interface 4auto eth3iface eth3 inet manual bond-master bond1
Bonding interfaces:
# Bond interface 0 (physical interfaces 1 and 3)auto bond0iface bond0 inet static bond-slaves eth0 eth2 bond-mode active-backup bond-miimon 100 bond-downdelay 200 bond-updelay 200 address HOST_IP_ADDRESS netmask HOST_NETMASK gateway HOST_GATEWAY dns-nameservers HOST_DNS_SERVERS# Bond interface 1 (physical interfaces 2 and 4)auto bond1iface bond1 inet manual bond-slaves eth1 eth3 bond-mode active-backup bond-miimon 100 bond-downdelay 250 bond-updelay 250
Logical (VLAN) interfaces:
# Container management VLAN interfaceiface bond0.CONTAINER_MGMT_VLAN_ID inet manual vlan-raw-device bond0# OpenStack Networking VXLAN (tunnel/overlay) VLAN interfaceiface bond1.TUNNEL_VLAN_ID inet manual vlan-raw-device bond1# Storage network VLAN interface (optional)iface bond0.STORAGE_VLAN_ID inet manual vlan-raw-device bond0
Bridge devices:
# Container management bridgeauto br-mgmtiface br-mgmt inet static bridge_stp off bridge_waitport 0 bridge_fd 0 # Bridge port references tagged interface bridge_ports bond0.CONTAINER_MGMT_VLAN_ID address CONTAINER_MGMT_BRIDGE_IP_ADDRESS netmask CONTAINER_MGMT_BRIDGE_NETMASK dns-nameservers CONTAINER_MGMT_BRIDGE_DNS_SERVERS# OpenStack Networking VXLAN (tunnel/overlay) bridgeauto br-vxlaniface br-vxlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 # Bridge port references tagged interface bridge_ports bond1.TUNNEL_VLAN_ID address TUNNEL_BRIDGE_IP_ADDRESS netmask TUNNEL_BRIDGE_NETMASK# OpenStack Networking VLAN bridgeauto br-vlaniface 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-storageiface br-storage inet static bridge_stp off bridge_waitport 0 bridge_fd 0 # Bridge port reference tagged interface bridge_ports bond0.STORAGE_VLAN_ID address STORAGE_BRIDGE_IP_ADDRESS netmask STORAGE_BRIDGE_NETMASK
Example for 3 controller nodes and 2 compute nodes
- VLANs:
- Host management: Untagged/Native
- Container management: 10
- Tunnels: 30
- Storage: 20
- Networks:
- Host management: 10.240.0.0/22
- Container management: 172.29.236.0/22
- Tunnel: 172.29.240.0/22
- Storage: 172.29.244.0/22
- Addresses for the controller nodes:
- Host management: 10.240.0.11 - 10.240.0.13
- Host management gateway: 10.240.0.1
- DNS servers: 69.20.0.164 69.20.0.196
- Container management: 172.29.236.11 - 172.29.236.13
- Tunnel: no IP (because IP exist in the containers, when the components aren’t deployed directly on metal)
- Storage: no IP (because IP exist in the containers, when the components aren’t deployed directly on metal)
- Addresses for the compute nodes:
- Host management: 10.240.0.21 - 10.240.0.22
- Host management gateway: 10.240.0.1
- DNS servers: 69.20.0.164 69.20.0.196
- Container management: 172.29.236.21 - 172.29.236.22
- Tunnel: 172.29.240.21 - 172.29.240.22
- Storage: 172.29.244.21 - 172.29.244.22
Simple architecture: A single target host
openstack-ansible -- 3 Target hosts