Skip to content

Commit

Permalink
Add BFH variant (#569)
Browse files Browse the repository at this point in the history
* Add config for bfh

* Add helm values for bfh deployment

* Replace ocplight with dedicated modules

* Replace techlab with dedicated modules

* Add more modules as lab switches

* Update title and url

* Add bfh variant to github workflows

* Change labs button color
  • Loading branch information
bliemli authored Oct 20, 2023
1 parent 3586c56 commit 8575aa2
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 17 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ jobs:
push: true
tags: |
quay.io/acend/kubernetes-basics-training:pr-${{ github.event.pull_request.number }}-sbb
-
name: Build BFH Version
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=bfh
push: true
tags: |
quay.io/acend/kubernetes-basics-training:pr-${{ github.event.pull_request.number }}-bfh
-
name: Login to quay.io appuio organization
uses: docker/login-action@v3
Expand Down Expand Up @@ -141,6 +152,7 @@ jobs:
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-openshift --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-baloise --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-sbb --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-bfh --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
-
name: Comment PR Environments in PR
Expand All @@ -154,4 +166,5 @@ jobs:
* [OpenShift](https://openshift-basics-pr-${{ github.event.pull_request.number }}.training.acend.ch)
* [OpenShift Baloise](https://openshift-basics-baloise-pr-${{ github.event.pull_request.number }}.training.acend.ch)
* [OpenShift SBB](https://openshift-basics-sbb-pr-${{ github.event.pull_request.number }}.training.acend.ch)
* [OpenShift BFH](https://openshift-basics-bfh-pr-${{ github.event.pull_request.number }}.training.acend.ch)
* [APPUiO Techlab](https://techlab-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,7 +45,7 @@ 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}{,-mobi,-openshift,-sbb}
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/${REPOSITORY}/tag/pr-${PR_NUMBER}{,-mobi,-openshift,-sbb,-bfh}
-
name: Delete tags in quay.io appuio organization
id: delete_tags_appuio
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ jobs:
push: true
tags: |
quay.io/acend/kubernetes-basics-training:latest-sbb
-
name: Build BFH Version
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=bfh
push: true
tags: |
quay.io/acend/kubernetes-basics-training:latest-bfh
-
name: Login to quay.io appuio organization
uses: docker/login-action@v3
Expand Down Expand Up @@ -143,4 +154,5 @@ jobs:
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-openshift --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-baloise --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-sbb --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-bfh --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
11 changes: 11 additions & 0 deletions config/bfh/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "BFH OpenShift Basics Training"
languageCode = "en-us"

[Languages]
[Languages.en]
title = "BFH OpenShift Basics Training"

[params]
enabledModule = "base openshift bfh nodaemonsets nodeploymentstrategies nohelm nokubernetesandopenshiftdifferences nokustomize noresourcequotasandlimitranges nosecurity nosidecarcontainers nostatefulsets"
distroName = "OpenShift"
cliToolName = "oc"
2 changes: 1 addition & 1 deletion config/sbb/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ languageCode = "en-us"
title = "OpenShift Basics Training"

[params]
enabledModule = "base ocplight nosecurity openshift sbb"
enabledModule = "base nodaemonsets nodeploymentstrategies nokubernetesandopenshiftdifferences nosecurity nostatefulsets nosidecarcontainers openshift sbb"
distroName = "OpenShift"
cliToolName = "oc"
automaticSectionNumbers = true
Expand Down
2 changes: 1 addition & 1 deletion config/techlab/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ url = "https://appuio.ch"
[params]
copyright = "APPUiO"
imagePrefix = "appuio_"
enabledModule = "base ocplight nosecurity openshift techlab"
enabledModule = "base nodeploymentstrategies nohelm nokubernetesandopenshiftdifferences nokustomize nosecurity openshift techlab"
distroName = "OpenShift"
cliToolName = "oc"

Expand Down
14 changes: 7 additions & 7 deletions content/en/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<div class="mx-auto">{{< onlyWhenNot nosetup >}}<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/setup" >}}">
Setup <i class="fas fa-cogs ml-2 "></i>
</a>{{< /onlyWhenNot >}}
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/docs" >}}">
Labs <i class="fas fa-flask ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/materials" >}}">
{{< onlyWhenNot bfh >}}<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/materials" >}}">
Materials <i class="fas fa-chalkboard-teacher ml-2 "></i>
</a>
</a>{{< /onlyWhenNot >}}
</div>
{{< /blocks/cover >}}
{{< /onlyWhenNot >}}
Expand All @@ -23,10 +23,10 @@
<div class="mx-auto">{{< onlyWhenNot nosetup >}}<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/setup" >}}">
Setup <i class="fas fa-cogs ml-2 "></i>
</a>{{< /onlyWhenNot >}}
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/docs" >}}">
Labs <i class="fas fa-flask ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/materials" >}}">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/materials" >}}">
Materials <i class="fas fa-chalkboard-teacher ml-2 "></i>
</a>
</div>
Expand All @@ -38,10 +38,10 @@
<div class="mx-auto">{{< onlyWhenNot nosetup >}}<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/setup" >}}">
Setup <i class="fas fa-cogs ml-2 "></i>
</a>{{< /onlyWhenNot >}}
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/docs" >}}">
Labs <i class="fas fa-flask ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{< relref "/materials" >}}">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/materials" >}}">
Materials <i class="fas fa-chalkboard-teacher ml-2 "></i>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/additional-concepts/daemonsets/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "DaemonSets"
weight: 92
onlyWhenNot: sbb
onlyWhenNot: nodaemonsets
---

