Repository navigation
Client VPN setup

Instead of having an application load balancer that's 'internet-facing' with a public IPv4 address, this design uses an 'internal' application load balancer that's in the private subnet, without a public IPv4 address.
The client VPN that's deployed into the account's public subnets is what allows you to to communicate with the Jenkins' instance, via the internal application load balancer.
-
First, we need to generate some certificates and keys. These also need to be imported into AWS Certificate Manager. Follow steps 1-9 here.
-
If you already haven't, deploy the foundation of this stack: steps 1-4 here
-
Since there won't be any hosted zone names, the command to deploy the Jenkins application should include the server certificate ARN and and the client certificate ARN:
sceptre --var "servercertarn=arn:aws:acm:eu-central-1:123412341234:certificate/aa1a1aa1-a1a1-1a11-aaaa-1111111a1a11" \
--var "clientrootcertarn=arn:aws:acm:eu-central-1:123412341234:certificate/111a1a11-1111-1a1a-a1a1-1a111a1111a1" \
create prod/jenkinsapplication.yaml
-
Download the client VPN configuration
-
If you wish to keep internet connection alive through the VPN add the line
route-nopullto the .ovpn file. -
Add your routes to the .ovpn file.
$VPC_CIDR $NETMASK $CLIENT_VPN_CIDR $NETMASKFor example, if my VPC CIDR was: 10.0.0.0/16 and my client VPN's cidr was: 10.8.0.0/22, I would have:
route 10.0.0.0 255.255.0.0 route 10.8.0.0 255.255.252.0 -
Add the key and and cert section.
If you followed the guide for generating keys from step 1, you will need to copy the contents of theclient.domain.tld.keyand paste it between<key>and</key>in the .ovpn config file.Also, the contents of
client.domain.tld.crtneeds to be pasted in between<cert>and</cert>. -
Import your .ovpn config file into your VPN client and access your Jenkins via it's load balancer DNS name.
sceptre list outputs prod/jenkinsapplicationand follow the steps here to unlock your Jenkins.