Skip to content
Merged
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
199 changes: 199 additions & 0 deletions public/assets/workshops/lab-installation-via-carvel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
apiVersion: training.educates.dev/v1beta1
kind: Workshop
metadata:
name: lab-installation-via-carvel
spec:
description: A workshop on installing Educates using kapp-controller.
environment:
images:
registries:
- content:
- destination: educates
prefix: /educates/educates-extension-packages/educates
stripPrefix: true
onDemand: true
urls:
- https://ghcr.io
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: kapp-installer
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kapp-installer-$(workshop_namespace)
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kapp-installer
namespace: $(workshop_namespace)
session:
applications:
console:
enabled: false
docker:
compose:
services:
registry:
image: registry:2.8.3
ports:
- 0.0.0.0:5001:5000
enabled: true
socket:
enabled: false
editor:
enabled: true
registry:
enabled: false
terminal:
enabled: true
layout: split
vcluster:
enabled: false
dashboards:
- name: Docs
url: https://docs.educates.dev/
namespaces:
budget: x-large
security:
policy: baseline
token:
enabled: false
objects:
- apiVersion: v1
kind: Secret
metadata:
name: $(session_name)-vcluster-values
namespace: $(workshop_namespace)
stringData:
values.yaml: |
vcluster:
image: rancher/k3s:v1.29.0-k3s1
syncer:
extraArgs:
- --tls-san=cluster-1-vcluster.$(session_namespace).svc.$(cluster_domain)
- --out-kube-config-server=https://cluster-1-vcluster.$(session_namespace).svc.$(cluster_domain)
- --kube-config-context-name=cluster-1
mapServices:
fromHost:
- from: $(workshop_namespace)/registry-$(session_name)
to: default/registry
- from: $(workshop_namespace)/localhost-$(session_name)
to: default/loopback
sync:
ingresses:
enabled: true
exportKubeConfig:
context: "cluster-1"
- apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
name: $(session_name)-vcluster-package
namespace: $(workshop_namespace)
spec:
deploy:
- kapp:
rawOptions:
- --app-changes-max-to-keep=5
fetch:
- helmChart:
name: vcluster
repository:
url: https://charts.loft.sh
version: 0.19.9
noopDelete: true
serviceAccountName: kapp-installer
syncPeriod: 720h
template:
- helmTemplate:
name: cluster-1-vcluster
namespace: $(session_namespace)
valuesFrom:
- secretRef:
name: $(session_name)-vcluster-values
- ytt:
inline:
paths:
overlays.yaml: |
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all, expects="1+"
---
metadata:
#@overlay/match missing_ok=True
ownerReferences:
- apiVersion: training.educates.dev/v1beta1
kind: WorkshopSession
blockOwnerDeletion: true
controller: true
name: $(session_name)
uid: $(workshop_session_uid)
- apiVersion: secrets.educates.dev/v1beta1
kind: SecretCopier
metadata:
name: $(session_name)-kubeconfig
spec:
rules:
- sourceSecret:
name: vc-cluster-1-vcluster
namespace: $(session_namespace)
targetNamespaces:
nameSelector:
matchNames:
- $(workshop_namespace)
targetSecret:
name: $(session_name)-kubeconfig
- apiVersion: v1
kind: Service
metadata:
name: registry-$(session_name)
namespace: $(workshop_namespace)
spec:
ports:
- name: registry
port: 80
protocol: TCP
targetPort: 5001
selector:
deployment: $(session_name)
type: ClusterIP
- apiVersion: v1
kind: Service
metadata:
name: localhost-$(session_name)
namespace: $(workshop_namespace)
spec:
ports:
- name: renderer
port: 10081
protocol: TCP
targetPort: 10081
selector:
deployment: $(session_name)
type: ClusterIP
volumeMounts:
- mountPath: /opt/kubeconfig
name: vcluster-kubeconfig
volumes:
- name: vcluster-kubeconfig
secret:
secretName: $(session_name)-kubeconfig
title: Educates installation using Carvel
version: 1.0.0
workshop:
files:
- image:
url: ghcr.io/educates/labs-installation-guides/lab-installation-via-carvel-files:1.0.0
includePaths:
- /workshop/**
- /exercises/**
- /README.md
packages:
- files:
- image:
url: $(oci_image_cache)/educates:v3.3.2
name: educates
199 changes: 199 additions & 0 deletions public/assets/workshops/lab-installation-via-cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
apiVersion: training.educates.dev/v1beta1
kind: Workshop
metadata:
name: lab-installation-via-cli
spec:
description: A workshop on installing Educates using the CLI.
environment:
images:
registries:
- content:
- destination: educates
prefix: /educates/educates-extension-packages/educates
stripPrefix: true
onDemand: true
urls:
- https://ghcr.io
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: kapp-installer
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kapp-installer-$(workshop_namespace)
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kapp-installer
namespace: $(workshop_namespace)
session:
applications:
console:
enabled: false
docker:
compose:
services:
registry:
image: registry:2.8.3
ports:
- 0.0.0.0:5001:5000
enabled: true
socket:
enabled: false
editor:
enabled: true
registry:
enabled: false
terminal:
enabled: true
layout: split
vcluster:
enabled: false
dashboards:
- name: Docs
url: https://docs.educates.dev/
namespaces:
budget: x-large
security:
policy: baseline
token:
enabled: false
objects:
- apiVersion: v1
kind: Secret
metadata:
name: $(session_name)-vcluster-values
namespace: $(workshop_namespace)
stringData:
values.yaml: |
vcluster:
image: rancher/k3s:v1.29.0-k3s1
syncer:
extraArgs:
- --tls-san=cluster-1-vcluster.$(session_namespace).svc.$(cluster_domain)
- --out-kube-config-server=https://cluster-1-vcluster.$(session_namespace).svc.$(cluster_domain)
- --kube-config-context-name=cluster-1
mapServices:
fromHost:
- from: $(workshop_namespace)/registry-$(session_name)
to: default/registry
- from: $(workshop_namespace)/localhost-$(session_name)
to: default/loopback
sync:
ingresses:
enabled: true
exportKubeConfig:
context: "cluster-1"
- apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
name: $(session_name)-vcluster-package
namespace: $(workshop_namespace)
spec:
deploy:
- kapp:
rawOptions:
- --app-changes-max-to-keep=5
fetch:
- helmChart:
name: vcluster
repository:
url: https://charts.loft.sh
version: 0.19.9
noopDelete: true
serviceAccountName: kapp-installer
syncPeriod: 720h
template:
- helmTemplate:
name: cluster-1-vcluster
namespace: $(session_namespace)
valuesFrom:
- secretRef:
name: $(session_name)-vcluster-values
- ytt:
inline:
paths:
overlays.yaml: |
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all, expects="1+"
---
metadata:
#@overlay/match missing_ok=True
ownerReferences:
- apiVersion: training.educates.dev/v1beta1
kind: WorkshopSession
blockOwnerDeletion: true
controller: true
name: $(session_name)
uid: $(workshop_session_uid)
- apiVersion: secrets.educates.dev/v1beta1
kind: SecretCopier
metadata:
name: $(session_name)-kubeconfig
spec:
rules:
- sourceSecret:
name: vc-cluster-1-vcluster
namespace: $(session_namespace)
targetNamespaces:
nameSelector:
matchNames:
- $(workshop_namespace)
targetSecret:
name: $(session_name)-kubeconfig
- apiVersion: v1
kind: Service
metadata:
name: registry-$(session_name)
namespace: $(workshop_namespace)
spec:
ports:
- name: registry
port: 80
protocol: TCP
targetPort: 5001
selector:
deployment: $(session_name)
type: ClusterIP
- apiVersion: v1
kind: Service
metadata:
name: localhost-$(session_name)
namespace: $(workshop_namespace)
spec:
ports:
- name: renderer
port: 10081
protocol: TCP
targetPort: 10081
selector:
deployment: $(session_name)
type: ClusterIP
volumeMounts:
- mountPath: /opt/kubeconfig
name: vcluster-kubeconfig
volumes:
- name: vcluster-kubeconfig
secret:
secretName: $(session_name)-kubeconfig
title: Educates installation using the CLI
version: 1.0.0
workshop:
files:
- image:
url: ghcr.io/educates/labs-installation-guides/lab-installation-via-cli-files:1.0.0
includePaths:
- /workshop/**
- /exercises/**
- /README.md
packages:
- files:
- image:
url: $(oci_image_cache)/educates:v3.3.2
name: educates
Loading