Skip to content

Commit

Permalink
Set all packer templates to use private ip (#263)
Browse files Browse the repository at this point in the history
* Set all packer templates to use private ip

Signed-off-by: Peter Zhu <[email protected]>

* Add new Agent Node SG rule to open all ports within same SG

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Mar 30, 2023
1 parent 37f4c68 commit 7c32c32
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/security/ci-security-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class JenkinsSecurityGroups {
this.agentNodeSG.addIngressRule(this.mainNodeSG, Port.tcp(22), 'Main node SSH Access into agent nodes');
this.agentNodeSG.addIngressRule(this.mainNodeSG, Port.tcp(445), 'Main node SMB Access into agent nodes for Windows');
this.agentNodeSG.addIngressRule(this.mainNodeSG, Port.tcp(5985), 'Main node WinRM HTTP Access into agent nodes for Windows');
this.agentNodeSG.addIngressRule(this.agentNodeSG, Port.allTraffic(), 'Agent node open all ports to other agent nodes within the same SG');

this.efsSG = new SecurityGroup(stack, 'efsSG', {
vpc,
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-al2-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"most_recent":true
},
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"ssh_username": "ec2-user",
"ssh_timeout": "3h",
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-al2-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"most_recent":true
},
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"ssh_username": "ec2-user",
"ssh_timeout": "3h",
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-macos12-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
],
"most_recent":true
},
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"ssh_username": "ec2-user",
"ssh_timeout": "3h",
"tenancy": "host",
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-ubuntu2004-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"most_recent":true
},
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"ssh_username": "ubuntu",
"ssh_timeout": "3h",
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-win2016-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"most_recent":true
},
"user_data_file":"scripts/windows/userdata.ps1",
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"communicator":"winrm",
"winrm_username":"Administrator",
"winrm_timeout":"40m",
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-win2019-x64-alpine-wsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"most_recent":true
},
"user_data_file":"scripts/windows/userdata.ps1",
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"communicator":"winrm",
"winrm_username":"Administrator",
"winrm_timeout":"40m",
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-win2019-x64-gradle-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"most_recent":true
},
"user_data_file":"scripts/windows/userdata.ps1",
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"communicator":"winrm",
"winrm_username":"Administrator",
"winrm_timeout":"40m",
Expand Down
2 changes: 1 addition & 1 deletion packer/jenkins-agent-win2019-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"most_recent":true
},
"user_data_file":"scripts/windows/userdata.ps1",
"associate_public_ip_address":true,
"associate_public_ip_address":false,
"communicator":"winrm",
"winrm_username":"Administrator",
"winrm_timeout":"40m",
Expand Down

0 comments on commit 7c32c32

Please sign in to comment.