Skip to content

Commit a1eee9b

Browse files
committed
ref(contrib/ec2): make ELB scheme a template parameter
1 parent dd5004c commit a1eee9b

3 files changed

Lines changed: 16 additions & 18 deletions

File tree

contrib/ec2/deis.template.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@
9191
"Default": "true",
9292
"AllowedValues" : [ "true", "false" ],
9393
"ConstraintDescription" : "must be either true or false"
94+
},
95+
"ELBScheme": {
96+
"Description": "Whether to create an internal-only load balancer, or a public-facing one (default)",
97+
"Type": "String",
98+
"Default": "internet-facing",
99+
"AllowedValues" : [ "internet-facing", "internal" ],
100+
"ConstraintDescription" : "must be either 'internet-facing' for public use, or 'internal' for private use"
94101
}
95102
},
96103

@@ -271,7 +278,7 @@
271278
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
272279
"DependsOn" : "GatewayToInternet",
273280
"Properties": {
274-
"Scheme" : "internet-facing",
281+
"Scheme" : {"Ref": "ELBScheme"},
275282
"HealthCheck": {
276283
"HealthyThreshold": "4",
277284
"Interval": "15",

contrib/ec2/gen-json.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@
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
9893

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

docs/installing_deis/aws.rst

100755100644
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Customize cloudformation.json
8080
-----------------------------
8181

8282
Any of the parameter defaults defined in deis.template.json can be overridden by setting the value
83-
in `cloudformation.json`_ like so:
83+
in `cloudformation.json`_. For example, to configure all of the optional settings:
8484

8585
.. code-block:: console
8686
@@ -99,8 +99,13 @@ in `cloudformation.json`_ like so:
9999
{
100100
"ParameterKey": "AssociatePublicIP",
101101
"ParameterValue": "false"
102+
},
103+
{
104+
"ParameterKey": "ELBScheme",
105+
"ParameterValue": "internal"
102106
}
103107
108+
104109
The only entry in cloudformation.json required to launch your cluster is `KeyPair`, which is
105110
already filled out. The defaults will be applied for the other settings.
106111

@@ -135,15 +140,6 @@ For example, if your VPC has ID ``vpc-a26218bf`` and consists of the subnets ``s
135140
export VPC_SUBNETS=subnet-04d7f942,subnet-2b03ab7f
136141
export VPC_ZONES=us-east-1b,us-east-1c
137142
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
147143
148144
Run the Provision Script
149145
------------------------
@@ -184,15 +180,15 @@ start installing the platform.
184180
CloudFormation Updates
185181
----------------------
186182

187-
To use CloudFormation to perform update operations to your stack, there is another script:
183+
To use CloudFormation to perform update operations to your stack, there is another script:
188184
`update_ec2_cluster.sh`_. Depending on the parameters that you have changed, CloudFormation
189185
may replace the EC2 instances in your stack.
190186

191187
The following parameters can be changed without replacing all instances in a stack:
192188

193189
- ``ClusterSize`` - Number of nodes in the cluster. This may launch new instances or terminate
194190
existing instances. If you are scaling down, this may interrupt service. If a container
195-
was running on an instance that was terminated, it will have to be rebalanced onto another
191+
was running on an instance that was terminated, it will have to be rebalanced onto another
196192
node which will cause some downtime.
197193
- ``SSHFrom`` - Locks down SSH access to the Deis hosts. This will update the security
198194
group for the Deis hosts.

0 commit comments

Comments
 (0)