openstack-ansible Chapter 4. Deployment configuration

Initial environment configuration

  1. Copy the contents of the /opt/openstack-ansible/etc/openstack_deploy directory to the/etc/openstack_deploy directory.
  2. Change to the /etc/openstack_deploy directory.
  3. Copy the openstack_user_config.yml.example file to/etc/openstack_deploy/openstack_user_config.yml.

shared-infra_hosts有哪些物理机器上可以运行容器来运行openstack服务如databases, memcached, and RabbitMQ,

For details about how the inventory is generated from the environment configuration, seeOpenStack-Ansible Inventory.

Affinity

OpenStack-Ansible 会动态的把容器分布到部署机器上,Using shared-infra_hosts as an example

shared-infra_hosts:
  infra1:
    ip: 172.29.236.101
  infra2:
    ip: 172.29.236.102
  infra3:
    ip: 172.29.236.103

那么,每台机器都会部署a single database container, a single memcached container, and a single RabbitMQ。

如果不需要部署RabbitMQ:

shared-infra_hosts:
  infra1:
    affinity:
      rabbit_mq_container: 0
    ip: 172.29.236.101
  infra2:
    affinity:
      rabbit_mq_container: 0
    ip: 172.29.236.102
  infra3:
    affinity:
      rabbit_mq_container: 0
    ip: 172.29.236.103

Configuring target host networking

cidr_networks section配置每个网络的IP address ranges

cidr_networks:
# Management (same range as br-mgmt on the target hosts)
container: CONTAINER_MGMT_CIDR
# Tunnel endpoints for VXLAN tenant networks
# (same range as br-vxlan on the target hosts)
tunnel: TUNNEL_CIDR
#Storage (same range as br-storage on the target hosts)
storage: STORAGE_CIDR

比如:203.0.113.0/24

Configure the existing IP addresses in the used_ips section:

used_ips:
  - EXISTING_IP_ADDRESSES

使用过的IP包括前面manually configured on target hosts, internal load balancers, service network bridge, deployment hosts

Configure load balancing in the global_overrides section:

global_overrides:
  # Internal load balancer VIP address
  internal_lb_vip_address: INTERNAL_LB_VIP_ADDRESS
  # External (DMZ) load balancer VIP address
  external_lb_vip_address: EXTERNAL_LB_VIP_ADDRESS
  # Container network bridge device
  management_bridge: "MGMT_BRIDGE"
  # Tunnel network bridge device
  tunnel_bridge: "TUNNEL_BRIDGE"

Configure the management network in the provider_networks subsection:

provider_networks:
  - network:
      group_binds:
        - all_containers
        - hosts
      type: "raw"
      container_bridge: "br-mgmt"
      container_interface: "eth1"
      container_type: "veth"
      ip_from_q: "container"
      is_container_address: true
      is_ssh_address: true

比如要配置可选的storage network:

provider_networks:
  - network:
      group_binds:
        - glance_api
        - cinder_api
        - cinder_volume
        - nova_compute
      type: "raw"
      container_bridge: "br-storage"
      container_type: "veth"
      container_interface: "eth2"
      ip_from_q: "storage"

Configure OpenStack Networking VXLAN tunnel/overlay networks in the provider_networkssubsection:

provider_networks:
  - network:
      group_binds:
        - neutron_linuxbridge_agent
      container_bridge: "br-vxlan"
      container_type: "veth"
      container_interface: "eth10"
      ip_from_q: "tunnel"
      type: "vxlan"
      range: "TUNNEL_ID_RANGE"
      net_name: "vxlan"

Configure OpenStack Networking flat (untagged) and VLAN (tagged) networks in theprovider_networks subsection:

provider_networks:
  - network:
      group_binds:
        - neutron_linuxbridge_agent
      container_bridge: "br-vlan"
      container_type: "veth"
      container_interface: "eth12"
      host_bind_override: "PHYSICAL_NETWORK_INTERFACE"
      type: "flat"
      net_name: "flat"
  - network:
      group_binds:
        - neutron_linuxbridge_agent
      container_bridge: "br-vlan"
      container_type: "veth"
      container_interface: "eth11"
      type: "vlan"
      range: VLAN_ID_RANGE
      net_name: "vlan"

Adding static routes to network interfaces

可选,每个route都需要a destination network in CIDR notation and a gateway,比如:

provider_networks:
  - network:
      group_binds:
        - glance_api
        - cinder_api
        - cinder_volume
        - nova_compute
      type: "raw"
      container_bridge: "br-storage"
      container_interface: "eth2"
      container_type: "veth"
      ip_from_q: "storage"
      static_routes:
        - cidr: 10.176.0.0/12
          gateway: 172.29.248.1

效果是其在/etc/network/interfaces.d/eth2.cfg增加了

post-up ip route add 10.176.0.0/12 via 172.29.248.1 || true

Setting an MTU on a network interface

