This repository exists for creating a customized version of the start.spring.io web site that can be embedded within an Educates workshop dashboard and which allows the generated Spring application to be created within the workshop session container, rather than a zip file for the application being downloaded to the local computer.
When deploying with an Educates workshop, a single instance of the frontend should be created in the shared workshop namespace. This is used to provide the customized user interface that will be integrated into the Educates workshop dashboard. The frontend instance will connect to the existing backend of the start.spring.io site for metadata listing Spring Boot versions and available addon dependencies. The existing backend will also be used to generate the actual Spring Boot application code.
To integrate this with your Educates workshop you need to make changes to the
Workshop definition for your workshop, as well as add some files into the
repository for your workshop.
To your existing Workshop definition you should add the session.dashboards,
session.ingresses and environment.objects sections shown below.
session:
dashboards:
- name: Initializr
url: "$(ingress_protocol)://initializr-$(session_namespace).$(ingress_domain)"
ingresses:
- name: initializr
protocol: http
host: initializr.$(workshop_namespace).svc.cluster.local
port: 8080
environment:
objects:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: initializr
labels:
app: initializr
spec:
replicas: 1
selector:
matchLabels:
app: initializr
template:
metadata:
labels:
app: initializr
spec:
containers:
- name: dashboard
image: ghcr.io/vmware-tanzu-labs/educates-spring-initializr:2.0
imagePullPolicy: IfNotPresent
ports:
- name: 8080-tcp
containerPort: 8080
protocol: TCP
- apiVersion: v1
kind: Service
metadata:
name: initializr
labels:
app: initializr
spec:
type: ClusterIP
selector:
app: initializr
ports:
- name: 8080-tcp
port: 8080
targetPort: 8080
protocol: TCP
Note that this is not supported for use with workshops created for Tanzu Learning Center and only works with Educates 2.X.
