diff options
Diffstat (limited to 'docker/storperf-master/storperf/resources')
3 files changed, 56 insertions, 8 deletions
diff --git a/docker/storperf-master/storperf/resources/hot/agent-group.yaml b/docker/storperf-master/storperf/resources/hot/agent-group.yaml index 3c02e31..ea7b51f 100644 --- a/docker/storperf-master/storperf/resources/hot/agent-group.yaml +++ b/docker/storperf-master/storperf/resources/hot/agent-group.yaml @@ -27,6 +27,12 @@ parameters: constraints: - range: { min: 1, max: 1024 } description: must be between 1 and 1024 Gb. + volume_count: + type: number + default: 0 + constraints: + - range: { min: 0, max: 512 } + description: must be between 1 and 512 agents. agent_count: type: number default: 1 @@ -54,6 +60,7 @@ resources: availability_zone: {get_param: availability_zone}, storperf_open_security_group: {get_resource: storperf_open_security_group}, key_name: {get_resource: storperf_key_pair}, + volume_count: {get_param: volume_count}, volume_size: {get_param: volume_size} } } diff --git a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml index 7841e8c..8895c9f 100644 --- a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml +++ b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml @@ -24,6 +24,13 @@ parameters: default: storperf storperf_open_security_group: type: string + volume_count: + type: number + description: Number of volumes to be created + default: 1 + constraints: + - range: { min: 0, max: 1024 } + description: must be between 1 and 1024. volume_size: type: number description: Size of the volume to be created. @@ -87,15 +94,16 @@ resources: port_id: { get_resource: storperf_agent_port } agent_volume: - type: OS::Cinder::Volume - properties: - size: { get_param: volume_size } - - agent_volume_att: - type: OS::Cinder::VolumeAttachment + type: OS::Heat::ResourceGroup properties: - instance_uuid: { get_resource: storperf_agent } - volume_id: { get_resource: agent_volume} + count: { get_param: volume_count } + resource_def: { + type: "storperf-volume.yaml", + properties: { + volume_size: { get_param: volume_size }, + agent_instance_uuid: { get_resource: storperf_agent } + } + } outputs: storperf_agent_ip: diff --git a/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml b/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml new file mode 100644 index 0000000..aec3393 --- /dev/null +++ b/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml @@ -0,0 +1,33 @@ +############################################################################## +# Copyright (c) 2018 Dell EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +heat_template_version: 2013-05-23 + +parameters: + volume_size: + type: number + description: Size of the volume to be created. + default: 1 + constraints: + - range: { min: 1, max: 1024 } + description: must be between 1 and 1024 Gb. + agent_instance_uuid: + type: string + +resources: + agent_volume: + type: OS::Cinder::Volume + properties: + size: { get_param: volume_size } + + agent_volume_att: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_param: agent_instance_uuid } + volume_id: { get_resource: agent_volume} |