对于存储网络很有用:

provider_networks:
  - network:
      group_binds:
        - glance_api
        - cinder_api
        - cinder_volume
        - nova_compute
      type: "raw"
      container_bridge: "br-storage"
      container_interface: "eth2"
      container_type: "veth"
      container_mtu: "9000"
      ip_from_q: "storage"
      static_routes:
        - cidr: 10.176.0.0/12
          gateway: 172.29.248.1

The example above enables jumbo frames by setting the MTU on the storage network to 9000

Configuring target hosts

Configure a list containing at least three infrastructure target hosts in the shared-infra_hostssection:

shared-infra_hosts:
  infra01:
    ip: INFRA01_IP_ADDRESS
  infra02:
    ip: INFRA02_IP_ADDRESS
  infra03:
    ip: INFRA03_IP_ADDRESS
  infra04: ...

Configure a list containing at least two infrastructure target hosts in the os-infra_hostssection (you can reuse previous hosts as long as their name and ip is consistent):

os-infra_hosts:
  infra01:
    ip: INFRA01_IP_ADDRESS
  infra02:
    ip: INFRA02_IP_ADDRESS
  infra03:
    ip: INFRA03_IP_ADDRESS
  infra04: ...

Configure a list of at least one keystone target host in the identity_hosts section:

identity_hosts:
  infra1:
    ip: IDENTITY01_IP_ADDRESS
  infra2: ...

Configure a list containing at least one compute target host in the compute_hosts section:

compute_hosts:
  compute001:
    ip: COMPUTE001_IP_ADDRESS
  compute002: ...

。。。。。。。

Configuring service credentials

Configuring the Compute (nova) service (optional)

Configuring the Image (glance) service

Configuring the Block (cinder) storage service (optional)

Configuring HAProxy (optional)

最好使用硬件HA在配置服务HA

To deploy HAProxy within your OpenStack-Ansible environment, define target hosts to run HAProxy:

haproxy_hosts:
  infra1:
    ip: 172.29.236.101
  infra2:
    ip: 172.29.236.102
  infra3:
    ip: 172.29.236.103

Configuring the Telemetry (ceilometer) service (optional)

Configuring the Identity service (keystone) (optional)

Overriding OpenStack configuration defaults

Overriding .conf files

比如要在nova.conf设置

[DEFAULT]
remove_unused_original_minimum_age_seconds = 43200

[libvirt]
cpu_mode = host-model
disk_cachemodes = file=directsync,block=none

[database]
idle_timeout = 300
max_pool_size = 10

可以在/etc/openstack_deploy/user_variables.yml配置:

nova_nova_conf_overrides:
  DEFAULT:
    remove_unused_original_minimum_age_seconds: 43200
  libvirt:
    cpu_mode: host-model
    disk_cachemodes: file=directsync,block=none
  database:
    idle_timeout: 300
    max_pool_size: 10

如果是对特定的server配置:

compute_hosts:
  900089-compute001:
    ip: 192.0.2.10
    host_vars:
      nova_nova_conf_overrides:
        DEFAULT:
          remove_unused_original_minimum_age_seconds: 43200
        libvirt:
          cpu_mode: host-model
          disk_cachemodes: file=directsync,block=none
        database:
          idle_timeout: 300
          max_pool_size: 10

Overriding .json files

用来adjust the default policies

/etc/openstack_deploy/user_variables.yml:

keystone_policy_overrides:
  identity:foo: "rule:admin_required"
  identity:bar: "rule:admin_required"

Currently available overrides

Galera:
galera_client_my_cnf_overrides
galera_my_cnf_overrides
galera_cluster_cnf_overrides
galera_debian_cnf_overrides
Ceilometer:
ceilometer_policy_overrides
ceilometer_ceilometer_conf_overrides
ceilometer_api_paste_ini_overrides
ceilometer_event_definitions_yaml_overrides
ceilometer_event_pipeline_yaml_overrides
ceilometer_pipeline_yaml_overrides
Cinder:
cinder_policy_overrides
cinder_rootwrap_conf_overrides
cinder_api_paste_ini_overrides
cinder_cinder_conf_overrides
Glance:
glance_glance_api_paste_ini_overrides
glance_glance_api_conf_overrides
glance_glance_cache_conf_overrides
glance_glance_manage_conf_overrides
glance_glance_registry_paste_ini_overrides
glance_glance_registry_conf_overrides
glance_glance_scrubber_conf_overrides
glance_glance_scheme_json_overrides
glance_policy_overrides
Heat:
heat_heat_conf_overrides
heat_api_paste_ini_overrides
heat_default_yaml_overrides
heat_aws_cloudwatch_alarm_yaml_overrides
heat_aws_rds_dbinstance_yaml_overrides
heat_policy_overrides
Keystone:
keystone_keystone_conf_overrides
keystone_keystone_default_conf_overrides
keystone_keystone_paste_ini_overrides
keystone_policy_overrides
Neutron:
neutron_neutron_conf_overrides
neutron_ml2_conf_ini_overrides
neutron_dhcp_agent_ini_overrides
neutron_api_paste_ini_overrides
neutron_rootwrap_conf_overrides
neutron_policy_overrides
neutron_dnsmasq_neutron_conf_overrides
neutron_l3_agent_ini_overrides
neutron_metadata_agent_ini_overrides
neutron_metering_agent_ini_overrides
Nova:
nova_nova_conf_overrides
nova_rootwrap_conf_overrides
nova_api_paste_ini_overrides
nova_policy_overrides
Swift:
swift_swift_conf_overrides
swift_swift_dispersion_conf_overrides
swift_proxy_server_conf_overrides
swift_account_server_conf_overrides
swift_account_server_replicator_conf_overrides
swift_container_server_conf_overrides
swift_container_server_replicator_conf_overrides
swift_object_server_conf_overrides
swift_object_server_replicator_conf_overrides
Tempest:
tempest_tempest_conf_overrides
pip:
pip_global_conf_overrides

