openstack-ansible Chapter 4. Deployment configuration
Initial environment configuration
- Copy the contents of the /opt/openstack-ansible/etc/openstack_deploy directory to the/etc/openstack_deploy directory.
- Change to the /etc/openstack_deploy directory.
- 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:
ip: 172.29.236.101
infra2:
affinity:
rabbit_mq_container:
ip: 172.29.236.102
infra3:
affinity:
rabbit_mq_container:
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
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/
gateway: 172.29.248.1
效果是其在/etc/network/interfaces.d/eth2.cfg增加了
post-up ip route add 10.176.0.0/ 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: ""
ip_from_q: "storage"
static_routes:
- cidr: 10.176.0.0/
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 = [libvirt]
cpu_mode = host-model
disk_cachemodes = file=directsync,block=none [database]
idle_timeout =
max_pool_size =
可以在/etc/openstack_deploy/user_variables.yml配置:
nova_nova_conf_overrides:
DEFAULT:
remove_unused_original_minimum_age_seconds:
libvirt:
cpu_mode: host-model
disk_cachemodes: file=directsync,block=none
database:
idle_timeout:
max_pool_size:
如果是对特定的server配置:
compute_hosts:
-compute001:
ip: 192.0.2.10
host_vars:
nova_nova_conf_overrides:
DEFAULT:
remove_unused_original_minimum_age_seconds:
libvirt:
cpu_mode: host-model
disk_cachemodes: file=directsync,block=none
database:
idle_timeout:
max_pool_size:
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)
openstack-ansible Chapter 4. Deployment configuration的更多相关文章
- Openstack & Ansible
Opennstack Open source software for creating private and public clouds Manages the servers at these ...
- Mirantis OpenStack 7.0: NFVI Deployment Guide — NUMA/CPU pinning
https://www.mirantis.com/blog/mirantis-openstack-7-0-nfvi-deployment-guide-numacpu-pinning/ Compute ...
- 安装rackspace private cloud --5 Deployment configuration
运行Ansible playbooks之前,需要配置taget host Prerequisites . cp -r /opt/openstack-ansible/etc/openstack_depl ...
- openstack Icehouse发布
OpenStack 2014.1 (Icehouse) Release Notes General Upgrade Notes Windows packagers should use pbr 0.8 ...
- kolla-ansible部署openstack allinone单节点
环境准备 2 network interfaces 8GB main memory 40GB disk space 1.修改hostname hostnamectl set-hostname koll ...
- OpenStack 2018 年终盘点
目录 文章目录 目录 前言 OpenStack 一年来的成长 Nova Cinder Neutron Ironic Cyborg Octavia Kolla Magnum Zun Kuryr 从 Op ...
- [译] OpenStack Ocata 版本中的 53 个新功能盘点
原文链接:https://www.mirantis.com/blog/53-new-things-to-look-for-in-openstack-ocata/ 原文作者:Nick Chase, Ra ...
- CentOS7安装OpenStack(Rocky版)-03.安装Glance镜像服务组件(控制节点)
上篇文章分享了keystone的安装配置,本文接着分享openstack的镜像服务glance. --------------- 完美的分割线 ---------------- 3.0.glance概 ...
- Apache下配置Openstack Horizon (转)
非常详尽的Horizon配置介绍,转自 dev.cloudwatt.com Deploy Horizon from source with Apache and SSL Some companies ...
随机推荐
- hadoop报错java.io.IOException: Bad connect ack with firstBadLink as 192.168.1.218:50010
[root@linuxmain hadoop]# bin/hadoop jar hdfs3.jar com.dragon.test.CopyToHDFS Java HotSpot(TM) Client ...
- spring(13)------全面深入解析spring的AOP
一,AOP的基本思想 AOP(Aspect Oriented Programming)翻译成中文的大意是面向切面编程,主要目的解决让不该牵扯在一起的代码分离开来. (1)认识AOP 应用程序中通常包含 ...
- Linux中权限管理之sudo权限
1.suodo的操作对象是系统命令 2.root把本来只能是超级用户执行的命令赋予普通用户执行 3.设置sudo权限 命令:visudo 找到: ## Allow root to run any co ...
- Nginx学习(1)
Nginx 是一个高性能的 Web 和反向代理服务器, 它具有有很多非常优越的特性: 作为 Web 服务器:相比 Apache,Nginx 使用更少的资源,支持更多的并发连接,体现更高的效率,这点使 ...
- 修改Linux的基本配置(修改主机名修改ip地址安装JDK/Tomcat/MySQL等等)
(一)基本操作修改 修改主机名 vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=server1.itcast.cn 修改ip地址 vi /etc/s ...
- 019-Spring Boot 日志
一.概述 spring-boot默认支持info级别的日志. 日志级别:trace.debug.info.warn.error.fatal.off[关闭] 二.配置日志级别 2.1.配置文件配置日志级 ...
- 解读mysql主从配置及其原理分析(Master-Slave)
在windows下配置的,后面会在Linux下配置进行测试,需要配置mysql数据库同步的朋友可以参考下. 1.在主数据库服务器为从服务器添加一个拥有权限访问主库的用户:GRANT REPLICATI ...
- 【zabbix】zabbix忘记密码,重置密码
忘记密码这种事经常会发生,这里我们介绍一种zabbix忘记用户密码的处理方式. 原理: zabbix存储在数据库中用户名密码是经过32位,小写,md5加密过的.我们可以手动修改数据库中用户的密码. 实 ...
- 1.5 使用电脑测试MC20的发送英文短信功能
需要准备的硬件 MC20开发板 1个 https://item.taobao.com/item.htm?id=562661881042 GSM/GPRS天线 1根 https://item.taoba ...
- JAVA使用DES加密解密
在使用DES加密解密的时候,遇到了一些问题,廖记一下.如有哪位大神亲临留言指点,不胜感激. 先上代码: public DESUtil() { } //密码,长度要是8的倍数 注意此处为简单密码 简单应 ...