Skip to content

Commit

Permalink
Merge branch 'release/2.6.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Oct 2, 2023
2 parents c65ad81 + 16a807d commit 98aeeca
Show file tree
Hide file tree
Showing 114 changed files with 17,193 additions and 289 deletions.
431 changes: 295 additions & 136 deletions .github/workflows/build-and-publish-images.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__
*.swp
*.vsix
.netlify
/carvel-packages/cluster-essentials/bundle/.imgpkg/images.yml
/carvel-packages/training-platform/bundle/.imgpkg/images.yml
/carvel-packages/training-platform/bundle/kbld-images.yaml
/client-programs/bin
Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,85 +42,85 @@ push-core-images: push-session-manager push-training-portal \
push-assets-server

build-session-manager:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-session-manager:$(PACKAGE_VERSION) session-manager
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-session-manager:$(PACKAGE_VERSION) session-manager

push-session-manager: build-session-manager
docker push $(IMAGE_REPOSITORY)/educates-session-manager:$(PACKAGE_VERSION)

build-training-portal:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-training-portal:$(PACKAGE_VERSION) training-portal
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-training-portal:$(PACKAGE_VERSION) training-portal

push-training-portal: build-training-portal
docker push $(IMAGE_REPOSITORY)/educates-training-portal:$(PACKAGE_VERSION)

build-base-environment:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-base-environment:$(PACKAGE_VERSION) workshop-images/base-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-base-environment:$(PACKAGE_VERSION) workshop-images/base-environment

push-base-environment: build-base-environment
docker push $(IMAGE_REPOSITORY)/educates-base-environment:$(PACKAGE_VERSION)

build-jdk8-environment: build-base-environment
docker build --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk8-environment:$(PACKAGE_VERSION) workshop-images/jdk8-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk8-environment:$(PACKAGE_VERSION) workshop-images/jdk8-environment

push-jdk8-environment: build-jdk8-environment
docker push $(IMAGE_REPOSITORY)/educates-jdk8-environment:$(PACKAGE_VERSION)

build-jdk11-environment: build-base-environment
docker build --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk11-environment:$(PACKAGE_VERSION) workshop-images/jdk11-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk11-environment:$(PACKAGE_VERSION) workshop-images/jdk11-environment

push-jdk11-environment: build-jdk11-environment
docker push $(IMAGE_REPOSITORY)/educates-jdk11-environment:$(PACKAGE_VERSION)

build-jdk17-environment: build-base-environment
docker build --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk17-environment:$(PACKAGE_VERSION) workshop-images/jdk17-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-jdk17-environment:$(PACKAGE_VERSION) workshop-images/jdk17-environment

push-jdk17-environment: build-jdk17-environment
docker push $(IMAGE_REPOSITORY)/educates-jdk17-environment:$(PACKAGE_VERSION)

build-conda-environment: build-base-environment
docker build --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-conda-environment:$(PACKAGE_VERSION) workshop-images/conda-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-conda-environment:$(PACKAGE_VERSION) workshop-images/conda-environment

push-conda-environment: build-conda-environment
docker push $(IMAGE_REPOSITORY)/educates-conda-environment:$(PACKAGE_VERSION)

build-desktop-environment: build-base-environment
docker build --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-desktop-environment:$(PACKAGE_VERSION) workshop-images/desktop-environment
docker build --progress plain --platform $(DOCKER_PLATFORM) --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) -t $(IMAGE_REPOSITORY)/educates-desktop-environment:$(PACKAGE_VERSION) workshop-images/desktop-environment

push-desktop-environment: build-desktop-environment
docker push $(IMAGE_REPOSITORY)/educates-desktop-environment:$(PACKAGE_VERSION)

build-docker-registry:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-docker-registry:$(PACKAGE_VERSION) docker-registry
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-docker-registry:$(PACKAGE_VERSION) docker-registry

push-docker-registry: build-docker-registry
docker push $(IMAGE_REPOSITORY)/educates-docker-registry:$(PACKAGE_VERSION)

build-pause-container:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-pause-container:$(PACKAGE_VERSION) pause-container
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-pause-container:$(PACKAGE_VERSION) pause-container

push-pause-container: build-pause-container
docker push $(IMAGE_REPOSITORY)/educates-pause-container:$(PACKAGE_VERSION)

build-secrets-manager:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-secrets-manager:$(PACKAGE_VERSION) secrets-manager
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-secrets-manager:$(PACKAGE_VERSION) secrets-manager

push-secrets-manager: build-secrets-manager
docker push $(IMAGE_REPOSITORY)/educates-secrets-manager:$(PACKAGE_VERSION)

build-tunnel-manager:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-tunnel-manager:$(PACKAGE_VERSION) tunnel-manager
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-tunnel-manager:$(PACKAGE_VERSION) tunnel-manager

push-tunnel-manager: build-tunnel-manager
docker push $(IMAGE_REPOSITORY)/educates-tunnel-manager:$(PACKAGE_VERSION)

