From 1a831f5660e58d91f90350da6f3dcedfcbf8615c Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Sat, 16 Sep 2023 08:53:21 +1000 Subject: [PATCH 1/2] Don't deploy local registry automatically when publishing workshop. --- client-programs/pkg/cmd/workshop_publish_cmd.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client-programs/pkg/cmd/workshop_publish_cmd.go b/client-programs/pkg/cmd/workshop_publish_cmd.go index 7f4de0ed..1d93d336 100644 --- a/client-programs/pkg/cmd/workshop_publish_cmd.go +++ b/client-programs/pkg/cmd/workshop_publish_cmd.go @@ -24,8 +24,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/kubectl/pkg/scheme" - - "github.com/vmware-tanzu-labs/educates-training-platform/client-programs/pkg/registry" ) type FilesPublishOptions struct { @@ -59,14 +57,6 @@ func (o *FilesPublishOptions) Run(args []string) error { return errors.New("workshop directory does not exist or path is not a directory") } - if o.Repository == "localhost:5001" { - err = registry.DeployRegistry() - - if err != nil { - return errors.Wrap(err, "failed to deploy registry") - } - } - return o.Publish(directory) } From 0b537a1fdecfd98b5ba5d3839bc9802ac86ce3b8 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Sun, 17 Sep 2023 12:46:20 +1000 Subject: [PATCH 2/2] Set platform architecture variable when deploying workshop to local docker. --- client-programs/pkg/cmd/docker_workshop_deploy_cmd.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client-programs/pkg/cmd/docker_workshop_deploy_cmd.go b/client-programs/pkg/cmd/docker_workshop_deploy_cmd.go index 6177f32c..b2407842 100644 --- a/client-programs/pkg/cmd/docker_workshop_deploy_cmd.go +++ b/client-programs/pkg/cmd/docker_workshop_deploy_cmd.go @@ -650,6 +650,7 @@ func generateVendirFilesConfig(workshop *unstructured.Unstructured, name string, vendirConfigString = strings.ReplaceAll(vendirConfigString, "$(image_repository)", repository) vendirConfigString = strings.ReplaceAll(vendirConfigString, "$(workshop_name)", name) vendirConfigString = strings.ReplaceAll(vendirConfigString, "$(workshop_version)", workshopVersion) + vendirConfigString = strings.ReplaceAll(vendirConfigString, "$(platform_arch)", runtime.GOARCH) vendirConfigs = append(vendirConfigs, vendirConfigString) }