From f02554faf22e2123ea072f4e1aa02788f0241625 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 19 Jul 2019 17:13:58 -0400 Subject: [PATCH] metal: add docs + start using no_containers We have a feature that allows us to stop using containers for a specific host inside the openstack_user_config directly. This patch starts making the metal jobs to use it instead of using an env.d override which should make the upgrade jobs much cleaner. Change-Id: I1b2116b86d1e4d68867111068aaf2d32e7f3a731 --- .../inventory/configure-inventory.rst | 21 +++++++++++++++++++ .../openstack_user_config.yml.aio.j2 | 1 + .../tasks/prepare_aio_config.yml | 7 ------- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/doc/source/reference/inventory/configure-inventory.rst b/doc/source/reference/inventory/configure-inventory.rst index 45a1f00793..51e3a29456 100644 --- a/doc/source/reference/inventory/configure-inventory.rst +++ b/doc/source/reference/inventory/configure-inventory.rst @@ -66,11 +66,32 @@ the ``is_metal`` property to ``true`` for the container group in the The use of ``container_vars`` and mapping from container groups to host groups is the same for a service deployed directly onto the host. +You can also use the ``no_containers`` option to specify a host that will have +all services deployed on metal inside of it. + .. note:: The ``cinder-volume`` component is deployed directly on the host by default. See the ``env.d/cinder.yml`` file for this example. +Example: Running all controllers on metal +----------------------------------------- +For example, if you'd like to run all your controllers on metal, you would +have the following inside your ``openstack_user_config.yml``. + + .. code-block:: yaml + + infra_hosts: + infra1: + ip: 172.39.123.11 + no_containers: true + infra2: + ip: 172.39.123.12 + no_containers: true + infra3: + ip: 172.39.123.13 + no_containers: true + Example: Running galera on dedicated hosts ------------------------------------------ diff --git a/etc/openstack_deploy/openstack_user_config.yml.aio.j2 b/etc/openstack_deploy/openstack_user_config.yml.aio.j2 index aae9fcf45e..0941df08d9 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.aio.j2 +++ b/etc/openstack_deploy/openstack_user_config.yml.aio.j2 @@ -35,6 +35,7 @@ global_overrides: # dynamic inventory testing. external_lb_vip_address: "{{ bootstrap_host_public_address | default(ansible_default_ipv4.address) }}" management_bridge: "br-mgmt" + no_containers: {{ true if 'metal' in bootstrap_host_scenarios else false }} provider_networks: - network: container_bridge: "br-mgmt" diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index 0f2398c060..251a0e2573 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -190,13 +190,6 @@ when: - "'ceph' in bootstrap_host_scenarios_expanded" -- name: Copy modified env.d file for metal scenario - copy: - src: "{{ playbook_dir }}/../etc/openstack_deploy/env.d/aio_metal.yml.example" - dest: "/etc/openstack_deploy/env.d/aio_metal.yml" - when: - - "'metal' in bootstrap_host_scenarios" - - name: Copy modified env.d file for calico scenario copy: src: "{{ playbook_dir }}/../etc/openstack_deploy/env.d/calico.yml.example"