Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ jobs:
push: true
tags: |
quay.io/acend/argocd-basics-training:pr-${{ github.event.pull_request.number }}-puzzle
-
name: Build Centris Version
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=centris
push: true
tags: |
quay.io/acend/argocd-basics-training:pr-${{ github.event.pull_request.number }}-centris
-
name: 'Install Helm'
uses: azure/setup-helm@v4
Expand Down Expand Up @@ -99,6 +110,7 @@ jobs:
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-acend --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-techlab --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-puzzle --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-centris --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
-
name: Comment PR Environments in PR
uses: marocchino/sticky-pull-request-comment@v2
Expand All @@ -109,3 +121,4 @@ jobs:
* acend version <https://argocd-basics-pr-${{ github.event.pull_request.number }}.training.acend.ch>
* techlab version <https://argocd-techlab-pr-${{ github.event.pull_request.number }}.training.acend.ch>
* puzzle version <https://argocd-basics-pr-${{ github.event.pull_request.number }}.training.puzzle.ch>
* centris version <https://argocd-centris-pr-${{ github.event.pull_request.number }}.training.acend.ch>
2 changes: 1 addition & 1 deletion .github/workflows/pr-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
QUAYIO_API_TOKEN: '${{ secrets.QUAYIO_API_TOKEN }}'
REPOSITORY: '${{ github.repository }}'
run: |
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/${REPOSITORY}/tag/pr-${PR_NUMBER}{,-techlab,-puzzle}
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/${REPOSITORY}/tag/pr-${PR_NUMBER}{,-techlab,-puzzle,-centris}
12 changes: 12 additions & 0 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ jobs:
push: true
tags: |
quay.io/acend/argocd-basics-training:latest-puzzle
-
name: Build Centris Version
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=centris
push: true
tags: |
quay.io/acend/argocd-basics-training:latest-centris
-
name: 'Install Helm'
uses: azure/setup-helm@v4
Expand Down Expand Up @@ -101,3 +112,4 @@ jobs:
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-acend --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-techlab --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-puzzle --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-centris --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run mdlint
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/floryn90/hugo:0.143.1-ext-ubuntu AS builder
FROM docker.io/floryn90/hugo:0.159.1-ext-ubuntu AS builder

ARG TRAINING_HUGO_ENV=default
USER root
Expand Down Expand Up @@ -31,12 +31,12 @@

FROM nginxinc/nginx-unprivileged:1.29-alpine

LABEL maintainer acend.ch

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.title "acend.ch's ArgoCD Basics Training"

Check warning on line 35 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 35 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 35 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 35 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.description "Container with acend.ch's ArgoCD Basics Training content"

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.authors acend.ch

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.source https://github.com/acend/argocd-basics-training/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.licenses CC-BY-SA-4.0

Check warning on line 39 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 39 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 39 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 39 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

EXPOSE 8080

Expand Down
3 changes: 2 additions & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ url = "https://www.acend.ch"
guessSyntax = "true"

[params]
automaticSectionNumbers = true
copyright = "acend gmbh"
github_repo = "https://github.com/acend/argocd-basics-training"
github_branch = "main"


enabledModule = "base"
enabledModule = "base getting-started simple-example resource-hooks sync-phases-and-waves tools helm kustomize jsonnet multiple-applications app-of-apps application-sets projects controlling-deployment-workflows sync-windows tracking-and-deployment-strategies additional-concepts backup-and-restore orphaned-resources"
argoCdUrl = "argocd.training.cluster.acend.ch"
giteaUrl = "gitea.training.cluster.acend.ch"
appDomain= "training.cluster.acend.ch"
Expand Down
21 changes: 21 additions & 0 deletions config/centris/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

[Languages]
[Languages.en]
title = "ArgoCD Training"
languageName = "English"
weight = 1


[params]
enabledModule = "base centris manual-fork no-argocd-cli openshift getting-started simple-example resource-hooks sync-phases-and-waves tools helm kustomize multiple-applications application-sets projects "

cliToolName = "oc"
distroName = "OpenShift"
argoInfraNamespace = "openshift-gitops"

github_repo = "https://github.com/acend/argocd-basics-training"
github_branch = "main"

argoCdUrl = "argocd.training.cluster.acend.ch"
giteaUrl = "gitea.training.cluster.acend.ch"
appDomain= "training.cluster.acend.ch"
2 changes: 1 addition & 1 deletion config/puzzle/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ imagePrefix = "puzzle_"
distroName = "Rancher"
cliToolName = "kubectl"

enabledModule = "base rancher"
enabledModule = "base rancher getting-started simple-example resource-hooks sync-phases-and-waves tools helm kustomize jsonnet multiple-applications app-of-apps application-sets projects controlling-deployment-workflows sync-windows tracking-and-deployment-strategies additional-concepts backup-and-restore orphaned-resources"