build-image-cache:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-image-cache:$(PACKAGE_VERSION) image-cache
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-image-cache:$(PACKAGE_VERSION) image-cache

push-image-cache: build-image-cache
docker push $(IMAGE_REPOSITORY)/educates-image-cache:$(PACKAGE_VERSION)

build-assets-server:
docker build --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-assets-server:$(PACKAGE_VERSION) assets-server
docker build --progress plain --platform $(DOCKER_PLATFORM) -t $(IMAGE_REPOSITORY)/educates-assets-server:$(PACKAGE_VERSION) assets-server

push-assets-server: build-assets-server
docker push $(IMAGE_REPOSITORY)/educates-assets-server:$(PACKAGE_VERSION)
Expand Down Expand Up @@ -149,9 +149,9 @@ endif
delete-cluster-essentials:
kapp delete -a educates-cluster-essentials -y

deploy-cluster-essentials-bundle:
deploy-cluster-essentials-bundle: push-cluster-essentials-bundle
kubectl get ns/educates-package || kubectl create ns educates-package
kubectl apply --namespace educates-package -f package-repository/packages/cluster-essentials.educates.dev/metadata.yaml
kubectl apply --namespace educates-package -f carvel-packages/cluster-essentials/config/metadata.yaml
kubectl apply --namespace educates-package -f developer-testing/educates-cluster-essentials.yaml
ifneq ("$(wildcard developer-testing/educates-cluster-essentials-values.yaml)","")
kctrl package install --namespace educates-package --package-install educates-cluster-essentials --package cluster-essentials.educates.dev --version $(RELEASE_VERSION) --values-file developer-testing/educates-cluster-essentials-values.yaml
Expand Down Expand Up @@ -191,9 +191,9 @@ restart-training-platform:
delete-training-platform: delete-workshop
kapp delete -a educates-training-platform -y

deploy-training-platform-bundle:
deploy-training-platform-bundle: push-training-platform-bundle
kubectl get ns/educates-package || kubectl create ns educates-package
kubectl apply --namespace educates-package -f package-repository/packages/training-platform.educates.dev/metadata.yaml
kubectl apply --namespace educates-package -f carvel-packages/training-platform/config/metadata.yaml
kubectl apply --namespace educates-package -f developer-testing/educates-training-platform.yaml
ifneq ("$(wildcard developer-testing/educates-training-platform-values.yaml)","")
kctrl package install --namespace educates-package --package-install educates-training-platform --package training-platform.educates.dev --version $(RELEASE_VERSION) --values-file developer-testing/educates-training-platform-values.yaml
Expand Down
32 changes: 0 additions & 32 deletions carvel-packages/cluster-essentials/bundle/.imgpkg/images.yml

This file was deleted.

11 changes: 11 additions & 0 deletions carvel-packages/cluster-essentials/config/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata
metadata:
name: cluster-essentials.educates.dev
namespace: educates-package
spec:
displayName: "Educates Cluster Essentials"
shortDescription: "Set of packages required to be installed to the cluster for Educates."
providerName: VMware
maintainers:
- name: "Graham Dumpleton"
2 changes: 1 addition & 1 deletion carvel-packages/cluster-essentials/config/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#@ def bundle_reference():
#@ registry = data.values.imageRegistry.host
#@ if not registry or registry == "localhost":
#@ if not registry or registry == "localhost:5001":
#@ registry = "registry.default.svc.cluster.local"
#@ end
#@ if data.values.imageRegistry.namespace:
Expand Down
11 changes: 11 additions & 0 deletions carvel-packages/repository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#@ load("@ytt:data", "data")

---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
name: packages.educates.dev
spec:
fetch:
imgpkgBundle:
image: #@ "{}/educates-packages:{}".format(data.values.packageRepository, data.values.repositoryVersion)
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ spec:
type: array
items:
type: string
labels:
type: array
items:
type: object
required:
- name
properties:
name:
type: string
value:
type: string
logo:
type: string
url:
Expand Down
4 changes: 2 additions & 2 deletions carvel-packages/training-platform/config/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#@ def image_reference(name):
#@ registry = data.values.imageRegistry.host
#@ if not registry or registry == "localhost":
#@ registry = "registry.default.svc.cluster.local"
#@ if not registry:
#@ registry = "localhost:5001"
#@ end
#@ if data.values.imageRegistry.namespace:
#@ registry = "{}/{}".format(registry, data.values.imageRegistry.namespace)
Expand Down
11 changes: 11 additions & 0 deletions carvel-packages/training-platform/config/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata
metadata:
name: training-platform.educates.dev
namespace: educates-package
spec:
displayName: "Educates Training Platform"
shortDescription: "A platform for hosting interactive workshop environments in Kubernetes."
providerName: VMware
maintainers:
- name: "Graham Dumpleton"
2 changes: 1 addition & 1 deletion carvel-packages/training-platform/config/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#@ def bundle_reference():
#@ registry = data.values.imageRegistry.host
#@ if not registry or registry == "localhost":
#@ if not registry or registry == "localhost:5001":
#@ registry = "registry.default.svc.cluster.local"
#@ end
#@ if data.values.imageRegistry.namespace:
Expand Down
3 changes: 2 additions & 1 deletion client-programs/cmd/educates/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
// with the actual version at build time when making a release.

