Commit b5822a73 by Feanil Patel

Merge pull request #795 from edx/feanil/param_class_b

Feanil/param class b
parents e33f857c 56e3a149
...@@ -417,6 +417,14 @@ ...@@ -417,6 +417,14 @@
"MinValue":"5", "MinValue":"5",
"MaxValue":"3072", "MaxValue":"3072",
"ConstraintDescription":"must be between 5 and 3072Gb." "ConstraintDescription":"must be between 5 and 3072Gb."
},
"ClassB":{
"Default":"1",
"Description":"The second octet of the Class B to be allocated for this VPC. 10.?.xxx.xxx",
"Type":"Number",
"MinValue":"0",
"MaxValue":"255",
"ConstraintDescription":"ClassB value must be between 0 and 255."
} }
}, },
"Mappings":{ "Mappings":{
...@@ -456,31 +464,31 @@ ...@@ -456,31 +464,31 @@
"sa-east-1": { "AMI":"ami-0439e619" } "sa-east-1": { "AMI":"ami-0439e619" }
}, },
"SubnetConfig":{ "SubnetConfig":{
"VPC": { "CIDR":"10.0.0.0/16" }, "VPC": { "CIDR":".0.0/16" },
"Public01": { "CIDR":"10.0.0.0/24" }, "Public01": { "CIDR":".0.0/24" },
"Public02": { "CIDR":"10.0.1.0/24" }, "Public02": { "CIDR":".1.0/24" },
"Edxapp01": { "CIDR":"10.0.10.0/24" }, "Edxapp01": { "CIDR":".10.0/24" },
"Edxapp02": { "CIDR":"10.0.11.0/24" }, "Edxapp02": { "CIDR":".11.0/24" },
"XServerJail01": { "CIDR":"10.0.20.0/24" }, "XServerJail01": { "CIDR":".20.0/24" },
"XServerJail02": { "CIDR":"10.0.21.0/24" }, "XServerJail02": { "CIDR":".21.0/24" },
"Xqueue01": { "CIDR":"10.0.30.0/24" }, "Xqueue01": { "CIDR":".30.0/24" },
"Xqueue02": { "CIDR":"10.0.31.0/24" }, "Xqueue02": { "CIDR":".31.0/24" },
"CommonCluster01": { "CIDR":"10.0.46.0/24"}, "CommonCluster01": { "CIDR":".46.0/24"},
"CommonCluster02": { "CIDR":"10.0.47.0/24"}, "CommonCluster02": { "CIDR":".47.0/24"},
"CommonCluster03": { "CIDR":"10.0.48.0/24"}, "CommonCluster03": { "CIDR":".48.0/24"},
"Data01": { "CIDR":"10.0.50.0/24" }, "Data01": { "CIDR":".50.0/24" },
"Data02": { "CIDR":"10.0.51.0/24" }, "Data02": { "CIDR":".51.0/24" },
"Cache01": { "CIDR":"10.0.60.0/24" }, "Cache01": { "CIDR":".60.0/24" },
"Cache02": { "CIDR":"10.0.61.0/24" }, "Cache02": { "CIDR":".61.0/24" },
"Worker01": { "CIDR":"10.0.70.0/24" }, "Worker01": { "CIDR":".70.0/24" },
"Worker02": { "CIDR":"10.0.71.0/24" }, "Worker02": { "CIDR":".71.0/24" },
"Forum01": { "CIDR":"10.0.80.0/24" }, "Forum01": { "CIDR":".80.0/24" },
"Forum02": { "CIDR":"10.0.81.0/24" }, "Forum02": { "CIDR":".81.0/24" },
"Mongo01": { "CIDR":"10.0.90.0/24" }, "Mongo01": { "CIDR":".90.0/24" },
"Mongo02": { "CIDR":"10.0.91.0/24" }, "Mongo02": { "CIDR":".91.0/24" },
"Mongo03": { "CIDR":"10.0.92.0/24" }, "Mongo03": { "CIDR":".92.0/24" },
"Notifier01": { "CIDR":"10.0.100.0/24" }, "Notifier01": { "CIDR":".100.0/24" },
"Admin": { "CIDR":"10.0.200.0/24" } "Admin": { "CIDR":".200.0/24" }
}, },
"MapRegionsToAvailZones":{ "MapRegionsToAvailZones":{
"us-east-1": { "AZone2":"us-east-1d", "AZone0":"us-east-1b", "AZone1":"us-east-1c" }, "us-east-1": { "AZone2":"us-east-1d", "AZone0":"us-east-1b", "AZone1":"us-east-1c" },
...@@ -499,7 +507,7 @@ ...@@ -499,7 +507,7 @@
"Properties":{ "Properties":{
"EnableDnsSupport" : "true", "EnableDnsSupport" : "true",
"EnableDnsHostnames" : "true", "EnableDnsHostnames" : "true",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"InstanceTenancy":"default" "InstanceTenancy":"default"
} }
}, },
...@@ -510,11 +518,14 @@ ...@@ -510,11 +518,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Public01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Public01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -523,9 +534,9 @@ ...@@ -523,9 +534,9 @@
"AZone0" "AZone0"
] ]
}, },
"Tags":[ "Tags":[
{ {
"Key":"immutable_metadata", "Key":"immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -535,7 +546,7 @@ ...@@ -535,7 +546,7 @@
"external','target':'ec2'}" "external','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -547,11 +558,14 @@ ...@@ -547,11 +558,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Public02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Public02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -560,8 +574,8 @@ ...@@ -560,8 +574,8 @@
"AZone1" "AZone1"
] ]
}, },
"Tags":[ "Tags":[
{ {
"Key":"immutable_metadata", "Key":"immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
...@@ -572,8 +586,8 @@ ...@@ -572,8 +586,8 @@
"external','target':'ec2'}" "external','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
}, },
...@@ -584,11 +598,14 @@ ...@@ -584,11 +598,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Admin", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Admin",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -616,11 +633,14 @@ ...@@ -616,11 +633,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Edxapp01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Edxapp01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -639,7 +659,7 @@ ...@@ -639,7 +659,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key":"immutable_metadata", "Key":"immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -649,7 +669,7 @@ ...@@ -649,7 +669,7 @@
"internal-edxapp','target':'ec2'}" "internal-edxapp','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -661,11 +681,14 @@ ...@@ -661,11 +681,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Edxapp02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Edxapp02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -684,7 +707,7 @@ ...@@ -684,7 +707,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key":"immutable_metadata", "Key":"immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -694,7 +717,7 @@ ...@@ -694,7 +717,7 @@
"internal-edxapp','target':'ec2'}" "internal-edxapp','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -706,11 +729,14 @@ ...@@ -706,11 +729,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Xqueue01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Xqueue01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -739,7 +765,7 @@ ...@@ -739,7 +765,7 @@
"internal-xqueue','target':'ec2'}" "internal-xqueue','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -751,11 +777,14 @@ ...@@ -751,11 +777,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Xqueue02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Xqueue02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -774,7 +803,7 @@ ...@@ -774,7 +803,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -796,11 +825,14 @@ ...@@ -796,11 +825,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"CommonCluster01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "CommonCluster01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -819,7 +851,7 @@ ...@@ -819,7 +851,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -841,11 +873,14 @@ ...@@ -841,11 +873,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"CommonCluster02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "CommonCluster02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -874,7 +909,7 @@ ...@@ -874,7 +909,7 @@
"internal-commoncluster','target':'ec2'}" "internal-commoncluster','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -886,11 +921,14 @@ ...@@ -886,11 +921,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"CommonCluster03", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "CommonCluster03",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -919,7 +957,7 @@ ...@@ -919,7 +957,7 @@
"internal-commoncluster','target':'ec2'}" "internal-commoncluster','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -931,11 +969,14 @@ ...@@ -931,11 +969,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"XServerJail01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "XServerJail01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -954,7 +995,7 @@ ...@@ -954,7 +995,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -964,7 +1005,7 @@ ...@@ -964,7 +1005,7 @@
"internal-xserver','target':'ec2'}" "internal-xserver','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -976,11 +1017,14 @@ ...@@ -976,11 +1017,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"XServerJail02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "XServerJail02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -999,7 +1043,7 @@ ...@@ -999,7 +1043,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1009,7 +1053,7 @@ ...@@ -1009,7 +1053,7 @@
"internal-xserver','target':'ec2'}" "internal-xserver','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -1021,11 +1065,14 @@ ...@@ -1021,11 +1065,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Data01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Data01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1053,11 +1100,14 @@ ...@@ -1053,11 +1100,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Data02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Data02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1085,11 +1135,14 @@ ...@@ -1085,11 +1135,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Cache01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Cache01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1117,11 +1170,14 @@ ...@@ -1117,11 +1170,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Cache02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Cache02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1149,11 +1205,14 @@ ...@@ -1149,11 +1205,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Worker01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Worker01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1172,7 +1231,7 @@ ...@@ -1172,7 +1231,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1182,7 +1241,7 @@ ...@@ -1182,7 +1241,7 @@
"internal-worker','target':'ec2'}" "internal-worker','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -1194,11 +1253,14 @@ ...@@ -1194,11 +1253,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Worker02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Worker02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1217,7 +1279,7 @@ ...@@ -1217,7 +1279,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1227,7 +1289,7 @@ ...@@ -1227,7 +1289,7 @@
"internal-worker','target':'ec2'}" "internal-worker','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -1239,11 +1301,14 @@ ...@@ -1239,11 +1301,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Forum01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Forum01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1262,7 +1327,7 @@ ...@@ -1262,7 +1327,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1272,7 +1337,7 @@ ...@@ -1272,7 +1337,7 @@
"internal-forum','target':'ec2'}" "internal-forum','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -1284,11 +1349,14 @@ ...@@ -1284,11 +1349,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Forum02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Forum02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1307,7 +1375,7 @@ ...@@ -1307,7 +1375,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1329,11 +1397,14 @@ ...@@ -1329,11 +1397,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1352,7 +1423,7 @@ ...@@ -1352,7 +1423,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1374,11 +1445,14 @@ ...@@ -1374,11 +1445,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo02",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1397,7 +1471,7 @@ ...@@ -1397,7 +1471,7 @@
"Value":"Private" "Value":"Private"
}, },
{ {
"Key" : "immutable_metadata", "Key" : "immutable_metadata",
"Value":{"Fn::Join":["", "Value":{"Fn::Join":["",
["{'purpose':'", ["{'purpose':'",
{"Ref":"EnvironmentTag"}, {"Ref":"EnvironmentTag"},
...@@ -1419,11 +1493,14 @@ ...@@ -1419,11 +1493,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo03", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo03",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1452,7 +1529,7 @@ ...@@ -1452,7 +1529,7 @@
"internal-mongo','target':'ec2'}" "internal-mongo','target':'ec2'}"
] ]
] ]
} }
} }
] ]
} }
...@@ -1464,11 +1541,14 @@ ...@@ -1464,11 +1541,14 @@
"Ref":"EdxVPC" "Ref":"EdxVPC"
}, },
"CidrBlock":{ "CidrBlock":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Notifier01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Notifier01",
"CIDR"
]}
]]
}, },
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
...@@ -1684,7 +1764,7 @@ ...@@ -1684,7 +1764,7 @@
"Protocol":"1", "Protocol":"1",
"RuleAction":"allow", "RuleAction":"allow",
"Egress":"false", "Egress":"false",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": { "Icmp": {
"Code": "0", "Code": "0",
"Type": "0" "Type": "0"
...@@ -1701,7 +1781,7 @@ ...@@ -1701,7 +1781,7 @@
"Protocol":"1", "Protocol":"1",
"RuleAction":"allow", "RuleAction":"allow",
"Egress":"false", "Egress":"false",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": { "Icmp": {
"Code": "0", "Code": "0",
"Type": "8" "Type": "8"
...@@ -1735,7 +1815,7 @@ ...@@ -1735,7 +1815,7 @@
"Protocol":"1", "Protocol":"1",
"RuleAction":"allow", "RuleAction":"allow",
"Egress":"true", "Egress":"true",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": { "Icmp": {
"Code": "0", "Code": "0",
"Type": "0" "Type": "0"
...@@ -1752,7 +1832,7 @@ ...@@ -1752,7 +1832,7 @@
"Protocol":"1", "Protocol":"1",
"RuleAction":"allow", "RuleAction":"allow",
"Egress":"true", "Egress":"true",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": { "Icmp": {
"Code": "0", "Code": "0",
"Type": "8" "Type": "8"
...@@ -2593,7 +2673,7 @@ ...@@ -2593,7 +2673,7 @@
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
"IamInstanceProfile" : { "IamInstanceProfile" : {
"Ref" : "NATMonitorRoleProfile" "Ref" : "NATMonitorRoleProfile"
}, },
"SubnetId":{ "SubnetId":{
...@@ -2791,7 +2871,7 @@ ...@@ -2791,7 +2871,7 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"22", "FromPort":"22",
"ToPort":"22", "ToPort":"22",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
...@@ -2949,42 +3029,6 @@ ...@@ -2949,42 +3029,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"EdxServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"for dev in /dev/xvdc /dev/xvdd; do sudo echo w | fdisk $dev; sudo mkfs -t ext4 $dev;done;\n",
"sudo mkdir /mnt/logs\n",
"sudo mount /dev/xvdc /mnt/logs\n",
"sudo mount /dev/xvdd /opt\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date`\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date`\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"EdxServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -2993,15 +3037,9 @@ ...@@ -2993,15 +3037,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
} }
} }
] ]
...@@ -3034,6 +3072,11 @@ ...@@ -3034,6 +3072,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"edxapp"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"edxapp", "Value":"edxapp",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -3283,19 +3326,6 @@ ...@@ -3283,19 +3326,6 @@
] ]
} }
}, },
"EdxServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"EdxServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"EdxappServer",
"Properties":{
"Handle":{
"Ref":"EdxServerWaitHandle"
},
"Timeout":"1200"
}
},
"XqueueServer":{ "XqueueServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{ "Properties":{
...@@ -3322,38 +3352,6 @@ ...@@ -3322,38 +3352,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"XqueueServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date`\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date`\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"XqueueServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -3362,15 +3360,9 @@ ...@@ -3362,15 +3360,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
} }
} }
] ]
...@@ -3403,6 +3395,11 @@ ...@@ -3403,6 +3395,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"xqueue"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"xqueue", "Value":"xqueue",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -3636,19 +3633,6 @@ ...@@ -3636,19 +3633,6 @@
] ]
} }
}, },
"XqueueServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"XqueueServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"XqueueServer",
"Properties":{
"Handle":{
"Ref":"XqueueServerWaitHandle"
},
"Timeout":"1200"
}
},
"CommonClusterServer":{ "CommonClusterServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{ "Properties":{
...@@ -3677,38 +3661,6 @@ ...@@ -3677,38 +3661,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"CommonClusterServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"CommonClusterServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -3717,15 +3669,9 @@ ...@@ -3717,15 +3669,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
} }
} }
] ]
...@@ -3767,6 +3713,11 @@ ...@@ -3767,6 +3713,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"commoncluster"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"commoncluster", "Value":"commoncluster",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -3905,27 +3856,51 @@ ...@@ -3905,27 +3856,51 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"9200", "FromPort":"9200",
"ToPort":"9200", "ToPort":"9200",
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"9300", "FromPort":"9300",
"ToPort":"9300", "ToPort":"9300",
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
} }
], ],
"SecurityGroupEgress":[ "SecurityGroupEgress":[
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"9200", "FromPort": 9200,
"ToPort":"9200", "ToPort": 9200,
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"9300", "FromPort": 9300,
"ToPort":"9300", "ToPort": 9300,
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
} }
] ]
} }
...@@ -3950,35 +3925,83 @@ ...@@ -3950,35 +3925,83 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort": 9200, "FromPort": 9200,
"ToPort": 9200, "ToPort": 9200,
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "ElasticSearchELBSecurityGroup" }
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort": 9300, "FromPort": 9300,
"ToPort": 9300, "ToPort": 9300,
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "ElasticSearchELBSecurityGroup" }
} },
]
}
},
"RabbitMQELB":{
"Type":"AWS::ElasticLoadBalancing::LoadBalancer",
"Properties":{
"Scheme":"internal",
"SecurityGroups":[
{
"Ref":"RabbitMQELBSecurityGroup"
}
],
"Listeners":[
{ {
"LoadBalancerPort":"5672", "IpProtocol":"tcp",
"InstancePort":"5672", "FromPort": 9200,
"Protocol":"TCP" "ToPort": 9200,
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
}, },
{ {
"LoadBalancerPort":"6163", "IpProtocol":"tcp",
"InstancePort":"6163", "FromPort": 9300,
"ToPort": 9300,
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
}
]
}
},
"RabbitMQELB":{
"Type":"AWS::ElasticLoadBalancing::LoadBalancer",
"Properties":{
"Scheme":"internal",
"SecurityGroups":[
{
"Ref":"RabbitMQELBSecurityGroup"
}
],
"Listeners":[
{
"LoadBalancerPort":"5672",
"InstancePort":"5672",
"Protocol":"TCP"
},
{
"LoadBalancerPort":"6163",
"InstancePort":"6163",
"Protocol":"TCP" "Protocol":"TCP"
} }
], ],
...@@ -4014,13 +4037,25 @@ ...@@ -4014,13 +4037,25 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"5672", "FromPort":"5672",
"ToPort":"5672", "ToPort":"5672",
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "EdxappServerSecurityGroup" }
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"6163", "FromPort":"6163",
"ToPort":"6163", "ToPort":"6163",
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "EdxappServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
} }
], ],
"SecurityGroupEgress":[ "SecurityGroupEgress":[
...@@ -4028,13 +4063,37 @@ ...@@ -4028,13 +4063,37 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"5672", "FromPort":"5672",
"ToPort":"5672", "ToPort":"5672",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"6163", "FromPort":"6163",
"ToPort":"6163", "ToPort":"6163",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
} }
] ]
} }
...@@ -4051,7 +4110,7 @@ ...@@ -4051,7 +4110,7 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"22", "FromPort":"22",
"ToPort":"22", "ToPort":"22",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
...@@ -4066,7 +4125,7 @@ ...@@ -4066,7 +4125,7 @@
"FromPort":"6163", "FromPort":"6163",
"ToPort":"6163", "ToPort":"6163",
"SourceSecurityGroupId" : { "SourceSecurityGroupId" : {
"Ref" : "RabbitMQELBSecurityGroup" "Ref" : "RabbitMQELBSecurityGroup"
} }
}, },
{ {
...@@ -4087,9 +4146,37 @@ ...@@ -4087,9 +4146,37 @@
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"SourceSecurityGroupId" : {
"Ref" : "EdxappServerSecurityGroup"
}
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"SourceSecurityGroupId" : {
"Ref" : "EdxappServerSecurityGroup"
}
},
{
"IpProtocol":"tcp",
"FromPort":"0", "FromPort":"0",
"ToPort":"65535", "ToPort":"65535",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"0",
"ToPort":"65535",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster02", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"0",
"ToPort":"65535",
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
...@@ -4120,19 +4207,6 @@ ...@@ -4120,19 +4207,6 @@
] ]
} }
}, },
"CommonClusterServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"CommonClusterServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"CommonClusterServer",
"Properties":{
"Handle":{
"Ref":"CommonClusterServerWaitHandle"
},
"Timeout":"1200"
}
},
"XServer":{ "XServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{ "Properties":{
...@@ -4159,38 +4233,6 @@ ...@@ -4159,38 +4233,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"XServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"XServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -4199,15 +4241,9 @@ ...@@ -4199,15 +4241,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{
"VolumeSize":"50"
} }
} }
] ]
...@@ -4240,6 +4276,11 @@ ...@@ -4240,6 +4276,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"xserver"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"xserver", "Value":"xserver",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -4403,15 +4444,21 @@ ...@@ -4403,15 +4444,21 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort":"80",
"ToPort":"80", "ToPort":"80",
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
} }
], ],
"SecurityGroupEgress":[ "SecurityGroupEgress":[
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort": {"Ref": "XserverServerPort"},
"ToPort":"80", "ToPort": {"Ref": "XserverServerPort"},
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "XServerJail01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": {"Ref": "XserverServerPort"},
"ToPort": {"Ref": "XserverServerPort"},
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "XServerJail02", "CIDR"]}]]}
} }
] ]
} }
...@@ -4428,21 +4475,13 @@ ...@@ -4428,21 +4475,13 @@
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"22", "FromPort":"22",
"ToPort":"22", "ToPort":"22",
"CidrIp":"10.0.0.0/16" "CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort": { "Ref": "XserverServerPort" }, "FromPort": { "Ref": "XserverServerPort" },
"ToPort": { "Ref": "XserverServerPort" }, "ToPort": { "Ref": "XserverServerPort" },
"CidrIp":"10.0.0.0/16" "SourceSecurityGroupId": { "Ref": "XServerELBSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"SourceSecurityGroupId" : {
"Ref" : "XServerELBSecurityGroup"
}
} }
], ],
"Tags":[ "Tags":[
...@@ -4465,19 +4504,6 @@ ...@@ -4465,19 +4504,6 @@
] ]
} }
}, },
"XServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"XServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"XServer",
"Properties":{
"Handle":{
"Ref":"XServerWaitHandle"
},
"Timeout":"1200"
}
},
"EdxDataSecurityGroup":{ "EdxDataSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup", "Type":"AWS::EC2::SecurityGroup",
"Properties":{ "Properties":{
...@@ -4636,42 +4662,6 @@ ...@@ -4636,42 +4662,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"WorkerServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"for dev in /dev/xvdc /dev/xvdd; do sudo echo w | fdisk $dev; sudo mkfs -t ext4 $dev;done;\n",
"sudo mkdir /mnt/logs\n",
"sudo mount /dev/xvdc /mnt/logs\n",
"sudo mount /dev/xvdd /opt\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"WorkerServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -4680,15 +4670,9 @@ ...@@ -4680,15 +4670,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
} }
} }
] ]
...@@ -4721,6 +4705,11 @@ ...@@ -4721,6 +4705,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"worker"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"worker", "Value":"worker",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -4865,19 +4854,6 @@ ...@@ -4865,19 +4854,6 @@
] ]
} }
}, },
"WorkerServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"WorkerServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"WorkerServer",
"Properties":{
"Handle":{
"Ref":"WorkerServerWaitHandle"
},
"Timeout":"1200"
}
},
"ForumServer":{ "ForumServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{ "Properties":{
...@@ -4903,42 +4879,6 @@ ...@@ -4903,42 +4879,6 @@
} }
] ]
}, },
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"ForumServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"for dev in /dev/xvdc /dev/xvdd; do sudo echo w | fdisk $dev; sudo mkfs -t ext4 $dev;done;\n",
"sudo mkdir /mnt/logs\n",
"sudo mount /dev/xvdc /mnt/logs\n",
"sudo mount /dev/xvdd /opt\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"ForumServerWaitHandle"
},
"'\n"
]
]
}
},
"KeyName":{ "KeyName":{
"Ref":"KeyName" "Ref":"KeyName"
}, },
...@@ -4947,15 +4887,9 @@ ...@@ -4947,15 +4887,9 @@
}, },
"BlockDeviceMappings":[ "BlockDeviceMappings":[
{ {
"DeviceName":"/dev/xvdc", "DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"Ebs":{ "Ebs":{
"VolumeSize":"50" "VolumeSize":"100"
} }
} }
] ]
...@@ -4988,6 +4922,11 @@ ...@@ -4988,6 +4922,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"forum"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"forum", "Value":"forum",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -5213,19 +5152,6 @@ ...@@ -5213,19 +5152,6 @@
] ]
} }
}, },
"ForumServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"ForumServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"ForumServer",
"Properties":{
"Handle":{
"Ref":"ForumServerWaitHandle"
},
"Timeout":"1200"
}
},
"MongoServer":{ "MongoServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{ "Properties":{
...@@ -5396,6 +5322,11 @@ ...@@ -5396,6 +5322,11 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"mongo"]]},
"PropagateAtLaunch":true
},
{
"Key":"play", "Key":"play",
"Value":"mongo", "Value":"mongo",
"PropagateAtLaunch":true "PropagateAtLaunch":true
...@@ -5486,11 +5417,14 @@ ...@@ -5486,11 +5417,14 @@
"FromPort":"27017", "FromPort":"27017",
"ToPort":"27017", "ToPort":"27017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo01",
"CIDR"
]}
]]
} }
}, },
{ {
...@@ -5498,11 +5432,14 @@ ...@@ -5498,11 +5432,14 @@
"FromPort":"28017", "FromPort":"28017",
"ToPort":"28017", "ToPort":"28017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo01", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo01",
"CIDR"
]}
]]
} }
}, },
{ {
...@@ -5510,11 +5447,14 @@ ...@@ -5510,11 +5447,14 @@
"FromPort":"27017", "FromPort":"27017",
"ToPort":"27017", "ToPort":"27017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo02",
"CIDR"
]}
]]
} }
}, },
{ {
...@@ -5522,11 +5462,14 @@ ...@@ -5522,11 +5462,14 @@
"FromPort":"28017", "FromPort":"28017",
"ToPort":"28017", "ToPort":"28017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo02", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo02",
"CIDR"
]}
]]
} }
}, },
{ {
...@@ -5534,11 +5477,14 @@ ...@@ -5534,11 +5477,14 @@
"FromPort":"27017", "FromPort":"27017",
"ToPort":"27017", "ToPort":"27017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo03", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo03",
"CIDR"
]}
]]
} }
}, },
{ {
...@@ -5546,11 +5492,14 @@ ...@@ -5546,11 +5492,14 @@
"FromPort":"28017", "FromPort":"28017",
"ToPort":"28017", "ToPort":"28017",
"CidrIp":{ "CidrIp":{
"Fn::FindInMap":[ "Fn::Join": ["", [
"SubnetConfig", "10.", { "Ref": "ClassB"},
"Mongo03", {"Fn::FindInMap":[
"CIDR" "SubnetConfig",
] "Mongo03",
"CIDR"
]}
]]
} }
} }
], ],
...@@ -5695,49 +5644,34 @@ ...@@ -5695,49 +5644,34 @@
], ],
"Tags":[ "Tags":[
{ {
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"notifier"]]}
},
{
"Key":"play", "Key":"play",
"Value":"notifier" "Value":"notifier"
}, },
{ {
"Key":"environment",
"Value":{
"Ref":"EnvironmentTag"
}
},
{
"Key":"deployment", "Key":"deployment",
"Value":{ "Value":{
"Ref":"DeploymentTag" "Ref":"DeploymentTag"
}, }
"PropagateAtLaunch":true
} }
], ],
"UserData":{ "BlockDeviceMappings":[
"Fn::Base64":{ {
"Fn::Join":[ "DeviceName":"/dev/sda1",
"", "Ebs":{
[ "VolumeSize":"100"
"#!/bin/bash -x\n", }
"exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n",
"{\n",
" cfn-signal -e 1 -r \"$1\" '",
{
"Ref":"NotifierServerWaitHandle"
},
"'\n",
" exit 1\n",
"}\n",
"apt-get -y update\n",
"apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date`\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date`\n",
"# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '",
{
"Ref":"NotifierServerWaitHandle"
},
"'\n"
]
]
} }
} ]
} }
}, },
"NotifierSecurityGroup":{ "NotifierSecurityGroup":{
...@@ -5758,19 +5692,6 @@ ...@@ -5758,19 +5692,6 @@
} }
] ]
} }
},
"NotifierServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"NotifierServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"NotifierHost",
"Properties":{
"Handle":{
"Ref":"NotifierServerWaitHandle"
},
"Timeout":"1200"
}
} }
}, },
"Outputs":{ "Outputs":{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment