Add topology_map option to manage scale and flavors
The --*-flavor and --*-scale cli options have been deprecated for some time. In order to remove them, we need to be able to pass <rolename>Count and Overcloud<rolename>Flavor to the deployment. This change adds a new configuration option which can be used to manage these options in quickstart. In order to configure these options as part of the deploy a user should specify the topology_map with a dictionary using the rolename as a key with scale and flavor underneath the flavor. Example: topology_map: Controller: scale: 3 flavor: controller Compute: scale: 1 flavor: compute CephStorage: scale: 3 flavor: ceph NOTE: It is important that the rolenames in the key match the capitalization of actual role. Change-Id: Id2bc5692ebce3b2d937ca16665ef7af8390ded07
This commit is contained in:
parent
1100482ec5
commit
3ac46f7633
@ -45,6 +45,7 @@ A description of the settable variables for this role should go here, including
|
||||
--libvirt_type `virt_type`.
|
||||
* `virt_type`: qemu|kvm default is qemu. kvm is only enabled when kvm-{intel|amd}
|
||||
kernel module can be loaded.
|
||||
* `topology_map`: undefined - a dictionary of roles with their scale (count) and flavor names. Example: topology_map: { 'Controller': { 'scale': 3, 'flavor': 'baremetal' } }
|
||||
|
||||
|
||||
Dependencies
|
||||
|
@ -100,6 +100,7 @@ deployed_server_prepare_log: "{{ working_dir }}/deployed_server_prepare.txt"
|
||||
|
||||
container_args: ""
|
||||
scenario_args: ""
|
||||
topology_args: ""
|
||||
multinode_args: ""
|
||||
ovn_args: ""
|
||||
telemetry_args: ""
|
||||
@ -130,6 +131,7 @@ deploy_args: >-
|
||||
{{ swap_args }}
|
||||
{{ composable_args }}
|
||||
{{ topology }}
|
||||
{{ topology_args }}
|
||||
{{ config_download_args }}
|
||||
{{ selinux_args }}
|
||||
{{ extra_args }}
|
||||
|
@ -38,6 +38,12 @@
|
||||
src: "overcloud_services.yaml.j2"
|
||||
dest: "{{ working_dir }}/overcloud_services.yaml"
|
||||
|
||||
- name: Create overcloud topology configuration
|
||||
template:
|
||||
src: "overcloud-topology-config.yaml.j2"
|
||||
dest: "{{ working_dir }}/overcloud-topology-config.yaml"
|
||||
when: topology_map is defined
|
||||
|
||||
- name: Cloud names heat environment
|
||||
when: release not in ['mitaka', 'liberty']
|
||||
template:
|
||||
|
@ -95,6 +95,15 @@
|
||||
- name: extract the number of controllers to be deployed
|
||||
set_fact:
|
||||
number_of_controllers: "{{ deploy_args| regex_replace('^.*--control-scale +([0-9]+).*$', '\\1') | regex_replace('^[^ 0-9]+$', '1') }}"
|
||||
when:
|
||||
- topology_map is not defined
|
||||
|
||||
- name: extract the number of controllers to be deployed (from topology_map)
|
||||
set_fact:
|
||||
number_of_controllers: "{{ topology_map.Controller.scale }}"
|
||||
when:
|
||||
- topology_map is defined
|
||||
- topology_map.Controller is defined
|
||||
|
||||
- name: Set cinder-backup
|
||||
set_fact:
|
||||
@ -218,6 +227,12 @@
|
||||
-e {{ working_dir }}/overcloud_services.yaml
|
||||
when: composable_services|bool
|
||||
|
||||
- name: set overcloud topology args
|
||||
set_fact:
|
||||
topology_args: >-
|
||||
-e {{ working_dir }}/overcloud-topology-config.yaml
|
||||
when: topology_map is defined
|
||||
|
||||
- name: set the multinode args
|
||||
set_fact:
|
||||
multinode_args: >-
|
||||
|
@ -0,0 +1,9 @@
|
||||
parameter_defaults:
|
||||
{% for role in topology_map %}
|
||||
{% if 'scale' in topology_map[role] %}
|
||||
{{ role }}Count: {{ topology_map[role].scale }}
|
||||
{% endif -%}
|
||||
{% if 'flavor' in topology_map[role] %}
|
||||
Overcloud{{ role }}Flavor: {{ topology_map[role].flavor }}
|
||||
{% endif -%}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user