Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(contrib/ec2): add support for internal ELBs
Browse files Browse the repository at this point in the history
  • Loading branch information
Saso Matejina authored and carmstrong committed Feb 12, 2015
1 parent 1fff81a commit dd5004c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/ec2/deis.template.json 100644 → 100755
Expand Up @@ -271,6 +271,7 @@
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"DependsOn" : "GatewayToInternet",
"Properties": {
"Scheme" : "internet-facing",
"HealthCheck": {
"HealthyThreshold": "4",
"Interval": "15",
Expand Down
5 changes: 5 additions & 0 deletions contrib/ec2/gen-json.py
Expand Up @@ -90,6 +90,11 @@
VPC_ID = os.getenv('VPC_ID', None)
VPC_SUBNETS = os.getenv('VPC_SUBNETS', None)
VPC_ZONES = os.getenv('VPC_ZONES', None)
ELB_SCHEME = os.getenv('ELB_SCHEME', None)

if ELB_SCHEME:
# Update ELB Scheme
template['Resources']['DeisWebELB']['Properties']['Scheme'] = ELB_SCHEME

if VPC_ID and VPC_SUBNETS and VPC_ZONES and len(VPC_SUBNETS.split(',')) == len(VPC_ZONES.split(',')):
# skip VPC, subnet, route, and internet gateway creation
Expand Down
9 changes: 9 additions & 0 deletions docs/installing_deis/aws.rst 100644 → 100755
Expand Up @@ -135,6 +135,15 @@ For example, if your VPC has ID ``vpc-a26218bf`` and consists of the subnets ``s
export VPC_SUBNETS=subnet-04d7f942,subnet-2b03ab7f
export VPC_ZONES=us-east-1b,us-east-1c
Change ELB Scheme
------------------------
For load balancers attached to an Amazon VPC, this parameter can be used to specify the type of load balancer to use.
Specify internal to create an internal load balancer with a DNS name that resolves to private IP addresses or
internet-facing to create a load balancer with a publicly resolvable DNS name, which resolves to public IP addresses.

.. code-block:: console
export ELB_SCHEME=internet-facing|internal
Run the Provision Script
------------------------
Expand Down

0 comments on commit dd5004c

Please sign in to comment.