Sergey Kraynev | d6fa5c0 | 2015-02-13 03:03:55 -0500 | [diff] [blame] | 1 | heat_template_version: 2014-10-16 |
| 2 | |
| 3 | description: Auto-scaling Test |
| 4 | |
| 5 | parameters: |
| 6 | image_id: |
| 7 | type: string |
| 8 | label: Image ID |
| 9 | description: Image ID from configurations |
| 10 | capacity: |
| 11 | type: string |
| 12 | label: Capacity |
| 13 | description: Auto-scaling group desired capacity |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame^] | 14 | fixed_subnet: |
Sergey Kraynev | d6fa5c0 | 2015-02-13 03:03:55 -0500 | [diff] [blame] | 15 | type: string |
| 16 | label: fixed subnetwork ID |
| 17 | description: subnetwork ID used for autoscaling |
| 18 | instance_type: |
| 19 | type: string |
| 20 | label: instance_type |
| 21 | description: type of instance to launch |
| 22 | |
| 23 | resources: |
| 24 | test_pool: |
| 25 | type: OS::Neutron::Pool |
| 26 | properties: |
| 27 | description: Test Pool |
| 28 | lb_method: ROUND_ROBIN |
| 29 | name: test_pool |
| 30 | protocol: HTTP |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame^] | 31 | subnet: { get_param: fixed_subnet } |
Sergey Kraynev | d6fa5c0 | 2015-02-13 03:03:55 -0500 | [diff] [blame] | 32 | vip: { |
| 33 | "description": "Test VIP", |
| 34 | "protocol_port": 80, |
| 35 | "name": "test_vip" |
| 36 | } |
| 37 | load_balancer: |
| 38 | type: OS::Neutron::LoadBalancer |
| 39 | properties: |
| 40 | protocol_port: 80 |
| 41 | pool_id: { get_resource: test_pool } |
| 42 | launch_config: |
| 43 | type: AWS::AutoScaling::LaunchConfiguration |
| 44 | properties: |
| 45 | ImageId: { get_param: image_id } |
| 46 | InstanceType: { get_param: instance_type } |
| 47 | server_group: |
| 48 | type: AWS::AutoScaling::AutoScalingGroup |
| 49 | properties: |
| 50 | AvailabilityZones : ["nova"] |
| 51 | LaunchConfigurationName : { get_resource : launch_config } |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame^] | 52 | VPCZoneIdentifier: [{ get_param: fixed_subnet }] |
Sergey Kraynev | d6fa5c0 | 2015-02-13 03:03:55 -0500 | [diff] [blame] | 53 | MinSize : 1 |
| 54 | MaxSize : 5 |
| 55 | DesiredCapacity: { get_param: capacity } |
| 56 | LoadBalancerNames : [ { get_resource : load_balancer } ] |