Skip to content

Commit dd5004c

Browse files
Saso Matejinacarmstrong
authored andcommitted
feat(contrib/ec2): add support for internal ELBs
1 parent 1fff81a commit dd5004c

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

contrib/ec2/deis.template.json

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
272272
"DependsOn" : "GatewayToInternet",
273273
"Properties": {
274+
"Scheme" : "internet-facing",
274275
"HealthCheck": {
275276
"HealthyThreshold": "4",
276277
"Interval": "15",

contrib/ec2/gen-json.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@
9090
VPC_ID = os.getenv('VPC_ID', None)
9191
VPC_SUBNETS = os.getenv('VPC_SUBNETS', None)
9292
VPC_ZONES = os.getenv('VPC_ZONES', None)
93+
ELB_SCHEME = os.getenv('ELB_SCHEME', None)
94+
95+
if ELB_SCHEME:
96+
# Update ELB Scheme
97+
template['Resources']['DeisWebELB']['Properties']['Scheme'] = ELB_SCHEME
9398

9499
if VPC_ID and VPC_SUBNETS and VPC_ZONES and len(VPC_SUBNETS.split(',')) == len(VPC_ZONES.split(',')):
95100
# skip VPC, subnet, route, and internet gateway creation

docs/installing_deis/aws.rst

100644100755
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ For example, if your VPC has ID ``vpc-a26218bf`` and consists of the subnets ``s
135135
export VPC_SUBNETS=subnet-04d7f942,subnet-2b03ab7f
136136
export VPC_ZONES=us-east-1b,us-east-1c
137137
138+
Change ELB Scheme
139+
------------------------
140+
For load balancers attached to an Amazon VPC, this parameter can be used to specify the type of load balancer to use.
141+
Specify internal to create an internal load balancer with a DNS name that resolves to private IP addresses or
142+
internet-facing to create a load balancer with a publicly resolvable DNS name, which resolves to public IP addresses.
143+
144+
.. code-block:: console
145+
146+
export ELB_SCHEME=internet-facing|internal
138147
139148
Run the Provision Script
140149
------------------------

0 commit comments

Comments
 (0)