Commit 43010484 by Feanil Patel

Merge pull request #387 from edx/feanil/cfn_ports

Change the default cloudformation elb backend ports.
parents 77d8675a 46b1c36a
...@@ -140,15 +140,25 @@ ...@@ -140,15 +140,25 @@
"AllowedPattern":"(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})", "AllowedPattern":"(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
"ConstraintDescription":"must be a valid IP CIDR range of the form x.x.x.x/x." "ConstraintDescription":"must be a valid IP CIDR range of the form x.x.x.x/x."
}, },
"WebServerPort":{ "EdxappServerPort":{
"Description":"The TCP port for the Web Server", "Description":"The TCP port for the Edxapp Server",
"Type":"Number", "Type":"Number",
"Default":"80" "Default":"18000"
},
"XqueueServerPort":{
"Description":"The TCP port for the Xqueue server",
"Type":"Number",
"Default":"18040"
},
"XserverServerPort":{
"Description":"The TCP port for the XServer",
"Type":"Number",
"Default":"18050"
}, },
"ForumServerPort":{ "ForumServerPort":{
"Description":"The TCP port for the Web Server", "Description":"The TCP port for the Forum Server",
"Type":"Number", "Type":"Number",
"Default":"80" "Default":"4567"
}, },
"CacheNodePort":{ "CacheNodePort":{
"Description":"The TCP port for the nodes in the Elasticache cluster", "Description":"The TCP port for the nodes in the Elasticache cluster",
...@@ -2636,14 +2646,14 @@ ...@@ -2636,14 +2646,14 @@
{ {
"LoadBalancerPort":"80", "LoadBalancerPort":"80",
"InstancePort":{ "InstancePort":{
"Ref":"WebServerPort" "Ref":"EdxappServerPort"
}, },
"Protocol":"HTTP" "Protocol":"HTTP"
}, },
{ {
"LoadBalancerPort":"443", "LoadBalancerPort":"443",
"InstancePort":{ "InstancePort":{
"Ref":"WebServerPort" "Ref":"EdxappServerPort"
}, },
"Protocol":"HTTPS", "Protocol":"HTTPS",
"InstanceProtocol":"HTTP", "InstanceProtocol":"HTTP",
...@@ -2653,7 +2663,13 @@ ...@@ -2653,7 +2663,13 @@
} }
], ],
"HealthCheck":{ "HealthCheck":{
"Target":"HTTP:80/heartbeat", "Target": { "Fn::Join":[ "",
[
"HTTP:",
{ "Ref": "EdxappServerPort" },
"/heartbeat"
]
]},
"HealthyThreshold":"3", "HealthyThreshold":"3",
"UnhealthyThreshold":"5", "UnhealthyThreshold":"5",
"Interval":"30", "Interval":"30",
...@@ -2724,14 +2740,12 @@ ...@@ -2724,14 +2740,12 @@
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort":{
"ToPort":"80", "Ref":"EdxappServerPort"
"CidrIp":"0.0.0.0/0" },
}, "ToPort":{
{ "Ref":"EdxappServerPort"
"IpProtocol":"tcp", },
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0" "CidrIp":"0.0.0.0/0"
} }
] ]
...@@ -2976,7 +2990,7 @@ ...@@ -2976,7 +2990,7 @@
"Listeners":[ "Listeners":[
{ {
"LoadBalancerPort":"80", "LoadBalancerPort":"80",
"InstancePort":"80", "InstancePort": { "Ref": "XqueueServerPort" },
"Protocol":"HTTP" "Protocol":"HTTP"
}, },
{ {
...@@ -2986,7 +3000,13 @@ ...@@ -2986,7 +3000,13 @@
} }
], ],
"HealthCheck":{ "HealthCheck":{
"Target":"HTTP:80/xqueue/status/", "Target": { "Fn::Join":[ "",
[
"HTTP:",
{ "Ref": "XqueueServerPort" },
"/xqueue/status/"
]
]},
"HealthyThreshold":"3", "HealthyThreshold":"3",
"UnhealthyThreshold":"5", "UnhealthyThreshold":"5",
"Interval":"30", "Interval":"30",
...@@ -3057,14 +3077,8 @@ ...@@ -3057,14 +3077,8 @@
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort": { "Ref": "XqueueServerPort" },
"ToPort":"80", "ToPort": { "Ref": "XqueueServerPort" },
"CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0" "CidrIp":"0.0.0.0/0"
} }
] ]
...@@ -3675,12 +3689,18 @@ ...@@ -3675,12 +3689,18 @@
"Listeners":[ "Listeners":[
{ {
"LoadBalancerPort":"80", "LoadBalancerPort":"80",
"InstancePort":"80", "InstancePort":{ "Ref": "XserverServerPort" },
"Protocol":"HTTP" "Protocol":"HTTP"
} }
], ],
"HealthCheck":{ "HealthCheck":{
"Target":"HTTP:80/", "Target": { "Fn::Join":[ "",
[
"HTTP:",
{ "Ref": "XserverServerPort" },
"/"
]
]},
"HealthyThreshold":"3", "HealthyThreshold":"3",
"UnhealthyThreshold":"5", "UnhealthyThreshold":"5",
"Interval":"30", "Interval":"30",
...@@ -3737,8 +3757,8 @@ ...@@ -3737,8 +3757,8 @@
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort": { "Ref": "XserverServerPort" },
"ToPort":"80", "ToPort": { "Ref": "XserverServerPort" },
"CidrIp":"10.0.0.0/16" "CidrIp":"10.0.0.0/16"
}, },
{ {
...@@ -4012,12 +4032,7 @@ ...@@ -4012,12 +4032,7 @@
"MaxSize":"2", "MaxSize":"2",
"DesiredCapacity":{ "DesiredCapacity":{
"Ref":"WorkerDesiredCapacity" "Ref":"WorkerDesiredCapacity"
}, }
"LoadBalancerNames":[
{
"Ref":"WorkerELB"
}
]
} }
}, },
"WorkerServerScaleUpPolicy":{ "WorkerServerScaleUpPolicy":{
...@@ -4094,88 +4109,6 @@ ...@@ -4094,88 +4109,6 @@
"ComparisonOperator":"LessThanThreshold" "ComparisonOperator":"LessThanThreshold"
} }
}, },
"WorkerELB":{
"Type":"AWS::ElasticLoadBalancing::LoadBalancer",
"Properties":{
"SecurityGroups":[
{
"Ref":"WorkerELBSecurityGroup"
}
],
"Listeners":[
{
"LoadBalancerPort":"80",
"InstancePort":{
"Ref":"WebServerPort"
},
"Protocol":"HTTP"
},
{
"LoadBalancerPort":"443",
"InstancePort":{
"Ref":"WebServerPort"
},
"Protocol":"HTTPS",
"InstanceProtocol":"HTTP",
"SSLCertificateId": {
"Ref": "SSLCertificateARN"
}
}
],
"HealthCheck":{
"Target":"HTTP:80/heartbeat",
"HealthyThreshold":"3",
"UnhealthyThreshold":"5",
"Interval":"30",
"Timeout":"5"
},
"Subnets":[
{
"Ref":"PublicSubnet01"
},
{
"Ref":"PublicSubnet02"
}
]
}
},
"WorkerELBSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup",
"Properties":{
"GroupDescription":"Enable HTTP access on port 80",
"VpcId":{
"Ref":"EdxVPC"
},
"SecurityGroupIngress":[
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0"
}
],
"SecurityGroupEgress":[
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0"
}
]
}
},
"WorkerServerSecurityGroup":{ "WorkerServerSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup", "Type":"AWS::EC2::SecurityGroup",
"Properties":{ "Properties":{
...@@ -4191,18 +4124,6 @@ ...@@ -4191,18 +4124,6 @@
"CidrIp":{ "CidrIp":{
"Ref":"SSHLocation" "Ref":"SSHLocation"
} }
},
{
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0"
} }
] ]
} }
...@@ -4538,14 +4459,8 @@ ...@@ -4538,14 +4459,8 @@
}, },
{ {
"IpProtocol":"tcp", "IpProtocol":"tcp",
"FromPort":"80", "FromPort": { "Ref": "ForumServerPort" },
"ToPort":"80", "ToPort": { "Ref": "ForumServerPort" },
"CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":"443",
"ToPort":"443",
"CidrIp":"0.0.0.0/0" "CidrIp":"0.0.0.0/0"
} }
] ]
...@@ -4802,6 +4717,90 @@ ...@@ -4802,6 +4717,90 @@
"FromPort":"28017", "FromPort":"28017",
"ToPort":"28017", "ToPort":"28017",
"SourceSecurityGroupId": { "Ref": "WorkerServerSecurityGroup" } "SourceSecurityGroupId": { "Ref": "WorkerServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"27017",
"ToPort":"27017",
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"28017",
"ToPort":"28017",
"SourceSecurityGroupId": { "Ref": "ForumServerSecurityGroup" }
},
{
"IpProtocol":"tcp",
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo01",
"CIDR"
]
}
},
{
"IpProtocol":"tcp",
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo01",
"CIDR"
]
}
},
{
"IpProtocol":"tcp",
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo02",
"CIDR"
]
}
},
{
"IpProtocol":"tcp",
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo02",
"CIDR"
]
}
},
{
"IpProtocol":"tcp",
"FromPort":"27017",
"ToPort":"27017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo03",
"CIDR"
]
}
},
{
"IpProtocol":"tcp",
"FromPort":"28017",
"ToPort":"28017",
"CidrIp":{
"Fn::FindInMap":[
"SubnetConfig",
"Mongo03",
"CIDR"
]
}
} }
] ]
} }
......
...@@ -79,7 +79,7 @@ EDXAPP_SYSLOG_SERVER: '' ...@@ -79,7 +79,7 @@ EDXAPP_SYSLOG_SERVER: ''
EDXAPP_RABBIT_HOSTNAME: 'localhost' EDXAPP_RABBIT_HOSTNAME: 'localhost'
EDXAPP_XML_MAPPINGS: {} EDXAPP_XML_MAPPINGS: {}
EDXAPP_LMS_NGINX_PORT: 80 EDXAPP_LMS_NGINX_PORT: 18000
EDXAPP_LMS_PREVIEW_NGINX_PORT: 18020 EDXAPP_LMS_PREVIEW_NGINX_PORT: 18020
EDXAPP_CMS_NGINX_PORT: 18010 EDXAPP_CMS_NGINX_PORT: 18010
......
...@@ -35,10 +35,9 @@ cat << EOF > $extra_vars ...@@ -35,10 +35,9 @@ cat << EOF > $extra_vars
EDXAPP_PREVIEW_LMS_BASE: preview.${deploy_host} EDXAPP_PREVIEW_LMS_BASE: preview.${deploy_host}
EDXAPP_LMS_BASE: ${deploy_host} EDXAPP_LMS_BASE: ${deploy_host}
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_LMS_PREVIEW_NGINX_PORT: 80 EDXAPP_LMS_PREVIEW_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80 EDXAPP_CMS_NGINX_PORT: 80
XSERVER_GRADER_CHECKOUT: False
c_skip_grader_checkout: True
edx_platform_commit: $edxapp_version edx_platform_commit: $edxapp_version
forum_version: $forum_version forum_version: $forum_version
......
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