diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-09-30 12:55:54 +0200 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-09-30 12:49:43 +0000 |
commit | 1f8357f403e39f2974b4b88e29d0bad252f08613 (patch) | |
tree | 7ed42d6a51708d089514cf30d52fc7d2610d1a8a /tools/cicdansible | |
parent | 98c4016a51fba31a1fb6ebd6675fbc7a8495c7c0 (diff) |
[CICDANSIBLE] Add feature to set custom docker storage size on nodes
This allows setting custom size for volume attached to nodes via
ansible variable
Change-Id: Ie7c9562403f3b330f52136adc5dc8a11f85bc950
Issue-ID: OOM-2846
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'tools/cicdansible')
-rw-r--r-- | tools/cicdansible/group_vars/all.yml | 2 | ||||
-rw-r--r-- | tools/cicdansible/heat/installer.yaml | 5 | ||||
-rw-r--r-- | tools/cicdansible/heat/node.yaml | 4 | ||||
-rw-r--r-- | tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/tools/cicdansible/group_vars/all.yml b/tools/cicdansible/group_vars/all.yml index 72ac5e07..4d044662 100644 --- a/tools/cicdansible/group_vars/all.yml +++ b/tools/cicdansible/group_vars/all.yml @@ -70,3 +70,5 @@ install_app: true application_config: '' # Id of the network for demo usecases demo_network_id: "" +# Size of docker storage volumes on nodes +docker_storage_size: 60 diff --git a/tools/cicdansible/heat/installer.yaml b/tools/cicdansible/heat/installer.yaml index b7b03d1a..04f0debc 100644 --- a/tools/cicdansible/heat/installer.yaml +++ b/tools/cicdansible/heat/installer.yaml @@ -103,6 +103,10 @@ parameters: type: string description: "specifies id of network used for demo usecases" default: "" + docker_storage_size: + label: "nodes' docker storage size" + type: number + description: "Size of the volume for the docker storage on nodes" conditions: #Condition for nfs volume usage. use_volume_for_nfs: { get_param: use_volume_for_nfs } @@ -212,6 +216,7 @@ resources: notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] } security_group: { get_resource: secgroup } demo_network: { get_param: demo_network } + docker_storage_size: { get_param: docker_storage_size } scheduler_hints: group: { get_resource: anti_affinity_group } depends_on: [routercon, instance_wait_handle] diff --git a/tools/cicdansible/heat/node.yaml b/tools/cicdansible/heat/node.yaml index 12097770..bee089fe 100644 --- a/tools/cicdansible/heat/node.yaml +++ b/tools/cicdansible/heat/node.yaml @@ -25,13 +25,15 @@ parameters: demo_network: type: string default: "" + docker_storage_size: + type: number resources: #Volume for storing /var/lib/docker for node. docker_storage: type: OS::Cinder::Volume properties: name: docker_storage - size: 120 + size: { get_param: docker_storage_size } #Call generic instance template. instance: type: instance.yaml diff --git a/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml index 21dfadcf..609306b0 100644 --- a/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml +++ b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml @@ -35,5 +35,6 @@ installer_ip: "{{ floating_ips_by_address[installer_ip].id }}" use_volume_for_nfs: "{{ use_volume_for_nfs }}" demo_network: "{{ demo_network_id }}" + docker_storage_size: "{{ docker_storage_size }}" wait: true register: heat_stack |