-
Notifications
You must be signed in to change notification settings - Fork 5
/
Nest.json
151 lines (150 loc) · 4.6 KB
/
Nest.json
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"AWSTemplateFormatVersion":"2010-09-09",
"Description":"Nested Stack",
"Parameters":{
"Project":{
"Description":"Name of Project",
"Type":"String",
"Default":"CFN-Training"
},
"KeyPair" : {
"Description" : "KeyPair Name for Instances.",
"Type" : "String",
"Default" : "",
"ConstraintDescription" : "must be a existing Key Pair."
},
"BucketName":{
"Description":"Name of Config Bucket",
"Type":"String",
"Default":"intuit-training"
},
"SyncMaxAppCount":{
"Description":"Maximum Sync App Servers in Sync ASG.",
"Type":"Number",
"Default":"4"
},
"SyncMinAppCount":{
"Description":"Minimum Sync App Servers in Sync ASG.",
"Type":"Number",
"Default":"2",
"ConstraintDescription":"must be a valid number."
},
"SyncScaleUp":{
"Description":"Threshold for CPU Alarm High",
"Type":"String",
"Default":"100",
"ConstraintDescription":"must be a valid string."
},
"SyncScaleDown":{
"Description":"Threshold for CPU Alarm Normal",
"Type":"String",
"Default":"10",
"ConstraintDescription":"must be a valid string."
},
"LatencyHighScaleDown" : {
"Description" : "The number of seconds of latency on which to Scale Up",
"Type" : "Number",
"Default" : "5",
"MinValue": "3",
"MaxValue": "100",
"ConstraintDescription" : "must be a number from 3 to 100."
},
"LatencyNormalScaleDown" : {
"Description" : "The number of seconds of latency on which to Scale Down",
"Type" : "Number",
"Default" : "2",
"MinValue": "1",
"MaxValue": "100",
"ConstraintDescription" : "must be a number from 1 to 100."
},
"MaxProvisionTime":{
"Description":"Maximum allowable time (seconds) for the server to provision before the process is aborted and the instance destroyed.",
"Type":"Number",
"Default":"1500",
"MinValue":"120",
"MaxValue":"3600"
},
"NetworkCFNURL":{
"Description":"Link to Network CFNUrl",
"Default": ""
},
"ELBASGCFNURL":{
"Description":"Link to ELBASGURL",
"Type": "String",
"Default": ""
},
"DatabaseCFNURL":{
"Description":"Link to DatabaseURL",
"Type": "String",
"Default": ""
},
"CommonAMI" : {
"Description" : "The AMI most commonly used.",
"Type" : "String",
"Default" : "ami-fb8e9292",
"ConstraintDescription" : "must be a string."
}
},
"Mappings":{
},
"Resources":{
"Network":{
"Type":"AWS::CloudFormation::Stack",
"Properties":{
"TemplateURL": { "Ref" : "NetworkCFNURL" },
"Parameters":{
"Project": "",
"BastionSSHFrom" : "0.0.0.0/0",
"BucketName": { "Ref": "BucketName" },
"KeyPair": "",
"NATProvisionFileName": "cfn-onsite/provisioning/Nat.sh"
}
}
},
"Database":{
"Type":"AWS::CloudFormation::Stack",
"Properties":{
"TemplateURL": { "Ref" : "DatabaseCFNURL" },
"Parameters":{
"VPC": "vpc-2jd3ks2",
"VPCCIDR": { "Fn::GetAtt" : [ "Network", "Outputs.VPCCIDR" ] },
"KeyPair": { "Ref": "KeyPair" },
"AppInstanceProfile" : "",
"Az1Subnet" : "",
"ELBAz1Subnet" : "",
"ProvisionFileName": "cfn-onsite/provisioning/DB.sh",
"BucketName" : { "Ref": "BucketName" },
"ConfigStartCommand": "#!/bin/bash\nchef-solo -j /root/$1.json -c /root/solo.rb >/tmp/chef-client-1.log 2>&1",
"ELBTarget": "TCP:3306"
}
}
},
"Sync": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"TemplateURL": { "Ref": "ELBASGCFNURL" },
"Parameters": {
"VPCCIDR": "",
"MultiAzStack": "True",
"KeyPair": { "Ref": "KeyPair" },
"AppInstanceProfile" : "",
"AppAz1Subnet" : "",
"AppAz2Subnet" : "",
"ELBAz2Subnet" : "",
"AppName" : "Sync",
"Environment": "Train",
"AMIID" : { "Ref" : "CommonAMI" },
"BucketName" : { "Ref": "BucketName" },
"ProvisionFileName": "cfn-onsite/provisioning/Sync.sh",
"ConfigStartCommand" : "#!/bin/bash\nchef-solo -j /root/Sync.json -c /root/solo.rb >/tmp/chef-client-1.log 2>&1",
"DatabaseELBURL": "",
"ELBTarget": "TCP:8080",
"ListenerELBPort": "8080",
"ListenerInstanceProtocol": "HTTP"
}
}
}
},
"Outputs":{
}
}