summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-osa/templates
diff options
context:
space:
mode:
authorchigang <chigang@huawei.com>2017-07-04 13:21:12 +0800
committerchigang <chigang@huawei.com>2017-07-04 13:21:12 +0800
commitf93fc4fc70694d21f136ae1599b13fd237018b74 (patch)
tree7cc8082d63c4dcd98123c34b1dc0da56de00bfa7 /deploy/adapters/ansible/roles/config-osa/templates
parent95ecdb773c9fa90f9e4f1f792f5cc5dc8328fd6a (diff)
Fix keepalived ping address
JIRA:- Replace OSA default address with ntp_server address. OSA will use it to check internet connection. Rename some roles that make users confused. Change-Id: I4dd7e242e427e5bc3a611450a3bc436e44a8fefe Signed-off-by: chigang <chigang@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/config-osa/templates')
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/ansible.cfg3
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/create-flavor.yml.j215
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/create-network.yml.j241
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2232
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j248
5 files changed, 339 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/ansible.cfg b/deploy/adapters/ansible/roles/config-osa/templates/ansible.cfg
new file mode 100644
index 00000000..41502fbf
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/templates/ansible.cfg
@@ -0,0 +1,3 @@
+[ssh_connection]
+retries = 5
+scp_if_ssh = True
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/create-flavor.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/create-flavor.yml.j2
new file mode 100644
index 00000000..b33cd414
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/templates/create-flavor.yml.j2
@@ -0,0 +1,15 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+- name: Create flavor
+ hosts: utility_container[0]
+ max_fail_percentage: 20
+ user: root
+ roles:
+ - os-flavor
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/create-network.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/create-network.yml.j2
new file mode 100644
index 00000000..419b9b18
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/templates/create-network.yml.j2
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+- name: Create external network
+ hosts: utility_container[0]
+ max_fail_percentage: 20
+ user: root
+ tasks:
+ - name: create external net
+ shell: |
+ . /root/openrc;
+ openstack network create --share --external \
+ --provider-physical-network {{ public_net_info.provider_network }} \
+ --provider-network-type {{ public_net_info.type }} {{ public_net_info.network }};
+ when: {{ public_net_info.enable }} == True
+ and "{{ public_net_info.type }}" == "flat"
+
+ - name: create external net
+ shell: |
+ . /root/openrc;
+ openstack network create --share --external \
+ --network-segment {{ public_net_info.segment_id }} \
+ --provider-network-type {{ public_net_info.type }} {{ public_net_info.network }};
+ when: {{public_net_info.enable}} == True
+ and "{{ public_net_info.type }}" != "flat"
+
+ - name: create external subnet
+ shell: |
+ . /root/openrc;
+ openstack subnet create --network "{{ public_net_info.network }}" \
+ --allocation-pool \
+ start={{ public_net_info.floating_ip_start }},end={{ public_net_info.floating_ip_end }} \
+ --gateway "{{ public_net_info.external_gw }}" \
+ --subnet-range "{{ public_net_info.floating_ip_cidr }}" \
+ "{{ public_net_info.subnet }}"
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
new file mode 100644
index 00000000..2a24113b
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
@@ -0,0 +1,232 @@
+---
+cidr_networks:
+ container: 10.1.0.0/24
+ tunnel: 172.29.240.0/22
+ storage: 172.16.2.0/24
+
+used_ips:
+ - "10.1.0.1,10.1.0.55"
+ - "10.1.0.100,10.1.0.110"
+ - "172.29.240.1,172.29.240.50"
+ - "172.16.2.1,172.16.2.50"
+ - "172.29.248.1,172.29.248.50"
+
+global_overrides:
+ internal_lb_vip_address: 10.1.0.22
+ external_lb_vip_address: {{ public_vip.ip }}
+ tunnel_bridge: "br-vxlan"
+ management_bridge: "br-mgmt"
+ provider_networks:
+ - network:
+ container_bridge: "br-mgmt"
+ container_type: "veth"
+ container_interface: "eth1"
+ ip_from_q: "container"
+ type: "raw"
+ group_binds:
+ - all_containers
+ - hosts
+ is_container_address: true
+ is_ssh_address: true
+ - network:
+ container_bridge: "br-vxlan"
+ container_type: "veth"
+ container_interface: "eth10"
+ ip_from_q: "tunnel"
+ type: "vxlan"
+ range: "1:1000"
+ net_name: "vxlan"
+ group_binds:
+{% if "linuxbridge" == NEUTRON_MECHANISM_DRIVERS[0] %}
+ - neutron_linuxbridge_agent
+{% else %}
+ - neutron_openvswitch_agent
+{% endif %}
+ - network:
+ container_bridge: "br-vlan"
+ container_type: "veth"
+ container_interface: "eth12"
+ host_bind_override: "eth12"
+ type: "flat"
+ net_name: "{{ public_net_info.provider_network }}"
+ group_binds:
+{% if "linuxbridge" == NEUTRON_MECHANISM_DRIVERS[0] %}
+ - neutron_linuxbridge_agent
+{% else %}
+ - neutron_openvswitch_agent
+{% endif %}
+ - network:
+ container_bridge: "br-vlan"
+ container_type: "veth"
+ container_interface: "eth11"
+ type: "vlan"
+ range: "1:1"
+ net_name: "vlan"
+ group_binds:
+{% if "linuxbridge" == NEUTRON_MECHANISM_DRIVERS[0] %}
+ - neutron_linuxbridge_agent
+{% else %}
+ - neutron_openvswitch_agent
+{% endif %}
+ - network:
+ container_bridge: "br-storage"
+ container_type: "veth"
+ container_interface: "eth2"
+ ip_from_q: "storage"
+ type: "raw"
+ group_binds:
+ - glance_api
+ - cinder_api
+ - cinder_volume
+ - nova_compute
+
+###
+### Infrastructure
+###
+
+# galera, memcache, rabbitmq, utility
+shared-infra_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# repository (apt cache, python packages, etc)
+repo-infra_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# load balancer
+# Ideally the load balancer should not use the Infrastructure hosts.
+# Dedicated hardware is best for improved performance and security.
+haproxy_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# rsyslog server
+#log_hosts:
+ # log1:
+ # ip: 10.1.0.53
+
+###
+### OpenStack
+###
+
+# keystone
+identity_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# cinder api services
+storage-infra_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# glance
+# The settings here are repeated for each infra host.
+# They could instead be applied as global settings in
+# user_variables, but are left here to illustrate that
+# each container could have different storage targets.
+image_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+ container_vars:
+ limit_container_types: glance
+ glance_nfs_client:
+ - server: "{{ip_settings[groups.compute[0]]['storage']['ip']}}"
+ remote_path: "/images"
+ local_path: "/var/lib/glance/images"
+ type: "nfs"
+ options: "_netdev,auto"
+{% endfor %}
+
+# nova api, conductor, etc services
+compute-infra_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# heat
+orchestration_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# horizon
+dashboard_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# neutron server, agents (L3, etc)
+network_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# ceilometer (telemetry API)
+metering-infra_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# aodh (telemetry alarm service)
+metering-alarm_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# gnocchi (telemetry metrics storage)
+metrics_hosts:
+{% for host in groups.controller%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# nova hypervisors
+compute_hosts:
+{% for host in groups.compute%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# ceilometer compute agent (telemetry)
+metering-compute_hosts:
+{% for host in groups.compute%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+{% endfor %}
+
+# cinder volume hosts (NFS-backed)
+# The settings here are repeated for each infra host.
+# They could instead be applied as global settings in
+# user_variables, but are left here to illustrate that
+# each container could have different storage targets.
+storage_hosts:
+{% for host in groups.compute%}
+ {{host}}:
+ ip: {{ hostvars[host]['ansible_ssh_host'] }}
+ container_vars:
+ cinder_backends:
+ limit_container_types: cinder_volume
+ lvm:
+ volume_group: cinder-volumes
+ volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
+ volume_backend_name: LVM_iSCSI
+ iscsi_ip_address: "{{ip_settings[host]['storage']['ip']}}"
+{% endfor %}
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2
new file mode 100644
index 00000000..5157f758
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2
@@ -0,0 +1,48 @@
+---
+# Copyright 2014, Rackspace US, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# ##
+# ## This file contains commonly used overrides for convenience. Please inspect
+# ## the defaults for each role to find additional override options.
+# ##
+
+# # Debug and Verbose options.
+debug: false
+
+openstack_service_publicuri_proto: http
+haproxy_keepalived_external_vip_cidr: "{{ public_vip.ip }}/32"
+haproxy_keepalived_internal_vip_cidr: "10.1.0.22/32"
+haproxy_keepalived_external_interface: br-vlan
+haproxy_keepalived_internal_interface: br-mgmt
+keepalived_ping_address: "{{ ntp_server }}"
+
+{% if "openvswitch" == NEUTRON_MECHANISM_DRIVERS[0] or
+ "opendaylight" == NEUTRON_MECHANISM_DRIVERS[0]
+%}
+openstack_host_specific_kernel_modules:
+ - name: "openvswitch"
+ pattern: "CONFIG_OPENVSWITCH="
+ group: "network_hosts"
+
+neutron_plugin_type: ml2.ovs
+
+neutron_ml2_drivers_type: "local,flat,vlan,vxlan"
+
+neutron_provider_networks:
+ network_flat_networks: "*"
+ network_types: "vxlan"
+ network_vxlan_ranges: "1:1000"
+ network_mappings: "physnet:br-provider"
+{% endif %}