Configuring Identity service (keystone) federation (optional)

时间: 2024-07-30 23:48:17

openstack-ansible Chapter 4. Deployment configuration的相关文章

在openstack环境中安装rackspace private cloud --5 Deployment configuration

运行Ansible playbooks之前,需要配置taget host Prerequisites 1. cp -r /opt/openstack-ansible/etc/openstack_deploy /etc/ 2. cd /etc/openstack_deploy cp openstack_user_config.yml.example openstack_user_config.yml Configuring target host networking Configuring ta

自动化运维工具ansible的基本应用

在很多场景中我们都需要在多个主机上执行相同的命令或者是做相同的配置工作,此时,为了简化操作,我们可以借助一些自动化的工具来完成我们的需求,这种工具我们称之为自动化运维工具.ansible就是其中之一,下面我们就来用ansible来实现一些简单操作. 下面是ansible可以实现很多工具的功能,框架图如下所示:ansible不能实现操作系统的安装 ansible作者就是早期puppet和func的维护者之一,因为ansible充分吸取了puppet和func的优势,又力图避免他们的劣势. OS P

OpenStack教程-04.在CentOS7.5上安装OpenStack-Rocky-安装Glance镜像服务组件

上篇文章分享了keystone的安装配置,本文接着分享openstack的镜像服务glance. --------------- 完美的分割线 --------------- 4.0.glance概述 1)glance作用和特性 用户使用镜像服务 (glance) 允许来创建,查询虚拟机镜像.它提供了一个 REST API,允许查询虚拟机镜像的 metadata 并获取一个现存的镜像 可以将虚拟机镜像存储到各种位置,如简单的文件系统或者是对象存储系统,例如 OpenStack 对象存储, 并通过

ORLEANS REMOTE DEPLOYMENT

Orleans Remote Deployment Table of Contents Overview: 1 Prerequisites. 2 Deployment Steps. 2 Orleans Deployment Manifest 3 Orleans Silo Configuration. 4 Gateway Load Shedding. 5 Orleans Powershell Scripts. 6 Deploying Orleans using Powershell Script

ansible安装drbd+nfs+keepalived

ansible管理机:192.168.8.35 名称:kick tomcat主机: 192.168.8.234,192.168.8.235 VIP  : 192.168.8.100 系统版本: Centos7.2 ##### 实验软件下载地址 配置文件:  http://pan.baidu.com/s/1eSou1Bs NFS:           http://pan.baidu.com/s/1kVieBgN DRBD:        http://pan.baidu.com/s/1nvkIx

openstack 之 Kolla部署指南(容器化方式)

现在Openstack社区的安装部署方式已经开始推荐使用kolla进行部署,kolla项目现在包括两个子项目:kolla-ansible和kolla-kubernetes,其中kolla-ansible应用于生产环境案例多些并且使用广泛一些,本文档kolla是指kolla-ansible. kolla-ansible项目是基于ansible playbook的部署方式,原来openstack ansible的部署方式支持baremetel和lxc容器两种方式进行部署,kolla的部署方式是完全基

Docker Resources

Menu Main Resources Books Websites Documents Archives Community Blogs Personal Blogs Videos Related Projects OS Virtual Machine Competitors Management Tools Paas Platforms Integration Projects Monitoring Networking Continuous Integration Development

CNCF LandScape Summary

CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database Vitess:itess is a database clustering system for horizontal scaling of MySQL. Apache CarbonData:Apache CarbonData is an indexed columnar data format for fast analyt

Go语言(golang)开源项目大全

转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析器控制台用户界面加密数据处理数据结构数据库和存储开发工具分布式/网格计算文档编辑器Encodings and Character SetsGamesGISGo ImplementationsGraphics and AudioGUIs and Widget ToolkitsHardwareLangu