Skip to content

Commit 3d80f2e

Browse files
committed
feat: add dns and TLS info for AWS
Signed-off-by: ankitm123 <[email protected]>
1 parent b95acf6 commit 3d80f2e

File tree

1 file changed

+124
-0
lines changed
  • content/en/v3/admin/setup/ingress/tls_dns

1 file changed

+124
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: Amazon Web Services
3+
linktitle: Amazon
4+
type: docs
5+
description: Setting up TLS and DNS on Amazon Web Services
6+
weight: 100
7+
---
8+
9+
## Prerequisites
10+
11+
- cluster created using Jenkins X [AWS EKS Terraform getting started](/v3/admin/platform/eks/)
12+
- own a domain
13+
- latest Jenkins X CLI, Infrastructure and Cluster git repository updates [upgrade](/v3/guides/upgrade)
14+
15+
### Cloud Infrastructure
16+
17+
Add to your `values.auto.tfvars` the following:
18+
19+
```yaml
20+
apex_domain = "foo.io"
21+
```
22+
23+
By default, Jenkins X terraform module configure Route53 for the apex/parent domain.
24+
If you want Jenkins X not to manage the parent/apex domain, set
25+
26+
```yaml
27+
manage_apex_domain = false
28+
```
29+
30+
This is for the cases where you are managing the apex domain outside of AWS or outside of Jenkins X installation.
31+
32+
Most people prefer to use a subdomain for a specific installation rather than purchasing one domain per cluster. For example in a multi cluster setup you will probably want all using the same parent domain but two clusters using a different subdomain like development.foo.io, staging.foo.io leaving production using just the parent domain foo.io.
33+
34+
To use a subdomain for this cluster add the following configuration:
35+
36+
```yaml
37+
subdomain = "dev"
38+
```
39+
40+
We will now add details that will be passed to Jenkins X as requirements when booting the cluster.
41+
42+
Add these to `values.auto.tfvars`
43+
44+
```yaml
45+
production_letsencrypt = true
46+
tls_email = [email protected]
47+
```
48+
49+
Now apply these changes:
50+
51+
```bash
52+
git add values.auto.tfvars
53+
git commit -m 'feat: enable DNS cloud resources'
54+
git push
55+
```
56+
57+
You may want to set two environment variables here so that Terraform does not prompt for values
58+
59+
```bash
60+
export TF_VAR_jx_bot_username=
61+
export TF_VAR_jx_bot_token=
62+
```
63+
64+
now run
65+
66+
```bash
67+
terraform plan
68+
terraform apply
69+
```
70+
71+
If using a subdomain you will now see your managed zone in Route53.
72+
73+
**Once terraform has finished for now there is a manual trigger of the Jenkins X cluster repository required. This will not be needed in the future but for now please make a dummy commit on your cluster git repository and follow the boot job as in applies the updates to your cluster.**
74+
75+
To follow the jx boot installation using the instructions given in the terraform output, connect to the cluster and run:
76+
77+
```bash
78+
jx admin logs
79+
```
80+
81+
There is a timing issue with cert-manager and the admission controller so the first boot job may fail but second will run automatically and succeed.
82+
83+
It can take a short while for DNS to propagate so you may need to wait for 5 - 10 minutes. https://dnschecker.org/ is a useful way to check the status of DNS propagating.
84+
85+
To verify using the CLI run:
86+
87+
```bash
88+
kubectl get ingress -n jx
89+
```
90+
91+
and use the hook URL
92+
93+
```bash
94+
jx verify tls hook-jx.dev.foo.io --production=false --timeout 20m
95+
```
96+
97+
You should be able to verify the TLS certificate from Lets Encrypt in your browser (beware of browser caching if you don't see any changes)
98+
99+
![Working TLS](/images/v3/working_tls.png)
100+
101+
Once this is working you can switch any of the configuration using your cluster git repository and change the jx-requirements.yaml, e.g. toggling the cert-manager production service or editing the email address used:
102+
103+
```yaml
104+
ingress:
105+
domain: dev.foo.io
106+
externalDNS: true
107+
namespaceSubDomain: -jx.
108+
tls:
109+
110+
enabled: true
111+
production: true
112+
```
113+
114+
Git commit and push the change back to your remote git repository and follow the installation:
115+
116+
```bash
117+
jx admin logs
118+
```
119+
120+
You will now be issued a valid TLS certificate
121+
122+
```bash
123+
jx verify tls hook-jx.dev.foo.io --production=true --timeout 20m
124+
```

0 commit comments

Comments
 (0)