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
16
etc/openstack_deploy/conf.d/cinder.yml.aio
Normal file
16
etc/openstack_deploy/conf.d/cinder.yml.aio
Normal file
@ -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"
|
4
etc/openstack_deploy/conf.d/glance.yml.aio
Normal file
4
etc/openstack_deploy/conf.d/glance.yml.aio
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
image_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
4
etc/openstack_deploy/conf.d/heat.yml.aio
Normal file
4
etc/openstack_deploy/conf.d/heat.yml.aio
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
orchestration_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
4
etc/openstack_deploy/conf.d/horizon.yml.aio
Normal file
4
etc/openstack_deploy/conf.d/horizon.yml.aio
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
dashboard_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
4
etc/openstack_deploy/conf.d/keystone.yml.aio
Normal file
4
etc/openstack_deploy/conf.d/keystone.yml.aio
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
identity_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
5
etc/openstack_deploy/conf.d/neutron.yml.aio
Normal file
5
etc/openstack_deploy/conf.d/neutron.yml.aio
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
# neutron-server, neutron-agents
|
||||
network_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
8
etc/openstack_deploy/conf.d/nova.yml.aio
Normal file
8
etc/openstack_deploy/conf.d/nova.yml.aio
Normal file
@ -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
|
||||
- swift_proxy
|
||||
|
||||
# galera, memcache, rabbitmq, utility
|
||||
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:
|
||||
ip: 172.29.236.100
|
||||
|
||||
repo-infra_hosts:
|
||||
aio1:
|
||||
# Repo is set to multiple to test clustering. This test only requires x2.
|
||||
affinity:
|
||||
repo_container: 1
|
||||
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:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
network_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
||||
haproxy_hosts:
|
||||
aio1:
|
||||
ip: 172.29.236.100
|
||||
|
@ -22,9 +22,19 @@ component_skel:
|
||||
container_skel:
|
||||
galera_container:
|
||||
belongs_to:
|
||||
- database_containers
|
||||
- shared-infra_containers
|
||||
contains:
|
||||
- galera
|
||||
properties:
|
||||
log_directory: mysql_logs
|
||||
service_name: galera
|
||||
|
||||
|
||||
physical_skel:
|
||||
database_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
database_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
|
@ -25,6 +25,7 @@ component_skel:
|
||||
container_skel:
|
||||
glance_container:
|
||||
belongs_to:
|
||||
- image_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- glance_api
|
||||
@ -32,3 +33,12 @@ container_skel:
|
||||
properties:
|
||||
service_name: glance
|
||||
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:
|
||||
heat_apis_container:
|
||||
belongs_to:
|
||||
- orchestration_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- heat_api_cloudwatch
|
||||
@ -40,8 +41,18 @@ container_skel:
|
||||
service_name: heat
|
||||
heat_engine_container:
|
||||
belongs_to:
|
||||
- orchestration_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- heat_engine
|
||||
properties:
|
||||
service_name: heat
|
||||
|
||||
|
||||
physical_skel:
|
||||
orchestration_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
orchestration_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
|
@ -22,8 +22,18 @@ component_skel:
|
||||
container_skel:
|
||||
horizon_container:
|
||||
belongs_to:
|
||||
- dashboard_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- horizon
|
||||
properties:
|
||||
service_name: horizon
|
||||
|
||||
|
||||
physical_skel:
|
||||
dashboard_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
dashboard_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
|
@ -22,8 +22,18 @@ component_skel:
|
||||
container_skel:
|
||||
memcached_container:
|
||||
belongs_to:
|
||||
- memcaching_containers
|
||||
- shared-infra_containers
|
||||
contains:
|
||||
- memcached
|
||||
properties:
|
||||
service_name: memcached
|
||||
|
||||
|
||||
physical_skel:
|
||||
memcaching_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
memcaching_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
|
@ -40,6 +40,7 @@ component_skel:
|
||||
container_skel:
|
||||
nova_api_metadata_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_api_metadata
|
||||
@ -47,6 +48,7 @@ container_skel:
|
||||
service_name: nova
|
||||
nova_api_os_compute_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_api_os_compute
|
||||
@ -54,6 +56,7 @@ container_skel:
|
||||
service_name: nova
|
||||
nova_cert_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_cert
|
||||
@ -73,6 +76,7 @@ container_skel:
|
||||
service_name: nova
|
||||
nova_conductor_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_conductor
|
||||
@ -80,6 +84,7 @@ container_skel:
|
||||
service_name: nova
|
||||
nova_scheduler_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_scheduler
|
||||
@ -87,6 +92,7 @@ container_skel:
|
||||
service_name: nova
|
||||
nova_console_container:
|
||||
belongs_to:
|
||||
- compute-infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- nova_console
|
||||
@ -95,6 +101,12 @@ container_skel:
|
||||
|
||||
|
||||
physical_skel:
|
||||
compute-infra_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
compute-infra_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
compute_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
|
@ -22,8 +22,18 @@ component_skel:
|
||||
container_skel:
|
||||
rabbit_mq_container:
|
||||
belongs_to:
|
||||
- mq_containers
|
||||
- shared-infra_containers
|
||||
contains:
|
||||
- rabbitmq
|
||||
properties:
|
||||
service_name: rabbitmq
|
||||
|
||||
|
||||
physical_skel:
|
||||
mq_containers:
|
||||
belongs_to:
|
||||
- all_containers
|
||||
mq_hosts:
|
||||
belongs_to:
|
||||
- hosts
|
||||
|
@ -22,8 +22,18 @@ component_skel:
|
||||
container_skel:
|
||||
utility_container:
|
||||
belongs_to:
|
||||
- operator_containers
|
||||
- shared-infra_containers
|
||||
contains:
|
||||
- utility
|
||||
properties:
|
||||
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
|
||||
# Set the role fetch mode to any option [galaxy, 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 -----------------------------------------------------------------
|
||||
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
|
||||
# limitations under the License.
|
||||
|
||||
- hosts: localhost
|
||||
- name: Bootstrap the All-In-One (AIO)
|
||||
hosts: localhost
|
||||
user: root
|
||||
roles:
|
||||
- sshd
|
||||
- pip_install
|
||||
- bootstrap-host
|
||||
- role: "sshd"
|
||||
- role: "pip_install"
|
||||
- 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:
|
||||
src: "../etc/openstack_deploy/conf.d/{{ item.name }}"
|
||||
dest: "/etc/openstack_deploy/conf.d/{{ item.name | regex_replace('.aio$', '') }}"
|
||||
config_overrides: "{{ item.override }}"
|
||||
config_overrides: "{{ item.override | default({}) }}"
|
||||
config_type: "yaml"
|
||||
with_items:
|
||||
- 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({}) }}"
|
||||
with_items: "{{ openstack_confd_entries | default([]) }}"
|
||||
tags:
|
||||
- deploy-confd
|
||||
|
||||
|
@ -96,9 +96,14 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'cinder_scheduler_container',
|
||||
'cinder_volume',
|
||||
'cinder_volumes_container',
|
||||
'compute_all',
|
||||
'compute_containers',
|
||||
'compute_hosts',
|
||||
'compute-infra_containers',
|
||||
'compute-infra_hosts',
|
||||
'dashboard_containers',
|
||||
'dashboard_hosts',
|
||||
'database_containers',
|
||||
'database_hosts',
|
||||
'galera',
|
||||
'galera_all',
|
||||
'galera_container',
|
||||
@ -126,9 +131,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'horizon_all',
|
||||
'horizon_container',
|
||||
'hosts',
|
||||
'identity_all',
|
||||
'identity_containers',
|
||||
'identity_hosts',
|
||||
'image_containers',
|
||||
'image_hosts',
|
||||
'ironic-server_hosts',
|
||||
'ironic_conductor_container',
|
||||
'ironic_api_container',
|
||||
@ -155,6 +161,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'memcached',
|
||||
'memcached_all',
|
||||
'memcached_container',
|
||||
'memcaching_containers',
|
||||
'memcaching_hosts',
|
||||
'metering-alarm_containers',
|
||||
'metering-alarm_hosts',
|
||||
'metering-compute_container',
|
||||
@ -164,7 +172,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'metering-infra_hosts',
|
||||
'metrics_containers',
|
||||
'metrics_hosts',
|
||||
'network_all',
|
||||
'mq_containers',
|
||||
'mq_hosts',
|
||||
'network_containers',
|
||||
'network_hosts',
|
||||
'neutron_agent',
|
||||
@ -195,7 +204,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'nova_console_container',
|
||||
'nova_scheduler',
|
||||
'nova_scheduler_container',
|
||||
'os-infra_all',
|
||||
'operator_containers',
|
||||
'operator_hosts',
|
||||
'orchestration_containers',
|
||||
'orchestration_hosts',
|
||||
'os-infra_containers',
|
||||
'os-infra_hosts',
|
||||
'pkg_repo',
|
||||
@ -221,10 +233,8 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
||||
'shared-infra_all',
|
||||
'shared-infra_containers',
|
||||
'shared-infra_hosts',
|
||||
'storage-infra_all',
|
||||
'storage-infra_containers',
|
||||
'storage-infra_hosts',
|
||||
'storage_all',
|
||||
'storage_containers',
|
||||
'storage_hosts',
|
||||
'swift-proxy_containers',
|
||||
|
Loading…
Reference in New Issue
Block a user