-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5509e74
commit cb17135
Showing
20 changed files
with
557 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
workshops/lab-lookup-standalone/exercises/admin-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: lookup.educates.dev/v1beta1 | ||
kind: ClientConfig | ||
metadata: | ||
name: admin | ||
namespace: educates-config | ||
spec: | ||
client: | ||
password: super-secret | ||
roles: | ||
- admin |
209 changes: 209 additions & 0 deletions
209
workshops/lab-lookup-standalone/resources/workshop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
apiVersion: training.educates.dev/v1beta1 | ||
kind: Workshop | ||
metadata: | ||
name: "lab-lookup-standalone" | ||
spec: | ||
title: "Lookup Service Standalone" | ||
description: "A workshop on installing a standalone lookup service." | ||
publish: | ||
image: "$(image_repository)/labs-installation-guides/lab-lookup-standalone-files:$(workshop_version)" | ||
workshop: | ||
files: | ||
- image: | ||
url: "$(image_repository)/labs-installation-guides/lab-lookup-standalone-files:$(workshop_version)" | ||
includePaths: | ||
- /workshop/** | ||
- /exercises/** | ||
- /README.md | ||
packages: | ||
- name: educates | ||
files: | ||
- image: | ||
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1 | ||
path: bin | ||
includePaths: | ||
- educates-linux-$(platform_arch) | ||
session: | ||
namespaces: | ||
budget: x-large | ||
security: | ||
policy: baseline | ||
token: | ||
enabled: false | ||
secondary: | ||
- name: $(session_namespace)-hub | ||
applications: | ||
terminal: | ||
enabled: true | ||
layout: split | ||
editor: | ||
enabled: true | ||
console: | ||
enabled: false | ||
docker: | ||
enabled: true | ||
socket: | ||
enabled: true | ||
compose: | ||
services: | ||
registry: | ||
image: registry:2.8.3 | ||
ports: | ||
- "0.0.0.0:5001:5000" | ||
registry: | ||
enabled: false | ||
git: | ||
enabled: false | ||
vcluster: | ||
enabled: false | ||
files: | ||
enabled: true | ||
directory: exercises | ||
volumes: | ||
- name: hub-credentials-config | ||
secret: | ||
secretName: $(session_name)-hub-kubeconfig | ||
volumeMounts: | ||
- name: hub-credentials-config | ||
mountPath: /opt/clusters/hub | ||
objects: | ||
# Loopback services for session and registry. | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: registry-$(session_name) | ||
namespace: $(workshop_namespace) | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
deployment: $(session_name) | ||
ports: | ||
- name: registry | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 5001 | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: localhost-$(session_name) | ||
namespace: $(workshop_namespace) | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
deployment: $(session_name) | ||
ports: | ||
- name: renderer | ||
port: 10081 | ||
protocol: TCP | ||
targetPort: 10081 | ||
# Virtual cluster for hub. | ||
- apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: $(session_name)-hub-vcluster-values | ||
namespace: $(workshop_namespace) | ||
stringData: | ||
values.yaml: | | ||
vcluster: | ||
image: rancher/k3s:v1.25.3-k3s1 | ||
syncer: | ||
extraArgs: | ||
- --tls-san=hub-vcluster.$(session_namespace)-hub.svc.$(cluster_domain) | ||
- --out-kube-config-server=https://hub-vcluster.$(session_namespace)-hub.svc.$(cluster_domain) | ||
- --kube-config-context-name=hub | ||
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: "hub" | ||
- apiVersion: kappctrl.k14s.io/v1alpha1 | ||
kind: App | ||
metadata: | ||
name: $(session_name)-hub-vcluster-package | ||
namespace: $(workshop_namespace) | ||
spec: | ||
serviceAccountName: kapp-installer | ||
syncPeriod: 720h | ||
noopDelete: true | ||
fetch: | ||
- helmChart: | ||
name: vcluster | ||
repository: | ||
url: https://charts.loft.sh | ||
version: "0.19.7" | ||
template: | ||
- helmTemplate: | ||
name: hub-vcluster | ||
namespace: $(session_namespace)-hub | ||
valuesFrom: | ||
- secretRef: | ||
name: $(session_name)-hub-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) | ||
deploy: | ||
- kapp: | ||
rawOptions: | ||
- --app-changes-max-to-keep=5 | ||
- apiVersion: secrets.educates.dev/v1beta1 | ||
kind: SecretCopier | ||
metadata: | ||
name: $(session_name)-hub-kubeconfig | ||
spec: | ||
rules: | ||
- sourceSecret: | ||
name: vc-hub-vcluster | ||
namespace: $(session_namespace)-hub | ||
targetNamespaces: | ||
nameSelector: | ||
matchNames: | ||
- $(workshop_namespace) | ||
targetSecret: | ||
name: $(session_name)-hub-kubeconfig | ||
environment: | ||
images: | ||
registries: | ||
- content: | ||
- destination: /educates-client-programs | ||
prefix: /vmware-tanzu-labs/educates-client-programs | ||
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) |
16 changes: 16 additions & 0 deletions
16
workshops/lab-lookup-standalone/workshop/content/00-workshop-overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Workshop Overview | ||
--- | ||
|
||
Educates is a system for hosting interactive workshop environments which can be | ||
installed into a Kubernetes cluster. | ||
|
||
This workshop provides instructions on how to install a standalone instance of | ||
the Educates lookup service. The process described here would be required if | ||
wanting to use the lookup service with Educates 2.7.4 clusters, or if wanting to | ||
install the lookup service separate to the Educates clusters being managed. | ||
|
||
This workshop is mainly of interest to anyone who has to manage the lookup | ||
service. Someone who will only be a consumer of the lookup service need not know | ||
how to install it or configure it, but the concepts explained in this workshop | ||
as to how it is configured and accessed may still be of interest. |
13 changes: 13 additions & 0 deletions
13
workshops/lab-lookup-standalone/workshop/content/01-kubernetes-cluster.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Kubernetes Cluster | ||
--- | ||
|
||
In this workshop, in order to demonstrate how to install a standalone instance | ||
of the Educates lookup service a single empty virtual cluster has been created. | ||
|
||
Installation of the Educates lookup service requires that the Kubernetes cluster | ||
already has a functional ingress controller installed. How to install an ingress | ||
controller is not covered by this workshop. In the case of the virtual cluster | ||
being used here, ingress is already configured to work. For this workshop secure | ||
ingress will not be used, but notes on how to use secure ingress are given later | ||
in the workshop. |
Oops, something went wrong.