summaryrefslogtreecommitdiffstats
path: root/docker/storperf-master/storperf/resources/hot/agent-group.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docker/storperf-master/storperf/resources/hot/agent-group.yaml')
-rw-r--r--docker/storperf-master/storperf/resources/hot/agent-group.yaml106
1 files changed, 106 insertions, 0 deletions
diff --git a/docker/storperf-master/storperf/resources/hot/agent-group.yaml b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
new file mode 100644
index 0000000..c758ecd
--- /dev/null
+++ b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
@@ -0,0 +1,106 @@
+##############################################################################
+# Copyright (c) 2015 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:
+ public_network:
+ type: string
+ constraints:
+ - custom_constraint: neutron.network
+ agent_flavor:
+ type: string
+ default: "storperf"
+ agent_image:
+ type: string
+ default: 'StorPerf Ubuntu 14.04'
+ 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_count:
+ type: number
+ default: 1
+ constraints:
+ - range: { min: 1, max: 512 }
+ description: must be between 1 and 512 agents.
+
+
+resources:
+ slaves:
+ type: OS::Heat::ResourceGroup
+ depends_on: [storperf_subnet, storperf_network_router_interface,
+ storperf_open_security_group, storperf_key_pair]
+ properties:
+ count: {get_param: agent_count}
+ resource_def: {
+ type: "storperf-agent.yaml",
+ properties: {
+ public_network: {get_param: public_network},
+ agent_network: {get_resource: storperf_network},
+ flavor: {get_param: agent_flavor},
+ image: {get_param: agent_image},
+ storperf_open_security_group: {get_resource: storperf_open_security_group},
+ key_name: {get_resource: storperf_key_pair},
+ volume_size: {get_param: volume_size}
+ }
+ }
+
+ storperf_network:
+ type: OS::Neutron::Net
+ properties:
+ name: storperf-network
+
+ storperf_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: storperf_network }
+ cidr: 172.16.0.0/16
+ gateway_ip: 172.16.0.1
+
+ storperf_network_router:
+ type: OS::Neutron::Router
+ properties:
+ external_gateway_info:
+ network: { get_param: public_network }
+
+ storperf_network_router_interface:
+ type: OS::Neutron::RouterInterface
+ properties:
+ router_id: { get_resource: storperf_network_router }
+ subnet_id: { get_resource: storperf_subnet }
+
+ storperf_key_pair:
+ type: OS::Nova::KeyPair
+ properties:
+ save_private_key: true
+ name: storperf_agent_keypair
+
+ storperf_open_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: An open security group to allow all access to the StorPerf slaves
+ rules:
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: tcp
+ port_range_min: 22
+ port_range_max: 22
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: icmp
+
+
+
+outputs:
+ slave_ips: {
+ description: "Slave addresses",
+ value: { get_attr: [ slaves, storperf_agent_ip] }
+ }