Skip to content

Commit

Permalink
Update to Educates 3.0.0-rc.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 28, 2024
1 parent 5509e74 commit cb17135
Show file tree
Hide file tree
Showing 20 changed files with 557 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: educates
files:
- image:
url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.19
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1
path: bin
includePaths:
- educates-linux-$(platform_arch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ version.
To apply this configuration to the cluster, run the command:

```terminal:execute
command: kubectl apply -f https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/3.0.0-alpha.19/educates-installer-app-rbac.yaml
command: kubectl apply -f https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/3.0.0-rc.1/educates-installer-app-rbac.yaml
```

As well as creating the service account with required roles as mentioned, this
Expand All @@ -43,7 +43,7 @@ You are now ready to install Educates and any required services as dictated by
the configuration you supplied. To do this run the following command:

```terminal:execute
command: kubectl apply -f https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/3.0.0-alpha.19/educates-installer-app.yaml
command: kubectl apply -f https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/3.0.0-rc.1/educates-installer-app.yaml
```

The same `educates-installer` namespace referenced in prior steps will be used.
Expand Down
2 changes: 1 addition & 1 deletion workshops/lab-installation-via-cli/resources/workshop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: educates
files:
- image:
url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.19
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1
path: bin
includePaths:
- educates-linux-$(platform_arch)
Expand Down
8 changes: 4 additions & 4 deletions workshops/lab-lookup-configuration/resources/workshop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: educates
files:
- image:
url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.19
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1
path: bin
includePaths:
- educates-linux-$(platform_arch)
Expand Down Expand Up @@ -486,8 +486,8 @@ spec:
policyEngine: none
workshopSecurity:
rulesEngine: none
lookupService:
enabled: true
# lookupService:
# enabled: true
- apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
Expand All @@ -503,7 +503,7 @@ spec:
key: config
fetch:
- imgpkgBundle:
image: ghcr.io/vmware-tanzu-labs/educates-installer:3.0.0-alpha.19
image: ghcr.io/vmware-tanzu-labs/educates-installer:3.0.0-rc.1
deploy:
- kapp:
rawOptions:
Expand Down
9 changes: 2 additions & 7 deletions workshops/lab-lookup-consumption/resources/workshop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: educates
files:
- image:
url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.19
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1
path: bin
includePaths:
- educates-linux-$(platform_arch)
Expand Down Expand Up @@ -197,11 +197,6 @@ spec:
rulesEngine: none
lookupService:
enabled: true
# websiteStyling:
# frameAncestors:
# - "files-$(session_hostname)"
# sessionCookies:
# domain: "hub.$(session_hostname)"
- apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
Expand All @@ -217,7 +212,7 @@ spec:
key: config
fetch:
- imgpkgBundle:
image: ghcr.io/vmware-tanzu-labs/educates-installer:3.0.0-alpha.19
image: ghcr.io/vmware-tanzu-labs/educates-installer:3.0.0-rc.1
deploy:
- kapp:
rawOptions:
Expand Down
2 changes: 1 addition & 1 deletion workshops/lab-lookup-installation/resources/workshop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: educates
files:
- image:
url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.19
url: $(oci_image_cache)/educates-client-programs:3.0.0-rc.1
path: bin
includePaths:
- educates-linux-$(platform_arch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
title: Install Lookup Service
---

When installing Educates, the lookup service can optionally be enabled. This
will result in the lookup service being co-hosted with the Educates
installation.

To demonstrate this, in this workshop we will install Educates with the lookup
service into a virtual cluster created for this workshop session.
When installing Educates 3.0.0 or later, the lookup service can optionally be
enabled. This will result in the lookup service being co-hosted with the
Educates installation.

To demonstrate installation, in this workshop we will install Educates with the
lookup service into a virtual cluster created for this workshop session.

{{< note >}}
If you are using Educates 2.7.4 and want to be able to use the lookup service,
or want to be able to install the lookup service in a separate cluster to the
Educates training platform, see the separate workshop describing installation of
a standalone instance of the lookup service.
{{< /note >}}

The required configuration for this installation is as follows. Click on the
action block below to automatically open the embedded editor and create the file
Expand Down
10 changes: 10 additions & 0 deletions workshops/lab-lookup-standalone/exercises/admin-config.yaml
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 workshops/lab-lookup-standalone/resources/workshop.yaml
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)
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.
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.
Loading

0 comments on commit cb17135

Please sign in to comment.