diff options
author | Tzu-Mainn Chen <tzumainn@redhat.com> | 2017-06-21 18:01:48 -0400 |
---|---|---|
committer | Tzu-Mainn Chen <tzumainn@redhat.com> | 2017-06-21 18:01:48 -0400 |
commit | 8219f17503e16620b4881faefc78023c696ed2e5 (patch) | |
tree | f78024c437a662bb083da277bd3b6db062e6a017 | |
parent | 6457152be04098c7f765b322447006bdb052509f (diff) | |
download | openshift-8219f17503e16620b4881faefc78023c696ed2e5.tar.gz openshift-8219f17503e16620b4881faefc78023c696ed2e5.tar.bz2 openshift-8219f17503e16620b4881faefc78023c696ed2e5.tar.xz openshift-8219f17503e16620b4881faefc78023c696ed2e5.zip |
Add node_removal_policies variable to allow for scaling down
5 files changed, 9 insertions, 0 deletions
diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index 423d57113..4686dfc08 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -67,6 +67,9 @@ The `openstack_num_masters`, `openstack_num_infra` and `openstack_num_nodes` values specify the number of Master, Infra and App nodes to create. +The `openstack_node_removal_policies` allows you to specify which App nodes to +remove. + The `openstack_flat_secgrp`, controls Neutron security groups creation for Heat stacks. Set it to true, if you experience issues with sec group rules quotas. It trades security for number of rules, by sharing the same set diff --git a/playbooks/provisioning/openstack/provision-openstack.yml b/playbooks/provisioning/openstack/provision-openstack.yml index c7ad782c9..b983f6652 100644 --- a/playbooks/provisioning/openstack/provision-openstack.yml +++ b/playbooks/provisioning/openstack/provision-openstack.yml @@ -23,6 +23,7 @@ num_nodes: "{{ openstack_num_nodes }}" num_infra: "{{ openstack_num_infra }}" num_dns: "{{ openstack_num_dns | default(1) }}" + node_removal_policies: "{{ openstack_node_removal_policies | to_yaml }}" master_volume_size: "{{ docker_volume_size }}" app_volume_size: "{{ docker_volume_size }}" infra_volume_size: "{{ docker_volume_size }}" diff --git a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml index 047923253..0e128265c 100644 --- a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml +++ b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml @@ -12,6 +12,8 @@ openstack_num_masters: 1 openstack_num_infra: 1 openstack_num_nodes: 2 +openstack_node_removal_policies: [] + docker_volume_size: "15" openstack_subnet_prefix: "192.168.99" diff --git a/roles/openstack-stack/defaults/main.yml b/roles/openstack-stack/defaults/main.yml index 2a4ef3a45..4f859585f 100644 --- a/roles/openstack-stack/defaults/main.yml +++ b/roles/openstack-stack/defaults/main.yml @@ -9,4 +9,5 @@ num_masters: 1 num_nodes: 1 num_dns: 1 num_infra: 1 +node_removal_policies: [] etcd_volume_size: 2 diff --git a/roles/openstack-stack/templates/heat_stack.yaml.j2 b/roles/openstack-stack/templates/heat_stack.yaml.j2 index c750865a5..3916eec02 100644 --- a/roles/openstack-stack/templates/heat_stack.yaml.j2 +++ b/roles/openstack-stack/templates/heat_stack.yaml.j2 @@ -620,6 +620,8 @@ resources: type: OS::Heat::ResourceGroup properties: count: {{ num_nodes }} + removal_policies: + - resource_list: {{ node_removal_policies }} resource_def: type: server.yaml properties: |