Skip to content

Commit

Permalink
Add selection of a load balancer Scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
80degreeswest committed Jun 8, 2020
1 parent 289effe commit b114d67
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.eightydegreeswest</groupId>
<artifactId>bfmgr</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<name>bfmgr</name>
<description>Buildfarm Manager</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ public class CreateClusterRequest {
private String workerRepo;
private String workerTag;
private String workerConfig;
private String elbType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public CreateClusterRequest getDefaultCreateClusterRequest() {
createClusterRequest.setWorkerInstanceType(defaultWorkerInstanceType);
createClusterRequest.setWorkerRepo(workerRepo);
createClusterRequest.setWorkerTag(buildfarmTag);
createClusterRequest.setElbType("internet-facing");
return createClusterRequest;
}

Expand Down Expand Up @@ -226,6 +227,7 @@ private Collection<Parameter> getCloudFormationParameters(CreateClusterRequest c
parameters.add(getParameter("ServerConfigFile", createClusterRequest.getServerConfig()));
parameters.add(getParameter("ClusterName", createClusterRequest.getClusterName()));
parameters.add(getParameter("RequiredTagName", getAssetTag()));
parameters.add(getParameter("ElbType", createClusterRequest.getElbType()));
return parameters;
}

Expand Down
10 changes: 9 additions & 1 deletion src/main/resources/aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
"RequiredTagName":{
"Type":"String",
"Description":"Required tag name (Asset)."
},
"ElbType":{
"Type":"String",
"Default" : "internet-facing",
"AllowedValues" : ["internet-facing", "internal"],
"Description":"Load balancer type."
}
},
"Resources":{
Expand Down Expand Up @@ -285,7 +291,9 @@
"LoadBalancerServer":{
"Type":"AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties":{
"Scheme":"internet-facing",
"Scheme":{
"Ref": "ElbType"
},
"Subnets":{
"Ref":"SubnetPool"
},
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ <h5 class="modal-title" id="createClusterModalLabel">Create a new Buildfarm Clus
<option th:each="securityGroupItem : ${securityGroupList}" th:value="${ securityGroupItem.getGroupId() }"><p th:text="${ securityGroupItem.getGroupName() + ' (' + securityGroupItem.getGroupId() + ')' }" th:remove="tag"></p></option>
</select>
</div>
<div class="form-group row">
<label for="elbType" class="col-sm-3 col-form-label">ELB Type</label>
<select class="col-sm-8" id="elbType" th:field="*{elbType}">
<option value="internet-facing">internet-facing</option>
<option value="internal">internal</option>
</select>
</div>
<div class="form-group row">
<label for="ami" class="col-sm-3 col-form-label">AMI</label>
<input class="col-sm-8" id="ami" type="text" th:field="*{ami}" />
Expand Down

0 comments on commit b114d67

Please sign in to comment.