var projectVersion string = "develop"
var imageRepository string = "ghcr.io/vmware-tanzu-labs"

// Main entrypoint for execution of Educates CLI.

Expand All @@ -22,7 +23,7 @@ func main() {
// functions on ProjectInfo object so they can have access to compiled in
// default values such as the release version of Educates.

p := cmd.NewProjectInfo(strings.TrimSpace(projectVersion))
p := cmd.NewProjectInfo(strings.TrimSpace(projectVersion), strings.TrimSpace(imageRepository))

c := p.NewEducatesCmdGroup()

Expand Down
2 changes: 2 additions & 0 deletions client-programs/pkg/cluster/kindclusterconfig.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ nodes:
{{- end }}
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"]
endpoint = ["http://educates-registry:5000"]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local"]
endpoint = ["http://educates-registry:5000"]
{{- if eq .ClusterSecurity.PolicyEngine "pod-security-standards" }}
Expand Down
19 changes: 13 additions & 6 deletions client-programs/pkg/cmd/admin_cluster_create_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ import (
type AdminClusterCreateOptions struct {
Config string
Kubeconfig string
Image string
ClusterImage string
Domain string
PackageRepository string
Version string
KappControllerVersion string
WithServices bool
Expand Down Expand Up @@ -91,7 +92,7 @@ func (o *AdminClusterCreateOptions) Run() error {
return errors.New("ports 80/443 not available")
}

err = clusterConfig.CreateCluster(fullConfig, o.Image)
err = clusterConfig.CreateCluster(fullConfig, o.ClusterImage)

if err != nil {
return err
Expand Down Expand Up @@ -258,7 +259,7 @@ func (o *AdminClusterCreateOptions) Run() error {
ClusterSecurity: fullConfig.ClusterSecurity,
}

if err = services.DeployServices(o.Version, &clusterConfig.ClusterConfig, &servicesConfig); err != nil {
if err = services.DeployServices(o.Version, o.PackageRepository, &clusterConfig.ClusterConfig, &servicesConfig); err != nil {
return errors.Wrap(err, "failed to deploy cluster essentials services")
}

Expand All @@ -283,7 +284,7 @@ func (o *AdminClusterCreateOptions) Run() error {
WebsiteStyling: fullConfig.WebsiteStyling,
}

if err = operators.DeployOperators(o.Version, &clusterConfig.ClusterConfig, &platformConfig); err != nil {
if err = operators.DeployOperators(o.Version, o.PackageRepository, &clusterConfig.ClusterConfig, &platformConfig); err != nil {
return errors.Wrap(err, "failed to deploy training platform components")
}

Expand Down Expand Up @@ -313,8 +314,8 @@ func (p *ProjectInfo) NewAdminClusterCreateCmd() *cobra.Command {
"kubeconfig file to use instead of $HOME/.kube/config",
)
c.Flags().StringVar(
&o.Image,
"image",
&o.ClusterImage,
"kind-cluster-image",
"",
"docker image to use when booting the kind cluster",
)
Expand All @@ -324,6 +325,12 @@ func (p *ProjectInfo) NewAdminClusterCreateCmd() *cobra.Command {
"",
"wildcard ingress subdomain name for Educates",
)
c.Flags().StringVar(
&o.PackageRepository,
"package-repository",
p.ImageRepository,
"image repository hosting package bundles",
)
c.Flags().StringVar(
&o.Version,
"version",
Expand Down
19 changes: 13 additions & 6 deletions client-programs/pkg/cmd/admin_platform_deploy_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
)

type AdminPlatformDeployOptions struct {
Config string
Kubeconfig string
Provider string
Domain string
Version string
Config string
Kubeconfig string
Provider string
Domain string
Version string
PackageRepository string
}

func (o *AdminPlatformDeployOptions) Run() error {
Expand Down Expand Up @@ -63,7 +64,7 @@ func (o *AdminPlatformDeployOptions) Run() error {
WebsiteStyling: fullConfig.WebsiteStyling,
}

return operators.DeployOperators(o.Version, clusterConfig, &platformConfig)
return operators.DeployOperators(o.Version, o.PackageRepository, clusterConfig, &platformConfig)
}

func (p *ProjectInfo) NewAdminPlatformDeployCmd() *cobra.Command {
Expand Down Expand Up @@ -100,6 +101,12 @@ func (p *ProjectInfo) NewAdminPlatformDeployCmd() *cobra.Command {
"",
"wildcard ingress subdomain name for Educates",
)
c.Flags().StringVar(
&o.PackageRepository,
"package-repository",
p.ImageRepository,
"image repository hosting package bundles",
)
c.Flags().StringVar(
&o.Version,
"version",
Expand Down
Loading

0 comments on commit 98aeeca

Please sign in to comment.