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  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
auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0 # Physical interface
auto eth1
iface eth1 inet manual
bond-master bond1
bond-primary eth1 # Physical interface
auto eth2
iface eth2 inet manual
bond-master bond0 # Physical interface
auto eth3
iface eth3 inet manual
bond-master bond1

Bonding interfaces:

# Bond interface  (physical interfaces  and )
auto bond0
iface bond0 inet static
bond-slaves eth0 eth2
bond-mode active-backup
bond-miimon
bond-downdelay
bond-updelay
address HOST_IP_ADDRESS
netmask HOST_NETMASK
gateway HOST_GATEWAY
dns-nameservers HOST_DNS_SERVERS # Bond interface (physical interfaces and )
auto bond1
iface bond1 inet manual
bond-slaves eth1 eth3
bond-mode active-backup
bond-miimon
bond-downdelay
bond-updelay

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
bridge_fd
# 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
bridge_fd
# 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
bridge_fd
# Bridge port references untagged interface
bridge_ports bond1 # Storage bridge (optional)
auto br-storage
iface br-storage inet static
bridge_stp off
bridge_waitport
bridge_fd
# 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的更多相关文章

  1. 安装rackspace private cloud --4 配置Target hosts

    在每个target host上执行以下操作: Naming target hosts. Install the operating system. Generate and set up securi ...

  2. Openstack & Ansible

    Opennstack Open source software for creating private and public clouds Manages the servers at these ...

  3. openStack nova nova valid hosts 优化

    scheduler_default_filters=AllHostsFilterallow_resize_to_same_host=Trueallow_migrate_to_same_host=Tru ...

  4. ansible 增加本机/etc/hosts 下hostsname 与IP

    --- - hosts: all vars: IP: "{{ ansible_eth0['ipv4']['address'] }}" tasks: - name: 将原有的host ...

  5. ansible 主机清单 /etc/ansible/hosts

    主机清单 [webservers] ansible01 ansible02 ansible03 ansible04 [root@ftp:/root] > ansible webservers - ...

  6. ansible服务部署与使用

    第1章 ssh+key实现基于密钥连接(ansible使用前提) 说明:    ansible其功能实现基于SSH远程连接服务    使用ansible需要首先实现ssh密钥连接 1.1 部署ssh ...

  7. Ansible安装配置及使用

    一.Ansible特点 1.不需要安装客户端,通过sshd通信 2.基于模块工作,模块可以由任何序言开发 3.不仅支持命令行使用模块,也支持编写yaml格式的playbook 4.支持sudo 5.有 ...

  8. Ansible自动化运维笔记2(Ansible的组件介绍)

    1.Ansible Inventory (1)静态主机文件 默认的ansible invetory是/etc/hosts文件,可以通过ANSIBLE_HOSTS环境变量或者通过运行命令的时候加上-i ...

  9. Ansible 入门指南 - 安装及 Ad-Hoc 命令使用

    安装及配置 ansible Ansilbe 管理员节点和远程主机节点通过 SSH 协议进行通信.所以 Ansible 配置的时候只需要保证从 Ansible 管理节点通过 SSH 能够连接到被管理的远 ...

随机推荐

  1. PHP-Heredoc用法:<<<EOFEOF;

    Heredoc,用来输出大段的HTML和JavaScript <<<EOF后面不能有空格. EOF;末尾的结束符必须靠边,并且前面不能有空格和缩进符. 例如: $mazey=< ...

  2. ehcache 配置持久化到硬盘(四)

    Ehcache默认配置的话 为了提高效率,所以有一部分缓存是在内存中,然后达到配置的内存对象总量,则才根据策略持久化到硬盘中,这里是有一个问题的,假如系统突然中断运行 那内存中的那些缓存,直接被释放掉 ...

  3. 处理 Java 的“Cannot allocate memory”错误

    今天在配置 DCA 服务器的时候,检验 java 版本的时候忽然遇到了一个 Cannot allocate memory 错误 [root@elcid-prod1 ~]# java -version ...

  4. 前端基础 DOM & BOM

    推荐阅读:http://www.cnblogs.com/yuanchenqi/articles/6893904.html#_label3 BOM对象 window 对象 所有浏览器都支持 window ...

  5. matlab学习笔记之基础知识(一)

    一.两种特殊数据类型 1.元胞数组   元胞数组是MATLAB的一种特殊数据类型,可以将元胞数组看做一种无所不包的通用矩阵,或者叫做广义矩阵.组成元胞数组的元素可以是任何一种数据类型的常数或者常量,每 ...

  6. LDA(Latent Dirichlet allocation)主题模型

    LDA是一种典型的词袋模型,即它认为一篇文档是由一组词构成的一个集合,词与词之间没有顺序以及先后的关系.一篇文档可以包含多个主题,文档中每一个词都由其中的一个主题生成. 它是一种主题模型,它可以将文档 ...

  7. MongoDB学习笔记—常用命令

    这里记录一下MongoDB常用的命令 数据库相关 创建数据库 use DATABASE_NAME 如果数据库不存在,则创建数据库,否则切换到指定数据库. 删除数据库:切换到要删除的数据库下,执行命令即 ...

  8. ACM解题之(ZOJ 1094) Matrix Chain Multiplication

    题目来源: 点击打开链接 题目翻译: 矩阵乘法问题是动态规划的典型例子. 假设你必须评估一个表达式,如A * B * C * D * E,其中A,B,C,D和E是矩阵.由于矩阵乘法是关联的,乘法运算的 ...

  9. springMVC中使用 RequestBody 及 Ajax POST请求 415 (Unsupported Media Type)

    使用POST请求的时候一直报错: Ajax 未设置 contentType 时会报 415 . 后台 RequestBody  承接前台参数,故对参数data的要求为“必传”“JSON”,否则会报40 ...

  10. Python基础(9)_生成器(yield表达式形式)、面向过程编程

    一.yield表达式形式 1 #装饰器,初始化含yield表达式的生成器 def init(func): def wrapper(*args,**kwargs): g=func(*args,**kwa ...