A DaemonSet is almost identical to a normal Deployment. The difference is that it makes sure that exactly one Pod is running on every (or some specified) Node. When a new Node is added, the DaemonSet automatically deploys a Pod on the new Node if its selector matches.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "ResourceQuotas and LimitRanges"
weight: 95
onlyWhenNot: noresourcequotasandlimitranges
---

In this lab, we are going to look at ResourceQuotas and LimitRanges. As {{% param distroName %}} users, we are most certainly going to encounter the limiting effects that ResourceQuotas and LimitRanges impose.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Sidecar containers"
weight: 97
onlyWhenNot: sbb
onlyWhenNot: nosidecarcontainers
---

Let's first have another look at the Pod's description [on the Kubernetes documentation page](https://kubernetes.io/docs/concepts/workloads/pods/pod/):
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/additional-concepts/statefulsets/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "StatefulSets"
weight: 91
onlyWhenNot: sbb
onlyWhenNot: nostatefulsets
---

Stateless applications or applications with a stateful backend can be described as Deployments.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/deployment-strategies/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Deployment strategies"
weight: 11
onlyWhenNot: ocplight
onlyWhenNot: nodeploymentstrategies
---

{{% onlyWhen baloise %}}
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/helm/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Helm"
weight: 12
onlyWhenNot: techlab
onlyWhenNot: nohelm
---

[Helm](https://github.com/helm/helm) is a [Cloud Native Foundation](https://www.cncf.io/) project to define, install and manage applications in Kubernetes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Kubernetes and OpenShift differences"
weight: 14
onlyWhen: openshift
onlyWhenNot: ocplight
onlyWhenNot: nokubernetesandopenshiftdifferences
---

{{% onlyWhen baloise %}}
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/kustomize/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Kustomize"
weight: 13
onlyWhenNot: techlab
onlyWhenNot: nokustomize
---

{{% onlyWhen baloise %}}
Expand Down
12 changes: 12 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ acendTraining:
secretOverride: acend-wildcard
appname: openshift-basics-sbb
domain: training.acend.ch
-
name: bfh
replicaCount: 2
image:
repository: quay.io/acend/kubernetes-basics-training
pullPolicy: Always
tag: ""
tagsuffix: "-bfh"
ingress:
secretOverride: acend-wildcard
appname: openshift-basics-bfh
domain: training.acend.ch
-
name: techlab
replicaCount: 2
Expand Down

0 comments on commit 8575aa2

Please sign in to comment.