-
Notifications
You must be signed in to change notification settings - Fork 0
/
AutoScalingGroup.template
63 lines (60 loc) · 1.91 KB
/
AutoScalingGroup.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Template to create multiple instances.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",
"Default" : "heat_key"
},
"InstanceType" : {
"Description" : "Instance type",
"Type" : "String",
"Default" : "m1.small",
"AllowedValues" : [ "m1.tiny", "m1.small", "m1.medium", "m1.large", "m1.xlarge" ],
"ConstraintDescription" : "must be a valid EC2 instance type."
},
"ImageId" : {
"Description" : "Name of the image to use",
"Type" : "String",
"Default" : "F17-x86_64-cfntools"
},
"SubnetUuid" : {
"Description" : "Subnet UUID",
"Default" : "0c23ccb8-6f5e-42d8-a61e-be959a8a9fcb",
"Type" : "String"
},
"NumInstances": {
"Default": "25",
"MinValue": "1",
"MaxValue": "1001",
"Description" : "Number of instances to create",
"Type": "Number"
}
},
"Resources" : {
"JobServerGroup" : {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties" : {
"LaunchConfigurationName" : { "Ref" : "JobServerConfig" },
"AvailabilityZones" : { "Fn::GetAZs" : "" },
"VPCZoneIdentifier" : [ { "Ref" : "SubnetUuid" } ],
"MinSize" : "2",
"MaxSize" : "3"
}
},
"JobServerConfig" : {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"ImageId" : { "Ref" : "ImageId" },
"InstanceType" : { "Ref" : "InstanceType" },
"KeyName" : { "Ref" : "KeyName" },
"NovaSchedulerHints": [ {"Key": "part", "Value": "long"},
{"Key": "ready", "Value": "short"} ],
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash -v\n"
]]}}
}
}
}
}