5e714d3308
Extend the devstack job so that it can support both single and multinode cases. Multinode mode require extra settings in devstack configuration, some of which as subnode specific, some controller specific. Also keep a simple devstack-multinode job defined for now so we can run a multinode job in devstack gate, until the full tempest multinode job is ready to match the old gate-tempest-dsvm-neutron-multinode-full-ubuntu-xenial-nv. Fixing multinode also requires sharing the CA configuration between controller and peers, overlay network configuration for communication between virtual machines and running discover_hosts for nova after the subnode has been setup. The extra orchestration required for multinode is encoded in a dedicated role to allow for jobs in other repos to re-use it. Change-Id: I2dcbd9bdb401860820e655d97aa3c4775af2827f
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
- name: Run devstack on the controller
|
|
include_role:
|
|
name: run-devstack
|
|
when: inventory_hostname == 'controller'
|
|
|
|
- name: Setup devstack on sub-nodes
|
|
block:
|
|
|
|
- name: Sync CA data to subnodes (when any)
|
|
# Only do this if the tls-proxy service is defined and enabled
|
|
include_role:
|
|
name: sync-devstack-data
|
|
when: devstack_services['tls-proxy']|default(false)
|
|
|
|
- name: Run devstack on the sub-nodes
|
|
include_role:
|
|
name: run-devstack
|
|
when: inventory_hostname in groups['subnode']
|
|
|
|
- name: Discover hosts
|
|
# Discovers compute nodes (subnodes) and maps them to cells. Only run
|
|
# on the controller node.
|
|
# NOTE(mriedem): We want to remove this if/when nova supports
|
|
# auto-registration of computes with cells, but that's not happening in
|
|
# Ocata.
|
|
# NOTE(andreaf) This is taken (NOTE included) from the discover_hosts
|
|
# function in devstack gate. Since this is now in devstack, which is
|
|
# branched, we know that the discover_hosts tool exists.
|
|
become: true
|
|
become_user: stack
|
|
shell: ./tools/discover_hosts.sh
|
|
args:
|
|
chdir: "{{ devstack_base_dir }}/devstack"
|
|
when: inventory_hostname == 'controller'
|
|
|
|
when:
|
|
- '"controller" in hostvars'
|
|
- '"subnode" in groups'
|