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 @@
"MinValue":"5",
"MaxValue":"3072",
"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":{
......@@ -456,31 +464,31 @@
"sa-east-1": { "AMI":"ami-0439e619" }
},
"SubnetConfig":{
"VPC": { "CIDR":"10.0.0.0/16" },
"Public01": { "CIDR":"10.0.0.0/24" },
"Public02": { "CIDR":"10.0.1.0/24" },
"Edxapp01": { "CIDR":"10.0.10.0/24" },
"Edxapp02": { "CIDR":"10.0.11.0/24" },
"XServerJail01": { "CIDR":"10.0.20.0/24" },
"XServerJail02": { "CIDR":"10.0.21.0/24" },
"Xqueue01": { "CIDR":"10.0.30.0/24" },
"Xqueue02": { "CIDR":"10.0.31.0/24" },
"CommonCluster01": { "CIDR":"10.0.46.0/24"},
"CommonCluster02": { "CIDR":"10.0.47.0/24"},
"CommonCluster03": { "CIDR":"10.0.48.0/24"},
"Data01": { "CIDR":"10.0.50.0/24" },
"Data02": { "CIDR":"10.0.51.0/24" },
"Cache01": { "CIDR":"10.0.60.0/24" },
"Cache02": { "CIDR":"10.0.61.0/24" },
"Worker01": { "CIDR":"10.0.70.0/24" },
"Worker02": { "CIDR":"10.0.71.0/24" },
"Forum01": { "CIDR":"10.0.80.0/24" },
"Forum02": { "CIDR":"10.0.81.0/24" },
"Mongo01": { "CIDR":"10.0.90.0/24" },
"Mongo02": { "CIDR":"10.0.91.0/24" },
"Mongo03": { "CIDR":"10.0.92.0/24" },
"Notifier01": { "CIDR":"10.0.100.0/24" },
"Admin": { "CIDR":"10.0.200.0/24" }
"VPC": { "CIDR":".0.0/16" },
"Public01": { "CIDR":".0.0/24" },
"Public02": { "CIDR":".1.0/24" },
"Edxapp01": { "CIDR":".10.0/24" },
"Edxapp02": { "CIDR":".11.0/24" },
"XServerJail01": { "CIDR":".20.0/24" },
"XServerJail02": { "CIDR":".21.0/24" },
"Xqueue01": { "CIDR":".30.0/24" },
"Xqueue02": { "CIDR":".31.0/24" },
"CommonCluster01": { "CIDR":".46.0/24"},
"CommonCluster02": { "CIDR":".47.0/24"},
"CommonCluster03": { "CIDR":".48.0/24"},
"Data01": { "CIDR":".50.0/24" },
"Data02": { "CIDR":".51.0/24" },
"Cache01": { "CIDR":".60.0/24" },
"Cache02": { "CIDR":".61.0/24" },
"Worker01": { "CIDR":".70.0/24" },
"Worker02": { "CIDR":".71.0/24" },
"Forum01": { "CIDR":".80.0/24" },
"Forum02": { "CIDR":".81.0/24" },
"Mongo01": { "CIDR":".90.0/24" },
"Mongo02": { "CIDR":".91.0/24" },
"Mongo03": { "CIDR":".92.0/24" },
"Notifier01": { "CIDR":".100.0/24" },
"Admin": { "CIDR":".200.0/24" }
},
"MapRegionsToAvailZones":{
"us-east-1": { "AZone2":"us-east-1d", "AZone0":"us-east-1b", "AZone1":"us-east-1c" },
......@@ -499,7 +507,7 @@
"Properties":{
"EnableDnsSupport" : "true",
"EnableDnsHostnames" : "true",
"CidrBlock":"10.0.0.0/16",
"CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"InstanceTenancy":"default"
}
},
......@@ -510,11 +518,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Public01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -547,11 +558,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Public02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -584,11 +598,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Admin",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -616,11 +633,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Edxapp01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -661,11 +681,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Edxapp02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -706,11 +729,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Xqueue01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -751,11 +777,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Xqueue02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -796,11 +825,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"CommonCluster01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -841,11 +873,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"CommonCluster02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -886,11 +921,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"CommonCluster03",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -931,11 +969,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"XServerJail01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -976,11 +1017,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"XServerJail02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1021,11 +1065,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Data01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1053,11 +1100,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Data02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1085,11 +1135,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Cache01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1117,11 +1170,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Cache02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1149,11 +1205,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Worker01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1194,11 +1253,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Worker02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1239,11 +1301,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Forum01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1284,11 +1349,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Forum02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1329,11 +1397,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1374,11 +1445,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo02",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1419,11 +1493,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo03",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1464,11 +1541,14 @@
"Ref":"EdxVPC"
},
"CidrBlock":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Notifier01",
"CIDR"
]
]}
]]
},
"AvailabilityZone":{
"Fn::FindInMap":[
......@@ -1684,7 +1764,7 @@
"Protocol":"1",
"RuleAction":"allow",
"Egress":"false",
"CidrBlock":"10.0.0.0/16",
"CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": {
"Code": "0",
"Type": "0"
......@@ -1701,7 +1781,7 @@
"Protocol":"1",
"RuleAction":"allow",
"Egress":"false",
"CidrBlock":"10.0.0.0/16",
"CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": {
"Code": "0",
"Type": "8"
......@@ -1735,7 +1815,7 @@
"Protocol":"1",
"RuleAction":"allow",
"Egress":"true",
"CidrBlock":"10.0.0.0/16",
"CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": {
"Code": "0",
"Type": "0"
......@@ -1752,7 +1832,7 @@
"Protocol":"1",
"RuleAction":"allow",
"Egress":"true",
"CidrBlock":"10.0.0.0/16",
"CidrBlock": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]},
"Icmp": {
"Code": "0",
"Type": "8"
......@@ -2791,7 +2871,7 @@
"IpProtocol":"tcp",
"FromPort":"22",
"ToPort":"22",
"CidrIp":"10.0.0.0/16"
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
......@@ -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":{
"Ref":"KeyName"
},
......@@ -2993,15 +3037,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -3034,6 +3072,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"edxapp"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"edxapp",
"PropagateAtLaunch":true
......@@ -3283,19 +3326,6 @@
]
}
},
"EdxServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"EdxServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"EdxappServer",
"Properties":{
"Handle":{
"Ref":"EdxServerWaitHandle"
},
"Timeout":"1200"
}
},
"XqueueServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
......@@ -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":{
"Ref":"KeyName"
},
......@@ -3362,15 +3360,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -3403,6 +3395,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"xqueue"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"xqueue",
"PropagateAtLaunch":true
......@@ -3636,19 +3633,6 @@
]
}
},
"XqueueServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"XqueueServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"XqueueServer",
"Properties":{
"Handle":{
"Ref":"XqueueServerWaitHandle"
},
"Timeout":"1200"
}
},
"CommonClusterServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
......@@ -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":{
"Ref":"KeyName"
},
......@@ -3717,15 +3669,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -3767,6 +3713,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"commoncluster"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"commoncluster",
"PropagateAtLaunch":true
......@@ -3905,27 +3856,51 @@
"IpProtocol":"tcp",
"FromPort":"9200",
"ToPort":"9200",
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"9300",
"ToPort":"9300",
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
}
],
"SecurityGroupEgress":[
{
"IpProtocol":"tcp",
"FromPort":"9200",
"ToPort":"9200",
"CidrIp":"10.0.0.0/16"
"FromPort": 9200,
"ToPort": 9200,
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster01", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort":"9300",
"ToPort":"9300",
"CidrIp":"10.0.0.0/16"
"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"]}]]}
}
]
}
......@@ -3950,13 +3925,61 @@
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "ElasticSearchELBSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort": 9300,
"ToPort": 9300,
"SourceSecurityGroupId": { "Ref": "ElasticSearchELBSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort": 9200,
"ToPort": 9200,
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"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":"10.0.0.0/16"
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "CommonCluster03", "CIDR"]}]]}
}
]
}
......@@ -4014,13 +4037,25 @@
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "EdxappServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"SourceSecurityGroupId": { "Ref": "EdxappServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
}
],
"SecurityGroupEgress":[
......@@ -4028,13 +4063,37 @@
"IpProtocol":"tcp",
"FromPort":"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":"10.0.0.0/16"
"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",
"FromPort":"6163",
"ToPort":"6163",
"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 @@
"IpProtocol":"tcp",
"FromPort":"22",
"ToPort":"22",
"CidrIp":"10.0.0.0/16"
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
......@@ -4087,9 +4146,37 @@
},
{
"IpProtocol":"tcp",
"FromPort":"5672",
"ToPort":"5672",
"SourceSecurityGroupId" : {
"Ref" : "EdxappServerSecurityGroup"
}
},
{
"IpProtocol":"tcp",
"FromPort":"6163",
"ToPort":"6163",
"SourceSecurityGroupId" : {
"Ref" : "EdxappServerSecurityGroup"
}
},
{
"IpProtocol":"tcp",
"FromPort":"0",
"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",
......@@ -4120,19 +4207,6 @@
]
}
},
"CommonClusterServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"CommonClusterServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"CommonClusterServer",
"Properties":{
"Handle":{
"Ref":"CommonClusterServerWaitHandle"
},
"Timeout":"1200"
}
},
"XServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
......@@ -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":{
"Ref":"KeyName"
},
......@@ -4199,15 +4241,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -4240,6 +4276,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"xserver"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"xserver",
"PropagateAtLaunch":true
......@@ -4403,15 +4444,21 @@
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"10.0.0.0/16"
"SourceSecurityGroupId": { "Ref": "XqueueServerSecurityGroup" }
}
],
"SecurityGroupEgress":[
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"10.0.0.0/16"
"FromPort": {"Ref": "XserverServerPort"},
"ToPort": {"Ref": "XserverServerPort"},
"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 @@
"IpProtocol":"tcp",
"FromPort":"22",
"ToPort":"22",
"CidrIp":"10.0.0.0/16"
"CidrIp": { "Fn::Join": ["", ["10.", { "Ref": "ClassB" }, { "Fn::FindInMap": [ "SubnetConfig", "VPC", "CIDR"]}]]}
},
{
"IpProtocol":"tcp",
"FromPort": { "Ref": "XserverServerPort" },
"ToPort": { "Ref": "XserverServerPort" },
"CidrIp":"10.0.0.0/16"
},
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"SourceSecurityGroupId" : {
"Ref" : "XServerELBSecurityGroup"
}
"SourceSecurityGroupId": { "Ref": "XServerELBSecurityGroup" }
}
],
"Tags":[
......@@ -4465,19 +4504,6 @@
]
}
},
"XServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"XServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"XServer",
"Properties":{
"Handle":{
"Ref":"XServerWaitHandle"
},
"Timeout":"1200"
}
},
"EdxDataSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup",
"Properties":{
......@@ -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":{
"Ref":"KeyName"
},
......@@ -4680,15 +4670,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -4721,6 +4705,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"worker"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"worker",
"PropagateAtLaunch":true
......@@ -4865,19 +4854,6 @@
]
}
},
"WorkerServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"WorkerServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"WorkerServer",
"Properties":{
"Handle":{
"Ref":"WorkerServerWaitHandle"
},
"Timeout":"1200"
}
},
"ForumServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
......@@ -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":{
"Ref":"KeyName"
},
......@@ -4947,15 +4887,9 @@
},
"BlockDeviceMappings":[
{
"DeviceName":"/dev/xvdc",
"Ebs":{
"VolumeSize":"50"
}
},
{
"DeviceName":"/dev/xvdd",
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"50"
"VolumeSize":"100"
}
}
]
......@@ -4988,6 +4922,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"forum"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"forum",
"PropagateAtLaunch":true
......@@ -5213,19 +5152,6 @@
]
}
},
"ForumServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"ForumServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"ForumServer",
"Properties":{
"Handle":{
"Ref":"ForumServerWaitHandle"
},
"Timeout":"1200"
}
},
"MongoServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
......@@ -5396,6 +5322,11 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"mongo"]]},
"PropagateAtLaunch":true
},
{
"Key":"play",
"Value":"mongo",
"PropagateAtLaunch":true
......@@ -5486,11 +5417,14 @@
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo01",
"CIDR"
]
]}
]]
}
},
{
......@@ -5498,11 +5432,14 @@
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo01",
"CIDR"
]
]}
]]
}
},
{
......@@ -5510,11 +5447,14 @@
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo02",
"CIDR"
]
]}
]]
}
},
{
......@@ -5522,11 +5462,14 @@
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo02",
"CIDR"
]
]}
]]
}
},
{
......@@ -5534,11 +5477,14 @@
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo03",
"CIDR"
]
]}
]]
}
},
{
......@@ -5546,11 +5492,14 @@
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"Fn::Join": ["", [
"10.", { "Ref": "ClassB"},
{"Fn::FindInMap":[
"SubnetConfig",
"Mongo03",
"CIDR"
]
]}
]]
}
}
],
......@@ -5695,49 +5644,34 @@
],
"Tags":[
{
"Key":"Name",
"Value": {"Fn::Join": ["-",[{"Ref": "EnvironmentTag"},"notifier"]]}
},
{
"Key":"play",
"Value":"notifier"
},
{
"Key":"environment",
"Value":{
"Ref":"EnvironmentTag"
}
},
{
"Key":"deployment",
"Value":{
"Ref":"DeploymentTag"
},
"PropagateAtLaunch":true
}
}
],
"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":"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' '",
"BlockDeviceMappings":[
{
"Ref":"NotifierServerWaitHandle"
},
"'\n"
]
]
"DeviceName":"/dev/sda1",
"Ebs":{
"VolumeSize":"100"
}
}
]
}
},
"NotifierSecurityGroup":{
......@@ -5758,19 +5692,6 @@
}
]
}
},
"NotifierServerWaitHandle":{
"Type":"AWS::CloudFormation::WaitConditionHandle"
},
"NotifierServerWaitCondition":{
"Type":"AWS::CloudFormation::WaitCondition",
"DependsOn":"NotifierHost",
"Properties":{
"Handle":{
"Ref":"NotifierServerWaitHandle"
},
"Timeout":"1200"
}
}
},
"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