diff --git a/contrib/ec2/deis.template.json b/contrib/ec2/deis.template.json old mode 100644 new mode 100755 index bca1ec3487..d9ccdbdba1 --- a/contrib/ec2/deis.template.json +++ b/contrib/ec2/deis.template.json @@ -271,6 +271,7 @@ "Type": "AWS::ElasticLoadBalancing::LoadBalancer", "DependsOn" : "GatewayToInternet", "Properties": { + "Scheme" : "internet-facing", "HealthCheck": { "HealthyThreshold": "4", "Interval": "15", diff --git a/contrib/ec2/gen-json.py b/contrib/ec2/gen-json.py index eb1304bb42..2c6535011f 100755 --- a/contrib/ec2/gen-json.py +++ b/contrib/ec2/gen-json.py @@ -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 diff --git a/docs/installing_deis/aws.rst b/docs/installing_deis/aws.rst old mode 100644 new mode 100755 index e4b6605e05..67dcad4062 --- a/docs/installing_deis/aws.rst +++ b/docs/installing_deis/aws.rst @@ -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 ------------------------