[[Languages.en.menu.main]]
copyright = "Puzzle ITC GmbH"
Expand Down
2 changes: 1 addition & 1 deletion config/techlab/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ weight = 1


[params]
enabledModule = "base techlab"
enabledModule = "base techlab getting-started simple-example resource-hooks sync-phases-and-waves tools helm kustomize jsonnet"
github_repo = ""
github_branch = ""
33 changes: 22 additions & 11 deletions content/en/docs/01/_index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: "1. Getting started"
title: "Getting started"
weight: 1
sectionnumber: 1
onlyWhen: getting-started
---


## Task {{% param sectionnumber %}}.1: Web IDE
## {{% task %}} Web IDE

The first thing we're going to do is to explore our lab environment and get in touch with the different components.

The namespace with the name corresponding to your username is going to be used for all the hands-on labs. And you will be using the `argocd tool` or the ArgoCD webconsole, to verify what resources and objects Argo CD created for you.
The namespace with the name corresponding to your username is going to be used for all the hands-on labs. And you will be using {{% onlyWhenNot no-argocd-cli %}} the `argocd tool` or {{% /onlyWhenNot %}} the ArgoCD webconsole, to verify what resources and objects Argo CD created for you.

{{% alert title="Note" color="info" %}}You can also use your local installation of the cli tools. Make sure you completed [the setup](../../setup/) before you continue with this lab.{{% /alert %}}

Expand Down Expand Up @@ -37,28 +37,34 @@ The Web IDE Pod consists of the following tools:
The files in the home directory under `/home/project` are stored in a persistence volume, so please make sure to store all your persistence data in this directory.


### Task {{% param sectionnumber %}}.1.1: Local Workspace Directory
### Task 1.1.1: Local Workspace Directory

During the lab, you’ll be using local files (eg. YAML resources) which will be applied in your lab project.

Create a new folder for your `<workspace>` in your Web IDE (for example `argocd-training` under `/home/project/argocd-training`). Either you can create it with `right-mouse-click -> New Folder` or in the Web IDE terminal
Create a new folder for your `<workspace>` in your Web IDE (for example `argocd-training` under `/home/project/argocd-training`). Either you can create it with `right-mouse-click -> New Folder` or in the Web IDE terminal.

```bash
mkdir argocd-training && cd argocd-training
```


### Task {{% param sectionnumber %}}.1.2: Login on ArgoCD using argocd CLI
### Task 1.1.2: Login to ArgoCD

{{% onlyWhenNot no-argocd-cli %}}
You can access Argo CD via Web UI (Credentials are provided by your teacher) or using the CLI. The Argo CD CLI Tool is already installed on the web IDE.

```bash
argocd login {{% param argoCdUrl %}} --grpc-web --username $USER
```
{{% /onlyWhenNot %}}

{{% onlyWhen no-argocd-cli %}}
You can access Argo CD via the Web UI. Open your browser and navigate to [https://{{% param argoCdUrl %}}](https://{{% param argoCdUrl %}}) and login with the credentials provided by your trainer.
{{% /onlyWhen %}}
{{% onlyWhen openshift %}}


### Task {{% param sectionnumber %}}.1.3: Lab Setup
### Task 1.1.3: Lab Setup


Most of the labs will be done inside the {{% param distroName %}} project with your username. Verify that your oc tool is configured to point to the right project:
Expand All @@ -77,12 +83,15 @@ The returned project name should correspond to your username.
{{% /onlyWhen %}}


## Task {{% param sectionnumber %}}.2: Argo CD CLI
{{% onlyWhenNot no-argocd-cli %}}


## {{% task %}} Argo CD CLI

The [Argo CD CLI](https://argoproj.github.io/argo-cd/cli_installation/) is a powerful tool to manage Argo CD and different applications. It's a self contained binary written in Go and available for Linux, Mac OS and Windows. Thanks to the fact that the CLI is implemented in Go, it can be easily integrated into scripts and build servers for automation purposes.


### Task {{% param sectionnumber %}}.2: Getting familiar with the CLI
### Task 1.2.1: Getting familiar with the CLI

Print out the help of the CLI by typing

Expand Down Expand Up @@ -147,7 +156,7 @@ argocd app create --help
```


### Task {{% param sectionnumber %}}.2: Autocompletion
### Task 1.2.2: Autocompletion

{{% alert title="Note" color="info" %}}This step is only needed, when you're not working with the Web IDE we've provided. The autocompletion is already installed in the Web IDE{{% /alert %}}

Expand All @@ -167,3 +176,5 @@ source ~/.bashrc
```

Find further information in the [official documentation](https://argoproj.github.io/argo-cd/user-guide/commands/argocd_completion/)

{{% /onlyWhenNot %}}
Loading
Loading