5b6d26c821
This introduce needed changes to be able to deploy an additional cell via oooq. If additional_cell is set to true after the overcloud got deployed the additional cell gets deployed. Todo this information gets extracted from the overcloud stack, which is requried as input to the second heat stack, where the additional cell is managed with. As a reference [1] is the scenario which is installed adding a single additional cell. config/general_config/featureset063.yml is used for the configuration and config/nodes/1ctlr_1cellctrl_1comp.yml has a nova config example. [1] https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/features/deploy_cellv2_basic.html Depends-On: https://review.opendev.org/691688 Depends-On: https://review.opendev.org/704661 Change-Id: I2de781fcec64e862bde34929547b578d2af0c16c
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
---
|
|
# Note.. the order of heat templates and args is very important. The last environment that sets a variable takes precedent.
|
|
|
|
|
|
- name: Extract the number of cell controllers to be deployed (from cell topology_map)
|
|
set_fact:
|
|
number_of_cell_controllers: |-
|
|
{% if cell_topology_map.CellController is defined -%}
|
|
{{ cell_topology_map.CellController.scale }}
|
|
{%- else -%}
|
|
1
|
|
{%- endif %}
|
|
when:
|
|
- cell_topology_map is defined
|
|
|
|
- name: Extract the cell controller flavor from cell topology_map
|
|
set_fact:
|
|
cell_controller_flavor: |-
|
|
{% if cell_topology_map.CellController is defined and cell_topology_map.CellController.flavor is defined -%}
|
|
{{ cell_topology_map.CellController.flavor }}
|
|
{%- else -%}
|
|
baremetal
|
|
{%- endif %}
|
|
when:
|
|
- cell_topology_map is defined
|
|
|
|
- name: Extract the number of cell computes to be deployed (from cell topology_map)
|
|
set_fact:
|
|
number_of_cell_computes: |-
|
|
{% if cell_topology_map.Compute is defined -%}
|
|
{{ cell_topology_map.Compute.scale }}
|
|
{%- else -%}
|
|
0
|
|
{%- endif %}
|
|
when:
|
|
- cell_topology_map is defined
|
|
|
|
- name: set cell_deploy args fact
|
|
set_fact:
|
|
cell_deploy_args: >-
|
|
-r {{ working_dir }}/{{ cell_name }}/cell_roles_data.yaml
|
|
-e {{ working_dir }}/{{ cell_name }}/cell-input.yaml
|
|
-e {{ working_dir }}/{{ cell_name }}/cell.yaml
|
|
--stack {{ cell_name }}
|
|
|
|
- name: Create cell data directory
|
|
file:
|
|
path: "{{ working_dir }}/{{ cell_name }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Create cell parameter file
|
|
when: additional_cell|bool
|
|
template:
|
|
src: "cell.yaml.j2"
|
|
dest: "{{ working_dir }}/{{ cell_name }}/cell.yaml"
|
|
|
|
- name: Create cell deploy script
|
|
when: additional_cell|bool
|
|
template:
|
|
src: "{{ deploy_cell_script }}"
|
|
dest: "{{ working_dir }}/overcloud-deploy-cell.sh"
|
|
mode: 0755
|