docs: clarify command context and workshop flow
This commit is contained in:
parent
a2c15d6464
commit
0212f4bd67
10 changed files with 377 additions and 249 deletions
69
README.md
69
README.md
|
|
@ -17,9 +17,10 @@ Je hebt drie dingen nodig op je laptop. Installeer ze de dag van tevoren — nie
|
||||||
|
|
||||||
Minimaal 12 GB vrij RAM en ~15 GB schijfruimte. Snelle check:
|
Minimaal 12 GB vrij RAM en ~15 GB schijfruimte. Snelle check:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
VBoxManage --version && vagrant --version && git --version
|
> ```bash
|
||||||
```
|
> VBoxManage --version && vagrant --version && git --version
|
||||||
|
> ```
|
||||||
|
|
||||||
Als één van de drie niets teruggeeft: installeren en opnieuw proberen.
|
Als één van de drie niets teruggeeft: installeren en opnieuw proberen.
|
||||||
|
|
||||||
|
|
@ -32,35 +33,41 @@ kun je zelf pushen zonder dat je toegang nodig hebt tot de originele repo.
|
||||||
|
|
||||||
1. Clone je fork op je host-machine.
|
1. Clone je fork op je host-machine.
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git clone https://github.com/JOUW_USERNAME/ops-demo.git && cd ops-demo
|
> ```bash
|
||||||
```
|
> git clone https://github.com/JOUW_USERNAME/ops-demo.git && cd ops-demo
|
||||||
|
> ```
|
||||||
|
|
||||||
2. Start de VM.
|
2. Start de VM.
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
vagrant up
|
> ```bash
|
||||||
```
|
> vagrant up
|
||||||
|
> ```
|
||||||
|
|
||||||
3. Run bootstrap vanaf je host (script voert bootstrap in de VM uit).
|
3. Run bootstrap vanaf je host (script voert bootstrap in de VM uit).
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
./scripts/host/bootstrap-from-host.sh
|
> ```bash
|
||||||
```
|
> ./scripts/host/bootstrap-from-host.sh
|
||||||
|
> ```
|
||||||
|
|
||||||
```powershell
|
> **HOST**
|
||||||
./scripts/host/bootstrap-from-host.ps1
|
> ```powershell
|
||||||
```
|
> ./scripts/host/bootstrap-from-host.ps1
|
||||||
|
> ```
|
||||||
|
|
||||||
4. Open ArgoCD UI via tunnel.
|
4. Open ArgoCD UI via tunnel.
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
./scripts/host/argocd-ui-tunnel.sh
|
> ```bash
|
||||||
```
|
> ./scripts/host/argocd-ui-tunnel.sh
|
||||||
|
> ```
|
||||||
|
|
||||||
```powershell
|
> **HOST**
|
||||||
./scripts/host/argocd-ui-tunnel.ps1
|
> ```powershell
|
||||||
```
|
> ./scripts/host/argocd-ui-tunnel.ps1
|
||||||
|
> ```
|
||||||
|
|
||||||
5. Open in je browser:
|
5. Open in je browser:
|
||||||
|
|
||||||
|
|
@ -111,8 +118,9 @@ Beginners: focus op 01–03 (~1u45m). De rest: probeer 01–05 te halen.
|
||||||
|
|
||||||
## Vastgelopen?
|
## Vastgelopen?
|
||||||
|
|
||||||
Elke solution branch is cumulatief — hij bevat alles t/m die oefening. Je kunt een PR openen van een solution branch
|
Elke solution branch is standalone per oefening (niet cumulatief).
|
||||||
naar jouw eigen branch om precies te zien wat er mist.
|
Je kunt een PR openen van een solution branch naar jouw eigen branch
|
||||||
|
om precies te zien wat er in die specifieke oefening mist.
|
||||||
|
|
||||||
| Branch | Bevat |
|
| Branch | Bevat |
|
||||||
|--------------------------------|-------------------------------------|
|
|--------------------------------|-------------------------------------|
|
||||||
|
|
@ -136,17 +144,18 @@ naar jouw eigen branch om precies te zien wat er mist.
|
||||||
| ArgoCD UI niet bereikbaar op `http://localhost:8080` | Start de tunnel opnieuw: `./scripts/host/argocd-ui-tunnel.sh` (of `.ps1` op Windows). |
|
| ArgoCD UI niet bereikbaar op `http://localhost:8080` | Start de tunnel opnieuw: `./scripts/host/argocd-ui-tunnel.sh` (of `.ps1` op Windows). |
|
||||||
| `kubectl` lijkt naar de verkeerde cluster te wijzen | Gebruik de host-scripts (`./scripts/host/bootstrap-from-host.sh` en `./scripts/host/argocd-ui-tunnel.sh`) of log in met `vagrant ssh` en werk vanuit `/vagrant`. De bootstrap heeft cluster-checks en stopt bij mismatch. |
|
| `kubectl` lijkt naar de verkeerde cluster te wijzen | Gebruik de host-scripts (`./scripts/host/bootstrap-from-host.sh` en `./scripts/host/argocd-ui-tunnel.sh`) of log in met `vagrant ssh` en werk vanuit `/vagrant`. De bootstrap heeft cluster-checks en stopt bij mismatch. |
|
||||||
| `root` app blijft `Unknown` of `OutOfSync` | Controleer of `apps/root.yaml` naar jouw fork verwijst en of je die commit/push hebt gedaan. Daarna in ArgoCD op **Refresh** klikken. |
|
| `root` app blijft `Unknown` of `OutOfSync` | Controleer of `apps/root.yaml` naar jouw fork verwijst en of je die commit/push hebt gedaan. Daarna in ArgoCD op **Refresh** klikken. |
|
||||||
| Tekton pipeline kan niet pushen naar GitHub | Controleer credentials opnieuw met `./scripts/vm/set-git-credentials.sh <github-user> <github-pat>` en gebruik een PAT met juiste repo-rechten. |
|
| Tekton pipeline kan niet pushen naar GitHub | Zet credentials opnieuw: in VM `./scripts/vm/set-git-credentials.sh <github-user> <github-pat>` (na `vagrant ssh` + `cd /vagrant`) of vanaf host `vagrant ssh -c "/vagrant/scripts/vm/set-git-credentials.sh <github-user> <github-pat>"`. Gebruik een PAT met juiste repo-rechten. |
|
||||||
| MetalLB/Ingress hostnames werken niet | Wacht tot networking apps `Healthy` zijn in ArgoCD en controleer of het host-only netwerk `192.168.56.x` actief is. |
|
| MetalLB/Ingress hostnames werken niet | Wacht tot networking apps `Healthy` zijn in ArgoCD en controleer of het host-only netwerk `192.168.56.x` actief is. |
|
||||||
|
|
||||||
Handige debug-commando's:
|
Handige debug-commando's:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
vagrant global-status --prune
|
> ```bash
|
||||||
vagrant status
|
> vagrant global-status --prune
|
||||||
kubectl get applications -n argocd
|
> vagrant status
|
||||||
kubectl get pods -A
|
> kubectl get applications -n argocd
|
||||||
```
|
> kubectl get pods -A
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je leert
|
## Wat je leert
|
||||||
|
|
||||||
- ArgoCD installeren via Helm
|
- ArgoCD installeren via Helm
|
||||||
|
|
@ -17,13 +18,12 @@
|
||||||
|
|
||||||
De VM draait en je bent ingelogd:
|
De VM draait en je bent ingelogd:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
vagrant ssh
|
> ```bash
|
||||||
cd /vagrant
|
> kubectl get nodes
|
||||||
kubectl get nodes
|
> # NAME STATUS ROLES AGE VERSION
|
||||||
# NAME STATUS ROLES AGE VERSION
|
> # ops-demo Ready control-plane,master ...
|
||||||
# ops-demo Ready control-plane,master ...
|
> ```
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -37,9 +37,21 @@ Ga in dat geval direct naar stap 3.
|
||||||
|
|
||||||
Wil je vanaf een blanke VM starten, voer dan bootstrap handmatig uit in de VM:
|
Wil je vanaf een blanke VM starten, voer dan bootstrap handmatig uit in de VM:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
./scripts/vm/bootstrap.sh
|
> ```bash
|
||||||
```
|
> ./scripts/vm/bootstrap.sh
|
||||||
|
> ```
|
||||||
|
|
||||||
|
> **HOST: Mac**
|
||||||
|
> ```bash
|
||||||
|
> ./scripts/host/bootstrap-from-host.sh
|
||||||
|
> ```
|
||||||
|
|
||||||
|
> **HOST: Windows**
|
||||||
|
> ```powershell
|
||||||
|
> ./scripts/host/bootstrap-from-host.ps1
|
||||||
|
> ```
|
||||||
|
|
||||||
|
|
||||||
Het script doet het volgende:
|
Het script doet het volgende:
|
||||||
|
|
||||||
|
|
@ -57,9 +69,10 @@ Aan het einde zie je het admin-wachtwoord. **Kopieer het nu.**
|
||||||
|
|
||||||
Op je laptop:
|
Op je laptop:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
./scripts/host/argocd-ui-tunnel.sh
|
> ```bash
|
||||||
```
|
> ./scripts/host/argocd-ui-tunnel.sh
|
||||||
|
> ```
|
||||||
|
|
||||||
Open **http://localhost:8080**.
|
Open **http://localhost:8080**.
|
||||||
Login: `admin` / het wachtwoord uit de output van het script.
|
Login: `admin` / het wachtwoord uit de output van het script.
|
||||||
|
|
@ -138,11 +151,12 @@ Gebruik hier dus `workshop` als projectwaarde.
|
||||||
Het bootstrap-script heeft `apps/root.yaml` aangemaakt met jouw fork-URL.
|
Het bootstrap-script heeft `apps/root.yaml` aangemaakt met jouw fork-URL.
|
||||||
Dit bestand moet in je repo staan zodat ArgoCD het kan synchroniseren:
|
Dit bestand moet in je repo staan zodat ArgoCD het kan synchroniseren:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/root.yaml
|
> ```bash
|
||||||
git commit -m "feat: add root app-of-apps"
|
> git add apps/root.yaml
|
||||||
git push
|
> git commit -m "feat: add root app-of-apps"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -155,9 +169,10 @@ In de ArgoCD UI zie je nu de **root** application verschijnen. Klik erop.
|
||||||
|
|
||||||
Controleer ook via de CLI:
|
Controleer ook via de CLI:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get applications -n argocd
|
> ```bash
|
||||||
```
|
> kubectl get applications -n argocd
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je leert
|
## Wat je leert
|
||||||
|
|
||||||
- Hoe je een ArgoCD Application toevoegt door één bestand te committen
|
- Hoe je een ArgoCD Application toevoegt door één bestand te committen
|
||||||
|
|
@ -136,11 +137,12 @@ Vervang `JOUW_FORK_URL` door jouw fork-URL.
|
||||||
|
|
||||||
### 3. Committen en pushen
|
### 3. Committen en pushen
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/apps/podinfo.yaml manifests/apps/podinfo/
|
> ```bash
|
||||||
git commit -m "feat: deploy podinfo via GitOps"
|
> git add apps/apps/podinfo.yaml manifests/apps/podinfo/
|
||||||
git push
|
> git commit -m "feat: deploy podinfo via GitOps"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Dit is de enige actie die nodig is om de applicatie te deployen.
|
Dit is de enige actie die nodig is om de applicatie te deployen.
|
||||||
|
|
||||||
|
|
@ -151,32 +153,36 @@ Dit is de enige actie die nodig is om de applicatie te deployen.
|
||||||
|
|
||||||
### 4. Wachten tot het Synced is
|
### 4. Wachten tot het Synced is
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get application podinfo -n argocd -w
|
> ```bash
|
||||||
```
|
> kubectl get application podinfo -n argocd -w
|
||||||
|
> ```
|
||||||
|
|
||||||
Wacht tot je `Synced` en `Healthy` ziet. Dan:
|
Wacht tot je `Synced` en `Healthy` ziet. Dan:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get pods -n podinfo
|
> ```bash
|
||||||
# NAME READY STATUS RESTARTS AGE
|
> kubectl get pods -n podinfo
|
||||||
# podinfo-xxx-xxx 1/1 Running 0 30s
|
> # NAME READY STATUS RESTARTS AGE
|
||||||
```
|
> # podinfo-xxx-xxx 1/1 Running 0 30s
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 5. Controleer dat de app werkt
|
### 5. Controleer dat de app werkt
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl port-forward svc/podinfo -n podinfo 9898:80
|
> ```bash
|
||||||
```
|
> kubectl port-forward svc/podinfo -n podinfo 9898:80
|
||||||
|
> ```
|
||||||
|
|
||||||
In een ander terminal (of via curl):
|
In een ander terminal (of via curl):
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
curl http://localhost:9898
|
> ```bash
|
||||||
# {"hostname":"podinfo-xxx","version":"6.6.2", ...}
|
> curl http://localhost:9898
|
||||||
```
|
> # {"hostname":"podinfo-xxx","version":"6.6.2", ...}
|
||||||
|
> ```
|
||||||
|
|
||||||
Versie `6.6.2` — dat klopt met de image-tag in `deployment.yaml`.
|
Versie `6.6.2` — dat klopt met de image-tag in `deployment.yaml`.
|
||||||
|
|
||||||
|
|
@ -200,11 +206,12 @@ value: "#2ecc71"
|
||||||
|
|
||||||
Commit en push:
|
Commit en push:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add manifests/apps/podinfo/deployment.yaml
|
> ```bash
|
||||||
git commit -m "chore: verander podinfo UI-kleur"
|
> git add manifests/apps/podinfo/deployment.yaml
|
||||||
git push
|
> git commit -m "chore: verander podinfo UI-kleur"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Binnen ~3 minuten (standaard poll-interval van ArgoCD) herstart de pod
|
Binnen ~3 minuten (standaard poll-interval van ArgoCD) herstart de pod
|
||||||
en zie je de nieuwe kleur. Je kunt ook op **Refresh** klikken in de UI
|
en zie je de nieuwe kleur. Je kunt ook op **Refresh** klikken in de UI
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ port-forward.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je leert
|
## Wat je leert
|
||||||
|
|
||||||
- Waarom je MetalLB nodig hebt op een bare-metal of lokaal Kubernetes-cluster
|
- Waarom je MetalLB nodig hebt op een bare-metal of lokaal Kubernetes-cluster
|
||||||
|
|
@ -39,6 +40,17 @@ Maak de volgende bestanden aan:
|
||||||
|
|
||||||
**`manifests/networking/metallb/values.yaml`**
|
**`manifests/networking/metallb/values.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Configureert de MetalLB speaker pod.
|
||||||
|
- Met deze `toleration` mag de speaker op de control-plane node draaien.
|
||||||
|
- Dat is nodig in deze workshop, omdat je VM meestal maar 1 node heeft.
|
||||||
|
|
||||||
|
Termen uitgelegd:
|
||||||
|
- `speaker`: de MetalLB component die op nodes draait en op het netwerk "antwoordt" voor een toegewezen
|
||||||
|
LoadBalancer-IP (in L2-modus via ARP).
|
||||||
|
- `tolerations`: een Kubernetes-mechanisme waarmee een pod tóch op een node mag landen die een `taint` heeft.
|
||||||
|
Control-plane nodes zijn vaak getaint met `NoSchedule`; zonder toleration wordt de speaker daar niet ingepland.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
speaker:
|
speaker:
|
||||||
tolerations:
|
tolerations:
|
||||||
|
|
@ -49,6 +61,11 @@ speaker:
|
||||||
|
|
||||||
**`manifests/networking/metallb/metallb-config.yaml`**
|
**`manifests/networking/metallb/metallb-config.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- `IPAddressPool` bepaalt uit welke range MetalLB IP's mag uitdelen.
|
||||||
|
- `L2Advertisement` maakt die pool zichtbaar op je host-only netwerk via ARP.
|
||||||
|
- Daardoor kan je laptop services op dat IP direct bereiken.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: metallb.io/v1beta1
|
apiVersion: metallb.io/v1beta1
|
||||||
kind: IPAddressPool
|
kind: IPAddressPool
|
||||||
|
|
@ -71,6 +88,12 @@ spec:
|
||||||
|
|
||||||
**`apps/networking/metallb.yaml`**
|
**`apps/networking/metallb.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Installeert MetalLB via ArgoCD als aparte `Application`.
|
||||||
|
- De chart komt van de upstream Helm repo; jouw repo levert de values via `$values/...`.
|
||||||
|
- `sync-wave: "1"` zorgt dat MetalLB eerst klaar is.
|
||||||
|
- `ignoreDifferences` voorkomt bekende CRD `caBundle` drift door dynamische webhook certs.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
|
|
@ -110,6 +133,11 @@ spec:
|
||||||
|
|
||||||
**`apps/networking/metallb-config.yaml`**
|
**`apps/networking/metallb-config.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Past jouw IP-pool/L2-config toe als losse ArgoCD `Application`.
|
||||||
|
- Die split houdt "installatie" en "runtime-config" van MetalLB uit elkaar.
|
||||||
|
- `sync-wave: "2"` laat dit pas lopen nadat MetalLB zelf staat.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
|
|
@ -141,6 +169,11 @@ spec:
|
||||||
|
|
||||||
**`manifests/networking/ingress-nginx/values.yaml`**
|
**`manifests/networking/ingress-nginx/values.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Zet ingress-nginx neer met een `LoadBalancer` service.
|
||||||
|
- Dat service-IP wordt vast op `192.168.56.200` gezet.
|
||||||
|
- Zo kun je stabiele hostnames gebruiken met `nip.io`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
controller:
|
controller:
|
||||||
ingressClassResource:
|
ingressClassResource:
|
||||||
|
|
@ -157,6 +190,11 @@ controller:
|
||||||
|
|
||||||
**`apps/networking/ingress-nginx.yaml`**
|
**`apps/networking/ingress-nginx.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Installeert ingress-nginx via ArgoCD.
|
||||||
|
- Ook hier: chart upstream, values uit jouw repo.
|
||||||
|
- `sync-wave: "3"` laat ingress pas starten nadat MetalLB + config klaar zijn.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
|
|
@ -192,26 +230,29 @@ spec:
|
||||||
|
|
||||||
### 3. Alles committen en pushen
|
### 3. Alles committen en pushen
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/networking/ manifests/networking/
|
> ```bash
|
||||||
git commit -m "feat: MetalLB + Ingress-Nginx"
|
> git add apps/networking/ manifests/networking/
|
||||||
git push
|
> git commit -m "feat: MetalLB + Ingress-Nginx"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Wacht tot beide applications Synced zijn, en controleer dan:
|
Wacht tot beide applications Synced zijn, en controleer dan:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get svc -n ingress-nginx
|
> ```bash
|
||||||
# NAME TYPE EXTERNAL-IP PORT(S)
|
> kubectl get svc -n ingress-nginx
|
||||||
# ingress-nginx-controller LoadBalancer 192.168.56.200 80:xxx,443:xxx
|
> # NAME TYPE EXTERNAL-IP PORT(S)
|
||||||
```
|
> # ingress-nginx-controller LoadBalancer 192.168.56.200 80:xxx,443:xxx
|
||||||
|
> ```
|
||||||
|
|
||||||
Vanuit je laptop:
|
Vanuit je laptop:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
curl http://192.168.56.200
|
> ```bash
|
||||||
# 404 van Nginx — klopt, nog geen Ingress-regel
|
> curl http://192.168.56.200
|
||||||
```
|
> # 404 van Nginx — klopt, nog geen Ingress-regel
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -219,6 +260,11 @@ curl http://192.168.56.200
|
||||||
|
|
||||||
**`manifests/apps/podinfo/ingress.yaml`**
|
**`manifests/apps/podinfo/ingress.yaml`**
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Definieert de HTTP-route voor podinfo.
|
||||||
|
- `ingressClassName: nginx` bindt deze Ingress aan ingress-nginx.
|
||||||
|
- De hostnaam met `nip.io` wijst naar jouw MetalLB IP.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
|
|
@ -240,11 +286,12 @@ spec:
|
||||||
name: http
|
name: http
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add manifests/apps/podinfo/ingress.yaml
|
> ```bash
|
||||||
git commit -m "feat: voeg podinfo Ingress toe"
|
> git add manifests/apps/podinfo/ingress.yaml
|
||||||
git push
|
> git commit -m "feat: voeg podinfo Ingress toe"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Open vanuit je laptop: **http://podinfo.192.168.56.200.nip.io**
|
Open vanuit je laptop: **http://podinfo.192.168.56.200.nip.io**
|
||||||
|
|
||||||
|
|
@ -254,6 +301,11 @@ Open vanuit je laptop: **http://podinfo.192.168.56.200.nip.io**
|
||||||
|
|
||||||
Pas `manifests/argocd/values.yaml` aan. Zoek het uitgecommentarieerde ingress-blok en verwijder de `#`-tekens:
|
Pas `manifests/argocd/values.yaml` aan. Zoek het uitgecommentarieerde ingress-blok en verwijder de `#`-tekens:
|
||||||
|
|
||||||
|
Wat dit doet:
|
||||||
|
- Schakelt ingress in voor de ArgoCD server zelf.
|
||||||
|
- Daarna kun je ArgoCD via browser-URL gebruiken in plaats van port-forward.
|
||||||
|
- De `hostname` moet matchen met het IP dat ingress-nginx exposeert.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
@ -264,11 +316,12 @@ Pas `manifests/argocd/values.yaml` aan. Zoek het uitgecommentarieerde ingress-bl
|
||||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add manifests/argocd/values.yaml
|
> ```bash
|
||||||
git commit -m "feat: schakel ArgoCD ingress in"
|
> git add manifests/argocd/values.yaml
|
||||||
git push
|
> git commit -m "feat: schakel ArgoCD ingress in"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
ArgoCD detecteert de wijziging, past zijn eigen Helm-release aan en maakt de Ingress aan.
|
ArgoCD detecteert de wijziging, past zijn eigen Helm-release aan en maakt de Ingress aan.
|
||||||
Open: **http://argocd.192.168.56.200.nip.io**
|
Open: **http://argocd.192.168.56.200.nip.io**
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ volledige GitOps CI/CD-loop.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je leert
|
## Wat je leert
|
||||||
|
|
||||||
- Tekton-concepten: Task, Pipeline, PipelineRun, Workspace
|
- Tekton-concepten: Task, Pipeline, PipelineRun, Workspace
|
||||||
|
|
@ -86,19 +87,21 @@ spec:
|
||||||
- ServerSideApply=true
|
- ServerSideApply=true
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/ci/tekton.yaml manifests/ci/tekton/
|
> ```bash
|
||||||
git commit -m "feat: installeer Tekton via ArgoCD"
|
> git add apps/ci/tekton.yaml manifests/ci/tekton/
|
||||||
git push
|
> git commit -m "feat: installeer Tekton via ArgoCD"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Wacht tot Tekton draait (~3–5 minuten):
|
Wacht tot Tekton draait (~3–5 minuten):
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get pods -n tekton-pipelines
|
> ```bash
|
||||||
# tekton-pipelines-controller-xxx 1/1 Running
|
> kubectl get pods -n tekton-pipelines
|
||||||
# tekton-pipelines-webhook-xxx 1/1 Running
|
> # tekton-pipelines-controller-xxx 1/1 Running
|
||||||
```
|
> # tekton-pipelines-webhook-xxx 1/1 Running
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -117,9 +120,10 @@ metadata:
|
||||||
**`manifests/ci/pipeline/pipeline.yaml`** — zie de solution branch voor de volledige inhoud, of kopieer uit
|
**`manifests/ci/pipeline/pipeline.yaml`** — zie de solution branch voor de volledige inhoud, of kopieer uit
|
||||||
`reference-solution`:
|
`reference-solution`:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git show origin/solution/04-tekton-pipeline:manifests/ci/pipeline/pipeline.yaml
|
> ```bash
|
||||||
```
|
> git show origin/solution/04-tekton-pipeline:manifests/ci/pipeline/pipeline.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
**`manifests/ci/pipeline/pipelinerun.yaml`**
|
**`manifests/ci/pipeline/pipelinerun.yaml`**
|
||||||
|
|
||||||
|
|
@ -185,11 +189,12 @@ spec:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/ci/pipeline.yaml manifests/ci/pipeline/
|
> ```bash
|
||||||
git commit -m "feat: voeg pipeline-resources toe"
|
> git add apps/ci/pipeline.yaml manifests/ci/pipeline/
|
||||||
git push
|
> git commit -m "feat: voeg pipeline-resources toe"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -255,11 +260,12 @@ spec:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/ci/tekton-dashboard.yaml manifests/ci/dashboard/
|
> ```bash
|
||||||
git commit -m "feat: voeg Tekton Dashboard met ingress toe"
|
> git add apps/ci/tekton-dashboard.yaml manifests/ci/dashboard/
|
||||||
git push
|
> git commit -m "feat: voeg Tekton Dashboard met ingress toe"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Open daarna: **http://tekton.192.168.56.200.nip.io**
|
Open daarna: **http://tekton.192.168.56.200.nip.io**
|
||||||
|
|
||||||
|
|
@ -271,13 +277,14 @@ Dit is een verplichte stap vóór je de PipelineRun triggert.
|
||||||
Zonder `git-credentials` secret faalt de `clone` task direct.
|
Zonder `git-credentials` secret faalt de `clone` task direct.
|
||||||
|
|
||||||
De pipeline moet kunnen pushen naar jouw fork.
|
De pipeline moet kunnen pushen naar jouw fork.
|
||||||
Maak een GitHub PAT aan met `repo`-scope en voer dan uit:
|
Maak een GitHub PAT aan met `repo`-scope en voer daarna een van deze opties uit:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
./scripts/vm/set-git-credentials.sh <jouw-github-gebruikersnaam> <jouw-pat>
|
> ```bash
|
||||||
```
|
> /vagrant/scripts/vm/set-git-credentials.sh <jouw-github-gebruikersnaam> <jouw-pat>
|
||||||
|
> ```
|
||||||
|
|
||||||
Dit maakt een Kubernetes Secret aan in de cluster — **het PAT komt niet in Git**.
|
Dit maakt een Kubernetes Secret aan in het cluster — **het PAT komt niet in Git**.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -286,21 +293,24 @@ Dit maakt een Kubernetes Secret aan in de cluster — **het PAT komt niet in Git
|
||||||
Controleer eerst dat stap 3 gelukt is.
|
Controleer eerst dat stap 3 gelukt is.
|
||||||
Pas daarna de PipelineRun starten:
|
Pas daarna de PipelineRun starten:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
> ```bash
|
||||||
```
|
> kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
Volg de voortgang:
|
Volg de voortgang:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get pipelinerun -n tekton-pipelines -w
|
> ```bash
|
||||||
```
|
> kubectl get pipelinerun -n tekton-pipelines -w
|
||||||
|
> ```
|
||||||
|
|
||||||
Of per pod:
|
Of per pod:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get pods -n tekton-pipelines -w
|
> ```bash
|
||||||
```
|
> kubectl get pods -n tekton-pipelines -w
|
||||||
|
> ```
|
||||||
|
|
||||||
De PipelineRun duurt ~2–3 minuten.
|
De PipelineRun duurt ~2–3 minuten.
|
||||||
|
|
||||||
|
|
@ -308,11 +318,12 @@ De PipelineRun duurt ~2–3 minuten.
|
||||||
|
|
||||||
### 6. Controleer de commit
|
### 6. Controleer de commit
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git fetch origin
|
> ```bash
|
||||||
git log origin/main --oneline -3
|
> git fetch origin
|
||||||
# Je ziet: chore(pipeline): bump podinfo to 6.7.0
|
> git log origin/main --oneline -3
|
||||||
```
|
> # Je ziet: chore(pipeline): bump podinfo to 6.7.0
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -320,9 +331,10 @@ git log origin/main --oneline -3
|
||||||
|
|
||||||
Klik **Refresh** op de **podinfo** application in ArgoCD, of wacht op het automatische poll-interval.
|
Klik **Refresh** op de **podinfo** application in ArgoCD, of wacht op het automatische poll-interval.
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl rollout status deployment/podinfo -n podinfo
|
> ```bash
|
||||||
```
|
> kubectl rollout status deployment/podinfo -n podinfo
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -330,10 +342,11 @@ kubectl rollout status deployment/podinfo -n podinfo
|
||||||
|
|
||||||
Open **http://podinfo.192.168.56.200.nip.io** — je ziet nu versie **6.7.0**.
|
Open **http://podinfo.192.168.56.200.nip.io** — je ziet nu versie **6.7.0**.
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
curl http://podinfo.192.168.56.200.nip.io | jq .version
|
> ```bash
|
||||||
# "6.7.0"
|
> curl http://podinfo.192.168.56.200.nip.io | jq .version
|
||||||
```
|
> # "6.7.0"
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -341,10 +354,11 @@ curl http://podinfo.192.168.56.200.nip.io | jq .version
|
||||||
|
|
||||||
De naam van een PipelineRun moet uniek zijn:
|
De naam van een PipelineRun moet uniek zijn:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl delete pipelinerun bump-podinfo-to-670 -n tekton-pipelines
|
> ```bash
|
||||||
kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
> kubectl delete pipelinerun bump-podinfo-to-670 -n tekton-pipelines
|
||||||
```
|
> kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -353,7 +367,7 @@ kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
||||||
| Symptoom | Oplossing |
|
| Symptoom | Oplossing |
|
||||||
|-----------------------------------------|--------------------------------------------------------------------------------------------------------|
|
|-----------------------------------------|--------------------------------------------------------------------------------------------------------|
|
||||||
| PipelineRun blijft "Running" | `kubectl describe pipelinerun -n tekton-pipelines bump-podinfo-to-670` |
|
| PipelineRun blijft "Running" | `kubectl describe pipelinerun -n tekton-pipelines bump-podinfo-to-670` |
|
||||||
| Secret `git-credentials` niet gevonden | Voer `./scripts/vm/set-git-credentials.sh` uit |
|
| Secret `git-credentials` niet gevonden | Run in VM: `./scripts/vm/set-git-credentials.sh ...` (na `vagrant ssh` + `cd /vagrant`) of vanaf host: `vagrant ssh -c \"/vagrant/scripts/vm/set-git-credentials.sh ...\"` |
|
||||||
| Push mislukt: 403 Forbidden | PAT heeft onvoldoende rechten — `repo`-scope vereist |
|
| Push mislukt: 403 Forbidden | PAT heeft onvoldoende rechten — `repo`-scope vereist |
|
||||||
| ArgoCD synchroniseert niet | Klik **Refresh** in de UI |
|
| ArgoCD synchroniseert niet | Klik **Refresh** in de UI |
|
||||||
| `root` blijft OutOfSync op app `tekton` | Verwijder de lege `kustomize: {}` uit `apps/ci/tekton.yaml` (Argo normaliseert deze weg in live state) |
|
| `root` blijft OutOfSync op app `tekton` | Verwijder de lege `kustomize: {}` uit `apps/ci/tekton.yaml` (Argo normaliseert deze weg in live state) |
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je gebouwd hebt
|
## Wat je gebouwd hebt
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -53,28 +54,31 @@ Tekton PipelineRun
|
||||||
|
|
||||||
Als de pipeline podinfo al naar `6.7.0` heeft gebracht, probeer dan een handmatige downgrade:
|
Als de pipeline podinfo al naar `6.7.0` heeft gebracht, probeer dan een handmatige downgrade:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
# Pas de image-tag terug aan naar 6.6.2
|
> ```bash
|
||||||
vim manifests/apps/podinfo/deployment.yaml
|
> # Pas de image-tag terug aan naar 6.6.2
|
||||||
|
> vim manifests/apps/podinfo/deployment.yaml
|
||||||
git add manifests/apps/podinfo/deployment.yaml
|
>
|
||||||
git commit -m "chore: downgrade podinfo naar 6.6.2"
|
> git add manifests/apps/podinfo/deployment.yaml
|
||||||
git push
|
> git commit -m "chore: downgrade podinfo naar 6.6.2"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
Kijk hoe ArgoCD synchroniseert, en verifieer:
|
Kijk hoe ArgoCD synchroniseert, en verifieer:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
curl http://podinfo.192.168.56.200.nip.io | jq .version
|
> ```bash
|
||||||
# "6.6.2"
|
> curl http://podinfo.192.168.56.200.nip.io | jq .version
|
||||||
```
|
> # "6.6.2"
|
||||||
|
> ```
|
||||||
|
|
||||||
En upgrade dan weer via de pipeline:
|
En upgrade dan weer via de pipeline:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl delete pipelinerun bump-podinfo-to-670 -n tekton-pipelines
|
> ```bash
|
||||||
kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
> kubectl delete pipelinerun bump-podinfo-to-670 -n tekton-pipelines
|
||||||
```
|
> kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -82,10 +86,11 @@ kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml
|
||||||
|
|
||||||
ArgoCD heeft `selfHeal: true` — hij draait handmatige cluster-wijzigingen automatisch terug.
|
ArgoCD heeft `selfHeal: true` — hij draait handmatige cluster-wijzigingen automatisch terug.
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
# Wijzig de image-tag direct in de cluster (buiten Git om)
|
> ```bash
|
||||||
kubectl set image deployment/podinfo podinfo=ghcr.io/stefanprodan/podinfo:6.5.0 -n podinfo
|
> # Wijzig de image-tag direct in de cluster (buiten Git om)
|
||||||
```
|
> kubectl set image deployment/podinfo podinfo=ghcr.io/stefanprodan/podinfo:6.5.0 -n podinfo
|
||||||
|
> ```
|
||||||
|
|
||||||
Kijk in de ArgoCD UI — binnen seconden gaat de podinfo-app op **OutOfSync**, en daarna zet ArgoCD hem terug naar wat er
|
Kijk in de ArgoCD UI — binnen seconden gaat de podinfo-app op **OutOfSync**, en daarna zet ArgoCD hem terug naar wat er
|
||||||
in Git staat.
|
in Git staat.
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
## Wat je leert
|
## Wat je leert
|
||||||
|
|
||||||
- Hoe je een complexe multi-component stack (kube-prometheus-stack) puur via GitOps deployet
|
- Hoe je een complexe multi-component stack (kube-prometheus-stack) puur via GitOps deployet
|
||||||
|
|
@ -109,11 +110,12 @@ spec:
|
||||||
- ServerSideApply=true
|
- ServerSideApply=true
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git add apps/monitoring/ manifests/monitoring/
|
> ```bash
|
||||||
git commit -m "feat: Prometheus + Grafana via kube-prometheus-stack"
|
> git add apps/monitoring/ manifests/monitoring/
|
||||||
git push
|
> git commit -m "feat: Prometheus + Grafana via kube-prometheus-stack"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
De initiële sync duurt 5–8 minuten — de chart is groot en installeert veel CRDs.
|
De initiële sync duurt 5–8 minuten — de chart is groot en installeert veel CRDs.
|
||||||
|
|
||||||
|
|
@ -121,17 +123,19 @@ De initiële sync duurt 5–8 minuten — de chart is groot en installeert veel
|
||||||
|
|
||||||
### 2. Wachten tot de stack klaar is
|
### 2. Wachten tot de stack klaar is
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get pods -n monitoring -w
|
> ```bash
|
||||||
```
|
> kubectl get pods -n monitoring -w
|
||||||
|
> ```
|
||||||
|
|
||||||
Zodra alles Running is:
|
Zodra alles Running is:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get ingress -n monitoring
|
> ```bash
|
||||||
# NAME HOSTS ADDRESS
|
> kubectl get ingress -n monitoring
|
||||||
# grafana grafana.192.168.56.200.nip.io 192.168.56.200
|
> # NAME HOSTS ADDRESS
|
||||||
```
|
> # grafana grafana.192.168.56.200.nip.io 192.168.56.200
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -159,10 +163,11 @@ Interessant voor deze workshop:
|
||||||
|
|
||||||
### 5. Load genereren op podinfo
|
### 5. Load genereren op podinfo
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
# In de VM
|
> ```bash
|
||||||
while true; do curl -s http://podinfo.192.168.56.200.nip.io > /dev/null; sleep 0.2; done
|
> # In de VM
|
||||||
```
|
> while true; do curl -s http://podinfo.192.168.56.200.nip.io > /dev/null; sleep 0.2; done
|
||||||
|
> ```
|
||||||
|
|
||||||
Open in Grafana: **Kubernetes / Compute Resources / Namespace (Pods)** → namespace `podinfo`.
|
Open in Grafana: **Kubernetes / Compute Resources / Namespace (Pods)** → namespace `podinfo`.
|
||||||
Je ziet het CPU-gebruik stijgen.
|
Je ziet het CPU-gebruik stijgen.
|
||||||
|
|
@ -173,15 +178,16 @@ Je ziet het CPU-gebruik stijgen.
|
||||||
|
|
||||||
Probeer het Grafana-wachtwoord aan te passen:
|
Probeer het Grafana-wachtwoord aan te passen:
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
vim manifests/monitoring/values.yaml
|
> ```bash
|
||||||
# Verander: adminPassword: workshop123
|
> vim manifests/monitoring/values.yaml
|
||||||
# Naar: adminPassword: nieuwwachtwoord
|
> # Verander: adminPassword: workshop123
|
||||||
|
> # Naar: adminPassword: nieuwwachtwoord
|
||||||
git add manifests/monitoring/values.yaml
|
>
|
||||||
git commit -m "chore: pas Grafana-wachtwoord aan"
|
> git add manifests/monitoring/values.yaml
|
||||||
git push
|
> git commit -m "chore: pas Grafana-wachtwoord aan"
|
||||||
```
|
> git push
|
||||||
|
> ```
|
||||||
|
|
||||||
ArgoCD synchroniseert de Helm-release en Grafana herstart. Log daarna in met het nieuwe wachtwoord.
|
ArgoCD synchroniseert de Helm-release en Grafana herstart. Log daarna in met het nieuwe wachtwoord.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,12 @@
|
||||||
|
|
||||||
### De oude manier: imperatieve deploys
|
### De oude manier: imperatieve deploys
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
# Iemand draait dit op vrijdagmiddag
|
> ```bash
|
||||||
kubectl set image deployment/api api=company/api:v2.3.1-hotfix
|
> # Iemand draait dit op vrijdagmiddag
|
||||||
# Geen review. Geen audit trail. Niemand weet wie dit om 16:47 deed.
|
> kubectl set image deployment/api api=company/api:v2.3.1-hotfix
|
||||||
```
|
> # Geen review. Geen audit trail. Niemand weet wie dit om 16:47 deed.
|
||||||
|
> ```
|
||||||
|
|
||||||
### De GitOps manier
|
### De GitOps manier
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,10 @@ een reboot.
|
||||||
|
|
||||||
Snelle check — alle drie moeten een versie tonen:
|
Snelle check — alle drie moeten een versie tonen:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
VBoxManage --version && vagrant --version && git --version
|
> ```bash
|
||||||
```
|
> VBoxManage --version && vagrant --version && git --version
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -31,18 +32,20 @@ VBoxManage --version && vagrant --version && git --version
|
||||||
|
|
||||||
Fork de repo naar je eigen GitHub-account via https://github.com/paulharkink/ops-demo → **Fork**.
|
Fork de repo naar je eigen GitHub-account via https://github.com/paulharkink/ops-demo → **Fork**.
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
git clone https://github.com/JOUW_USERNAME/ops-demo.git
|
> ```bash
|
||||||
cd ops-demo
|
> git clone https://github.com/JOUW_USERNAME/ops-demo.git
|
||||||
```
|
> cd ops-demo
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Stap 2 — VM opstarten
|
## Stap 2 — VM opstarten
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
vagrant up
|
> ```bash
|
||||||
```
|
> vagrant up
|
||||||
|
> ```
|
||||||
|
|
||||||
De eerste keer duurt dit 10–15 minuten. Vagrant downloadt de Ubuntu 24.04 box, installeert k3s, Helm en yq, en haalt de
|
De eerste keer duurt dit 10–15 minuten. Vagrant downloadt de Ubuntu 24.04 box, installeert k3s, Helm en yq, en haalt de
|
||||||
workshop-images alvast op. Daarna start de VM in een paar seconden.
|
workshop-images alvast op. Daarna start de VM in een paar seconden.
|
||||||
|
|
@ -59,10 +62,11 @@ Aan het einde zie je:
|
||||||
|
|
||||||
## Stap 3 — Inloggen
|
## Stap 3 — Inloggen
|
||||||
|
|
||||||
```bash
|
> **HOST**
|
||||||
vagrant ssh
|
> ```bash
|
||||||
cd /vagrant
|
> vagrant ssh
|
||||||
```
|
> cd /vagrant
|
||||||
|
> ```
|
||||||
|
|
||||||
Alle workshop-commando's voer je vanaf hier uit, tenzij anders aangegeven.
|
Alle workshop-commando's voer je vanaf hier uit, tenzij anders aangegeven.
|
||||||
|
|
||||||
|
|
@ -70,17 +74,18 @@ Alle workshop-commando's voer je vanaf hier uit, tenzij anders aangegeven.
|
||||||
|
|
||||||
## Stap 4 — Controleer de setup
|
## Stap 4 — Controleer de setup
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
kubectl get nodes
|
> ```bash
|
||||||
# NAME STATUS ROLES AGE VERSION
|
> kubectl get nodes
|
||||||
# ops-demo Ready control-plane,master Xm v1.31.x+k3s1
|
> # NAME STATUS ROLES AGE VERSION
|
||||||
|
> # ops-demo Ready control-plane,master Xm v1.31.x+k3s1
|
||||||
helm version
|
>
|
||||||
# version.BuildInfo{Version:"v3.16.x", ...}
|
> helm version
|
||||||
|
> # version.BuildInfo{Version:"v3.16.x", ...}
|
||||||
ls /vagrant
|
>
|
||||||
# Vagrantfile README.md apps/ docs/ manifests/ scripts/
|
> ls /vagrant
|
||||||
```
|
> # Vagrantfile README.md apps/ docs/ manifests/ scripts/
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -88,23 +93,26 @@ ls /vagrant
|
||||||
|
|
||||||
Vanuit je laptop (niet de VM):
|
Vanuit je laptop (niet de VM):
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
ping 192.168.56.10
|
> ```bash
|
||||||
```
|
> ping 192.168.56.10
|
||||||
|
> ```
|
||||||
|
|
||||||
Werkt dit niet, controleer dan of de VirtualBox host-only adapter bestaat:
|
Werkt dit niet, controleer dan of de VirtualBox host-only adapter bestaat:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
VBoxManage list hostonlyifs
|
> ```bash
|
||||||
# Verwacht: vboxnet0 met IP 192.168.56.1
|
> VBoxManage list hostonlyifs
|
||||||
```
|
> # Verwacht: vboxnet0 met IP 192.168.56.1
|
||||||
|
> ```
|
||||||
|
|
||||||
Bestaat hij niet:
|
Bestaat hij niet:
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
VBoxManage hostonlyif create
|
> ```bash
|
||||||
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0
|
> VBoxManage hostonlyif create
|
||||||
```
|
> VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0
|
||||||
|
> ```
|
||||||
|
|
||||||
Dan `vagrant up` opnieuw.
|
Dan `vagrant up` opnieuw.
|
||||||
|
|
||||||
|
|
@ -112,13 +120,14 @@ Dan `vagrant up` opnieuw.
|
||||||
|
|
||||||
## Handige Vagrant-commando's
|
## Handige Vagrant-commando's
|
||||||
|
|
||||||
```bash
|
> **VM**
|
||||||
vagrant halt # afsluiten
|
> ```bash
|
||||||
vagrant up # opstarten
|
> vagrant halt # afsluiten
|
||||||
vagrant suspend # pauzeren
|
> vagrant up # opstarten
|
||||||
vagrant resume # hervatten
|
> vagrant suspend # pauzeren
|
||||||
vagrant destroy # VM volledig verwijderen
|
> vagrant resume # hervatten
|
||||||
```
|
> vagrant destroy # VM volledig verwijderen
|
||||||
|
> ```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,15 @@ fi
|
||||||
GITHUB_USER="$1"
|
GITHUB_USER="$1"
|
||||||
GITHUB_PAT="$2"
|
GITHUB_PAT="$2"
|
||||||
NAMESPACE="tekton-pipelines"
|
NAMESPACE="tekton-pipelines"
|
||||||
|
PIPELINERUN_REL="manifests/ci/pipeline/pipelinerun.yaml"
|
||||||
|
if [[ -f "${PIPELINERUN_REL}" ]]; then
|
||||||
|
PIPELINERUN_PATH="${PIPELINERUN_REL}"
|
||||||
|
elif [[ -f "/vagrant/${PIPELINERUN_REL}" ]]; then
|
||||||
|
PIPELINERUN_PATH="/vagrant/${PIPELINERUN_REL}"
|
||||||
|
else
|
||||||
|
# Fallback if workshop repo is in a custom location.
|
||||||
|
PIPELINERUN_PATH="${PIPELINERUN_REL}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "→ Creating git-credentials Secret in namespace ${NAMESPACE}"
|
echo "→ Creating git-credentials Secret in namespace ${NAMESPACE}"
|
||||||
|
|
||||||
|
|
@ -31,7 +40,7 @@ kubectl create secret generic git-credentials \
|
||||||
echo "✓ Secret created. The pipeline is ready to run."
|
echo "✓ Secret created. The pipeline is ready to run."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Trigger the pipeline:"
|
echo " Trigger the pipeline:"
|
||||||
echo " kubectl apply -f manifests/ci/pipeline/pipelinerun.yaml"
|
echo " kubectl apply -f ${PIPELINERUN_PATH}"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Watch progress:"
|
echo " Watch progress:"
|
||||||
echo " kubectl get pipelinerun -n tekton-pipelines -w"
|
echo " kubectl get pipelinerun -n tekton-pipelines -w"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue