You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,15 @@
1
1
# Argo CD Katas
2
2
3
-
Welcome to the Argo CD Katas repository! This project is designed to help users learn and master Argo CD through practical exercises and challenges.
3
+
Welcome to the Argo CD Katas repository! This project is designed to help users learn and master Argo CD through practical exercises and challenges.
4
4
5
5
Whether you are a beginner looking to understand the basics or an experienced user seeking to deepen your knowledge, these katas will guide you through various aspects of using Argo CD in a real-world context.
6
6
7
7
## About Argo CD
8
8
9
-
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
9
+
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
10
10
It allows for Kubernetes resources to be managed using git repositories as the source of truth, making it easier to implement continuous deployment strategies in cloud-native environments.
11
11
For more info on ArgoCD itself, please visit [their website](https://argoproj.github.io/cd/).
12
12
13
-
14
13
## Exercise list in order
15
14
16
15
It is recommended to follow the exercises in the following order.
@@ -51,8 +50,7 @@ The repository is structured as follows:
1. Go to the Argo CD UI and verify that the bootstrap app is present. It should have an error saying that it cannot find the `apps` folder. This is expected.
71
70
72
-
## Step 2: Create Folder for All Apps, and add Jenkins App Manifest to it.
71
+
## Step 2: Create Folder for All Apps, and add Jenkins App Manifest to it
73
72
74
73
Save the current application manifest to your repository in a new folder named `apps`.
75
74
@@ -112,6 +111,7 @@ spec:
112
111
prune: true
113
112
selfHeal: true
114
113
```
114
+
115
115
</details>
116
116
117
117
- Add, commit and push the jenkins-app.yaml to the repository.
@@ -124,7 +124,6 @@ Now the jenkins app is connected with the bootstrap app.
124
124
- In the Argo CD UI, delete the jenkins app.
125
125
- What happens when you do that?
126
126
127
-
128
127
## Create the App Manifest for the Quotes Helm Chart
129
128
130
129
1. In the `apps` folder, create a file named `quotes-app.yaml` with the following content:
* Edit the secret and replace `<NUMBER>` with your number (student-X)
50
+
- Edit the secret and replace `<NUMBER>` with your number (student-X)
51
51
52
-
* Apply the secret
52
+
- Apply the secret
53
53
54
54
```bash
55
55
kubectl apply -f secret.yaml
56
56
57
57
```
58
58
59
-
* Check that the secret is there
59
+
- Check that the secret is there
60
60
61
61
```bash
62
62
@@ -118,23 +118,24 @@ spec:
118
118
prune: true
119
119
selfHeal: true
120
120
```
121
-
* take the contents of the file, and paste it into a file in your workstation. The file could be named ´appset.yaml´.
122
-
* edit the file and replace
123
-
* `<YOUR GITHUB USERNAME>` with your github username
124
-
* `<YOUR GIT REPO>` with your git repo
125
-
* `<YOUR NAMESPACE>` with your namespace
126
-
* `<NUMBER>` with your number (student-X)
127
-
* `<YOUR PREFIX>` The first part before `eficode.academy` as `gitops.eficode.academy`
128
121
129
-
* Apply the manifest
122
+
- take the contents of the file, and paste it into a file in your workstation. The file could be named ´appset.yaml´.
123
+
- edit the file and replace
124
+
- `<YOUR GITHUB USERNAME>` with your github username
125
+
- `<YOUR GIT REPO>`with your git repo
126
+
- `<YOUR NAMESPACE>`with your namespace
127
+
- `<NUMBER>`with your number (student-X)
128
+
- `<YOUR PREFIX>`The first part before `eficode.academy` as `gitops.eficode.academy`
129
+
130
+
- Apply the manifest
130
131
131
132
```bash
132
133
kubectl apply -f appset.yaml
133
134
```
134
135
135
-
* Make sure that it is there by listing the applicationsets: `k get applicationsets.argoproj.io -n argocd`.
136
+
-Make sure that it is there by listing the applicationsets: `k get applicationsets.argoproj.io -n argocd`.
136
137
137
-
* Look at the status on it by `k describe applicationsets.argoproj.io -n argocd pr-X` where X is your number.
138
+
-Look at the status on it by `k describe applicationsets.argoproj.io -n argocd pr-X` where X is your number.
138
139
139
140
Output should look like the following:
140
141
@@ -207,41 +208,39 @@ Status:
207
208
Events: <none>
208
209
```
209
210
210
-
211
211
#### Test with a pull request
212
212
213
-
* Create a pull request in your git repo. The change does not matter at this time, since we are not using the source code in the pull request. 💡 The name of your branch needs to have all lowercase characters, otherwise it will not work.
214
-
213
+
- Create a pull request in your git repo. The change does not matter at this time, since we are not using the source code in the pull request. 💡 The name of your branch needs to have all lowercase characters, otherwise it will not work.
215
214
216
-
* Remember to set the label `enhancement` on the pull request. The label does not exist, so create it in the Github UI.
215
+
-Remember to set the label `enhancement` on the pull request. The label does not exist, so create it in the Github UI.
217
216
218
-
* Check that an application has been created in ArgoCD
217
+
-Check that an application has been created in ArgoCD
219
218
220
219
```bash
221
220
kubectl get applications -n argocd
222
221
```
223
222
224
-
* Check that an application has been created in your namespace
223
+
-Check that an application has been created in your namespace
225
224
226
225
```bash
227
226
kubectl get pods -n <YOUR NAMESPACE>
228
227
```
229
228
230
-
* Get your ingress hostname
229
+
-Get your ingress hostname
231
230
232
231
```bash
233
232
kubectl get ingress -n <YOUR NAMESPACE>
234
233
```
235
234
236
-
* Access the application in your browser (remember to add https:// in front of the hostname)
235
+
-Access the application in your browser (remember to add https:// in front of the hostname)
237
236
238
237
You should see something like the follwing:
239
238
240
239

241
240
242
241
#### Close the pull request
243
242
244
-
* now close the pull request, and see that the application is deleted from ArgoCD
243
+
-now close the pull request, and see that the application is deleted from ArgoCD
245
244
246
245
```bash
247
246
kubectl get applications -n argocd
@@ -251,15 +250,15 @@ kubectl get applications -n argocd
Copy file name to clipboardExpand all lines: argocd-and-helm.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@
14
14
<summary>:bulb: Example</summary>
15
15
16
16
```yaml
17
-
18
17
apiVersion: argoproj.io/v1alpha1
19
18
kind: Application
20
19
metadata:
@@ -55,8 +54,8 @@ spec:
55
54
targetRevision: main
56
55
# name this source "values" for reference in the above source.
57
56
ref: values
58
-
59
57
```
58
+
60
59
</details>
61
60
62
61
## Exercise
@@ -70,15 +69,15 @@ In this exercise, you will:
70
69
- Write a multi-source deployment file.
71
70
- Change the values in the deployment file for automatic changes to the Jenkins app.
72
71
73
-
74
72
### Step by Step Instructions
75
73
76
74
<details>
77
75
<summary>More Details</summary>
78
76
79
77
### Tasks
80
78
81
-
**Deploying Jenkins with Bitnami Helm**
79
+
#### Deploying Jenkins with Bitnami Helm
80
+
82
81
- Look into the repository site (Click `settings`, and then `repositories`) to see that a repository called `bitnami` with the URL `https://charts.bitnami.com/bitnami` is there.
83
82
- Click on `Applications` in the navigation bar.
84
83
- Click on `New App` to create a new application.
@@ -87,7 +86,7 @@ In this exercise, you will:
87
86
- **Project Name**: `default`
88
87
- **Sync Policy**: `Automatic`
89
88
- **Repository Type**: `Helm`
90
-
-**Repository URL**: https://charts.bitnami.com/bitnami (or select from the dropdown)
89
+
- **Repository URL**: <https://charts.bitnami.com/bitnami> (or select from the dropdown)
91
90
- **Chart**: `Jenkins`
92
91
- **Version**: `12.4.0`
93
92
- **Cluster**: `in-cluster` or `https://kubernetes.default.svc`
@@ -106,7 +105,8 @@ Under the helm parameters, you can see that there are a lot of parameters that c
106
105
- Find the http nodeport by clicking on the `studentx-jenkins` service.
107
106
- Access the Jenkins site by going to `http://<node-ip>:<nodeport>`. You can find the external node IP by running `kubectl get nodes -o wide`.
108
107
109
-
**Customizing the Jenkins deployment with a values file**
108
+
#### Customizing the Jenkins deployment with a values file
109
+
110
110
We will change the values of the Jenkins deployment by using a values file. This is useful when you want to keep your values in a separate file and not in the ArgoCD UI.
111
111
112
112
- Look at the `values.yaml` file in the `jenkins` directory. You can see that the `service.type` is set to `NodePort`, and two other values.
@@ -131,6 +131,7 @@ sources:
131
131
targetRevision: main
132
132
ref: values
133
133
```
134
+
134
135
💡 Remember to add your own repo to the file as well, as seen on the bottom. Pay attention to formatting.
135
136
136
137
- Click save.
@@ -139,8 +140,6 @@ sources:
139
140
140
141
> :bulb: It might also be that the application has a hard time syncing the new pod. You can try to delete the replica set and see if it works. If not, you can delete the application and try again.
141
142
142
-
143
143
- Try to change something in the `values.yaml` file, push it up, and see that the application is synced automatically. If you lack inspiration, you can change the `service.type` to `ClusterIP` and see that the service is now a ClusterIP service.
0 commit comments