Implement scenario capability for AIO
In order to prepare for the ability to implement multiple integrated gate scenarios, this patch does the following: - Ensures that all inventory groups are complete and can be entered into the inventory with their own host groups instead of being forced to use the shared-os-infra group. - Splits all OpenStack service environment configurations into individual conf.d files so that scenarios can be selective about which services are deployed. - Implements the ability to set the desired scenario via an environment variable. This has already been implemented in OpenStack-CI. - The current AIO is set as the default scenario, and it is set even if there is no environment variable present. Depends-On: I5441f8f9a9c02cc0a501a9b9f7c6cbe2604f4b65 Change-Id: I99541d36aed6d4b9f83746c1cd1a5521b310f1f6
This commit is contained in:
parent
51554077c2
commit
f7a50a24b9
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
storage-infra_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
||||||
|
|
||||||
|
storage_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
||||||
|
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: "172.29.236.100"
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
image_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
orchestration_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
dashboard_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
identity_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
# neutron-server, neutron-agents
|
||||||
|
network_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
compute-infra_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
||||||
|
|
||||||
|
compute_hosts:
|
||||||
|
aio1:
|
||||||
|
ip: 172.29.236.100
|
|
@ -70,63 +70,19 @@ global_overrides:
|
||||||
- nova_compute
|
- nova_compute
|
||||||
- swift_proxy
|
- swift_proxy
|
||||||
|
|
||||||
|
# galera, memcache, rabbitmq, utility
|
||||||
shared-infra_hosts:
|
shared-infra_hosts:
|
||||||
aio1:
|
|
||||||
# Rabbitmq, and galera are set to multiples to test clustering.
|
|
||||||
affinity:
|
|
||||||
galera_container: 1
|
|
||||||
rabbit_mq_container: 1
|
|
||||||
ip: 172.29.236.100
|
|
||||||
|
|
||||||
os-infra_hosts:
|
|
||||||
aio1:
|
|
||||||
# Horizon is set to multiple to test clustering. This test only requires x2.
|
|
||||||
affinity:
|
|
||||||
horizon_container: 1
|
|
||||||
ip: 172.29.236.100
|
|
||||||
|
|
||||||
storage-infra_hosts:
|
|
||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
|
||||||
repo-infra_hosts:
|
repo-infra_hosts:
|
||||||
aio1:
|
aio1:
|
||||||
# Repo is set to multiple to test clustering. This test only requires x2.
|
|
||||||
affinity:
|
|
||||||
repo_container: 1
|
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
|
||||||
identity_hosts:
|
|
||||||
aio1:
|
|
||||||
# Keystone is set to multiple to test clustering. This test only requires x2.
|
|
||||||
affinity:
|
|
||||||
keystone_container: 1
|
|
||||||
ip: 172.29.236.100
|
|
||||||
|
|
||||||
compute_hosts:
|
|
||||||
aio1:
|
|
||||||
ip: 172.29.236.100
|
|
||||||
|
|
||||||
storage_hosts:
|
|
||||||
aio1:
|
|
||||||
ip: 172.29.236.100
|
|
||||||
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: "172.29.236.100"
|
|
||||||
|
|
||||||
log_hosts:
|
log_hosts:
|
||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
|
||||||
network_hosts:
|
|
||||||
aio1:
|
|
||||||
ip: 172.29.236.100
|
|
||||||
|
|
||||||
haproxy_hosts:
|
haproxy_hosts:
|
||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
|
|
@ -22,9 +22,19 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
galera_container:
|
galera_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- database_containers
|
||||||
- shared-infra_containers
|
- shared-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- galera
|
- galera
|
||||||
properties:
|
properties:
|
||||||
log_directory: mysql_logs
|
log_directory: mysql_logs
|
||||||
service_name: galera
|
service_name: galera
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
database_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
database_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -25,6 +25,7 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
glance_container:
|
glance_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- image_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- glance_api
|
- glance_api
|
||||||
|
@ -32,3 +33,12 @@ container_skel:
|
||||||
properties:
|
properties:
|
||||||
service_name: glance
|
service_name: glance
|
||||||
container_fs_size: 12G
|
container_fs_size: 12G
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
image_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
image_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -31,6 +31,7 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
heat_apis_container:
|
heat_apis_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- orchestration_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- heat_api_cloudwatch
|
- heat_api_cloudwatch
|
||||||
|
@ -40,8 +41,18 @@ container_skel:
|
||||||
service_name: heat
|
service_name: heat
|
||||||
heat_engine_container:
|
heat_engine_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- orchestration_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- heat_engine
|
- heat_engine
|
||||||
properties:
|
properties:
|
||||||
service_name: heat
|
service_name: heat
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
orchestration_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
orchestration_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -22,8 +22,18 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
horizon_container:
|
horizon_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- dashboard_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- horizon
|
- horizon
|
||||||
properties:
|
properties:
|
||||||
service_name: horizon
|
service_name: horizon
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
dashboard_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
dashboard_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -22,8 +22,18 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
memcached_container:
|
memcached_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- memcaching_containers
|
||||||
- shared-infra_containers
|
- shared-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- memcached
|
- memcached
|
||||||
properties:
|
properties:
|
||||||
service_name: memcached
|
service_name: memcached
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
memcaching_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
memcaching_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -40,6 +40,7 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
nova_api_metadata_container:
|
nova_api_metadata_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_api_metadata
|
- nova_api_metadata
|
||||||
|
@ -47,6 +48,7 @@ container_skel:
|
||||||
service_name: nova
|
service_name: nova
|
||||||
nova_api_os_compute_container:
|
nova_api_os_compute_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_api_os_compute
|
- nova_api_os_compute
|
||||||
|
@ -54,6 +56,7 @@ container_skel:
|
||||||
service_name: nova
|
service_name: nova
|
||||||
nova_cert_container:
|
nova_cert_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_cert
|
- nova_cert
|
||||||
|
@ -73,6 +76,7 @@ container_skel:
|
||||||
service_name: nova
|
service_name: nova
|
||||||
nova_conductor_container:
|
nova_conductor_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_conductor
|
- nova_conductor
|
||||||
|
@ -80,6 +84,7 @@ container_skel:
|
||||||
service_name: nova
|
service_name: nova
|
||||||
nova_scheduler_container:
|
nova_scheduler_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_scheduler
|
- nova_scheduler
|
||||||
|
@ -87,6 +92,7 @@ container_skel:
|
||||||
service_name: nova
|
service_name: nova
|
||||||
nova_console_container:
|
nova_console_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- compute-infra_containers
|
||||||
- os-infra_containers
|
- os-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- nova_console
|
- nova_console
|
||||||
|
@ -95,6 +101,12 @@ container_skel:
|
||||||
|
|
||||||
|
|
||||||
physical_skel:
|
physical_skel:
|
||||||
|
compute-infra_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
compute-infra_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
compute_containers:
|
compute_containers:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
- all_containers
|
- all_containers
|
||||||
|
|
|
@ -22,8 +22,18 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
rabbit_mq_container:
|
rabbit_mq_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- mq_containers
|
||||||
- shared-infra_containers
|
- shared-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
properties:
|
properties:
|
||||||
service_name: rabbitmq
|
service_name: rabbitmq
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
mq_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
mq_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -22,8 +22,18 @@ component_skel:
|
||||||
container_skel:
|
container_skel:
|
||||||
utility_container:
|
utility_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
|
- operator_containers
|
||||||
- shared-infra_containers
|
- shared-infra_containers
|
||||||
contains:
|
contains:
|
||||||
- utility
|
- utility
|
||||||
properties:
|
properties:
|
||||||
service_name: utility
|
service_name: utility
|
||||||
|
|
||||||
|
|
||||||
|
physical_skel:
|
||||||
|
operator_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
operator_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
|
|
|
@ -29,6 +29,8 @@ export BOOTSTRAP_OPTS=${BOOTSTRAP_OPTS:-''}
|
||||||
export OSA_GATE_JOB=true
|
export OSA_GATE_JOB=true
|
||||||
# Set the role fetch mode to any option [galaxy, git-clone]
|
# Set the role fetch mode to any option [galaxy, git-clone]
|
||||||
export ANSIBLE_ROLE_FETCH_MODE="git-clone"
|
export ANSIBLE_ROLE_FETCH_MODE="git-clone"
|
||||||
|
# Set the scenario to execute based on the first CLI parameter
|
||||||
|
export SCENARIO=${1:-"aio"}
|
||||||
|
|
||||||
## Functions -----------------------------------------------------------------
|
## Functions -----------------------------------------------------------------
|
||||||
info_block "Checking for required libraries." 2> /dev/null || source "$(dirname "${0}")/scripts-library.sh"
|
info_block "Checking for required libraries." 2> /dev/null || source "$(dirname "${0}")/scripts-library.sh"
|
||||||
|
|
|
@ -13,9 +13,26 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- hosts: localhost
|
- name: Bootstrap the All-In-One (AIO)
|
||||||
|
hosts: localhost
|
||||||
user: root
|
user: root
|
||||||
roles:
|
roles:
|
||||||
- sshd
|
- role: "sshd"
|
||||||
- pip_install
|
- role: "pip_install"
|
||||||
- bootstrap-host
|
- role: "bootstrap-host"
|
||||||
|
openstack_confd_entries: "{{ confd_overrides[scenario] }}"
|
||||||
|
scenario: "{{ lookup('env','SCENARIO') | default('aio', true) }}"
|
||||||
|
confd_overrides:
|
||||||
|
aio:
|
||||||
|
- name: aodh.yml.aio
|
||||||
|
- name: cinder.yml.aio
|
||||||
|
- name: ceilometer.yml.aio
|
||||||
|
- name: glance.yml.aio
|
||||||
|
- name: gnocchi.yml.aio
|
||||||
|
- name: heat.yml.aio
|
||||||
|
- name: horizon.yml.aio
|
||||||
|
- name: keystone.yml.aio
|
||||||
|
- name: neutron.yml.aio
|
||||||
|
- name: nova.yml.aio
|
||||||
|
- name: swift.yml.aio
|
||||||
|
|
||||||
|
|
|
@ -29,17 +29,9 @@
|
||||||
config_template:
|
config_template:
|
||||||
src: "../etc/openstack_deploy/conf.d/{{ item.name }}"
|
src: "../etc/openstack_deploy/conf.d/{{ item.name }}"
|
||||||
dest: "/etc/openstack_deploy/conf.d/{{ item.name | regex_replace('.aio$', '') }}"
|
dest: "/etc/openstack_deploy/conf.d/{{ item.name | regex_replace('.aio$', '') }}"
|
||||||
config_overrides: "{{ item.override }}"
|
config_overrides: "{{ item.override | default({}) }}"
|
||||||
config_type: "yaml"
|
config_type: "yaml"
|
||||||
with_items:
|
with_items: "{{ openstack_confd_entries | default([]) }}"
|
||||||
- name: swift.yml.aio
|
|
||||||
override: "{{ swift_conf_overrides | default({}) }}"
|
|
||||||
- name: aodh.yml.aio
|
|
||||||
override: "{{ aodh_conf_overrides | default({}) }}"
|
|
||||||
- name: ceilometer.yml.aio
|
|
||||||
override: "{{ ceilometer_conf_overrides | default({}) }}"
|
|
||||||
- name: gnocchi.yml.aio
|
|
||||||
override: "{{ gnocchi_conf_overrides | default({}) }}"
|
|
||||||
tags:
|
tags:
|
||||||
- deploy-confd
|
- deploy-confd
|
||||||
|
|
||||||
|
|
|
@ -96,9 +96,14 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'cinder_scheduler_container',
|
'cinder_scheduler_container',
|
||||||
'cinder_volume',
|
'cinder_volume',
|
||||||
'cinder_volumes_container',
|
'cinder_volumes_container',
|
||||||
'compute_all',
|
|
||||||
'compute_containers',
|
'compute_containers',
|
||||||
'compute_hosts',
|
'compute_hosts',
|
||||||
|
'compute-infra_containers',
|
||||||
|
'compute-infra_hosts',
|
||||||
|
'dashboard_containers',
|
||||||
|
'dashboard_hosts',
|
||||||
|
'database_containers',
|
||||||
|
'database_hosts',
|
||||||
'galera',
|
'galera',
|
||||||
'galera_all',
|
'galera_all',
|
||||||
'galera_container',
|
'galera_container',
|
||||||
|
@ -126,9 +131,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'horizon_all',
|
'horizon_all',
|
||||||
'horizon_container',
|
'horizon_container',
|
||||||
'hosts',
|
'hosts',
|
||||||
'identity_all',
|
|
||||||
'identity_containers',
|
'identity_containers',
|
||||||
'identity_hosts',
|
'identity_hosts',
|
||||||
|
'image_containers',
|
||||||
|
'image_hosts',
|
||||||
'ironic-server_hosts',
|
'ironic-server_hosts',
|
||||||
'ironic_conductor_container',
|
'ironic_conductor_container',
|
||||||
'ironic_api_container',
|
'ironic_api_container',
|
||||||
|
@ -155,6 +161,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'memcached',
|
'memcached',
|
||||||
'memcached_all',
|
'memcached_all',
|
||||||
'memcached_container',
|
'memcached_container',
|
||||||
|
'memcaching_containers',
|
||||||
|
'memcaching_hosts',
|
||||||
'metering-alarm_containers',
|
'metering-alarm_containers',
|
||||||
'metering-alarm_hosts',
|
'metering-alarm_hosts',
|
||||||
'metering-compute_container',
|
'metering-compute_container',
|
||||||
|
@ -164,7 +172,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'metering-infra_hosts',
|
'metering-infra_hosts',
|
||||||
'metrics_containers',
|
'metrics_containers',
|
||||||
'metrics_hosts',
|
'metrics_hosts',
|
||||||
'network_all',
|
'mq_containers',
|
||||||
|
'mq_hosts',
|
||||||
'network_containers',
|
'network_containers',
|
||||||
'network_hosts',
|
'network_hosts',
|
||||||
'neutron_agent',
|
'neutron_agent',
|
||||||
|
@ -195,7 +204,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'nova_console_container',
|
'nova_console_container',
|
||||||
'nova_scheduler',
|
'nova_scheduler',
|
||||||
'nova_scheduler_container',
|
'nova_scheduler_container',
|
||||||
'os-infra_all',
|
'operator_containers',
|
||||||
|
'operator_hosts',
|
||||||
|
'orchestration_containers',
|
||||||
|
'orchestration_hosts',
|
||||||
'os-infra_containers',
|
'os-infra_containers',
|
||||||
'os-infra_hosts',
|
'os-infra_hosts',
|
||||||
'pkg_repo',
|
'pkg_repo',
|
||||||
|
@ -221,10 +233,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||||
'shared-infra_all',
|
'shared-infra_all',
|
||||||
'shared-infra_containers',
|
'shared-infra_containers',
|
||||||
'shared-infra_hosts',
|
'shared-infra_hosts',
|
||||||
'storage-infra_all',
|
|
||||||
'storage-infra_containers',
|
'storage-infra_containers',
|
||||||
'storage-infra_hosts',
|
'storage-infra_hosts',
|
||||||
'storage_all',
|
|
||||||
'storage_containers',
|
'storage_containers',
|
||||||
'storage_hosts',
|
'storage_hosts',
|
||||||
'swift-proxy_containers',
|
'swift-proxy_containers',
|
||||||
|
|
Loading…
Reference in New Issue