openstack-ansible -- 3 Target hosts
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_keys ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.2.22
kernel版本为3.13.0-34-generic
or later
$ uname -a Linux 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.
- 必须的.
- Provides management of and communication among infrastructure and OpenStack services.
- 手动创建,连接到物理/逻辑接口(一般是bond0上的一个vlan子接口),连接容器的eth1.
- container network interface配置在openstack_user_config.yml
- Optional.但推荐
- Provides segregated access to block storage devices between Compute and Block Storage hosts.
- 手动创建,连接到物理/逻辑接口(一般是bond0上的一个vlan子接口),连接容器的eth2.
- Mandatory.
- Provides infrastructure for VXLAN tunnel/overlay networks.
- 手动创建,连接到物理/逻辑接口(一般是bond1上的一个vlan子接口),连接容器的eth10.
- 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 1 auto eth0 iface eth0 inet manual bond-master bond0 bond-primary eth0 # Physical interface 2 auto eth1 iface eth1 inet manual bond-master bond1 bond-primary eth1 # Physical interface 3 auto eth2 iface eth2 inet manual bond-master bond0 # Physical interface 4 auto eth3 iface eth3 inet manual bond-master bond1
Bonding interfaces:
# Bond interface 0 (physical interfaces 1 and 3) auto bond0 iface 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 bond1 iface 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 interface iface bond0.CONTAINER_MGMT_VLAN_ID inet manual vlan-raw-device bond0 # OpenStack Networking VXLAN (tunnel/overlay) VLAN interface iface 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 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.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) 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.TUNNEL_VLAN_ID address TUNNEL_BRIDGE_IP_ADDRESS netmask TUNNEL_BRIDGE_NETMASK # 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.STORAGE_VLAN_ID address STORAGE_BRIDGE_IP_ADDRESS netmask STORAGE_BRIDGE_NETMASK
Example for 3 controller nodes and 2 compute nodes
- VLANs: [ul] Host management: Untagged/Native
- Container management: 10
- Tunnels: 30
- Storage: 20
-
Host management: 10.240.0.0/22
-
Host management: 10.240.0.11 - 10.240.0.13
-
Host management: 10.240.0.21 - 10.240.0.22
Simple architecture: A single target host
- JVM Tomcat性能实战
- linux思想
- Shell引号
- Java中系统属性Properties介绍 System.getProperty()参数大全-tomcat设置参数,java获取
- Hadoop2.7.2之集群搭建(单机)
- 面向模式的软件架构读书笔记
- bash自动化
- ecshop二次开发 百度地图
- Open-E DSS V7 应用系列之七 卷组和卷的管理
- Open-E DSS V7 应用系列之七 卷组和卷的管理
- Open-E DSS V7 应用系列之七 卷组和卷的管理
- Shell脚本$系列参数意义
- 架构设计:系统间通信(31)——其他消息中间件及场景应用(下1)
- Android应用架构之Retrofit使用
- OpenCV2.3.0在VS中的配置
- 如何搭建自己的网站
- 大型网站技术架构整理(Ch. 5-8)
- Eclipse将Web程序部署到Tomcat Root下面
- linux 安装jdk
- Apache服务器配置默认首页文件名和网站路径