From 8a4291be0e55fd84404df855f379f09243eb51fa Mon Sep 17 00:00:00 2001 From: zamaz <71521611+zachariahmiller@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:17:45 -0400 Subject: [PATCH] fix: add keycloak to dev bundle and rename (#262) ## Description This change replaces the core-istio bundle with a dev-slim bundle that includes keycloak in addition to istio and pepr. ## Related Issue https://github.com/defenseunicorns/uds-core/issues/251 --------- Co-authored-by: Micah Nagel --- .github/workflows/tag-and-release.yml | 8 ++++---- README.md | 7 +++++-- bundles/{k3d-istio => k3d-slim-dev}/README.md | 3 ++- bundles/{k3d-istio => k3d-slim-dev}/uds-bundle.yaml | 4 ++-- packages/istio/README.md | 3 --- packages/slim-dev/README.md | 3 +++ packages/{istio => slim-dev}/zarf.yaml | 10 ++++++++-- release-please-config.json | 4 ++-- tasks/create.yaml | 12 ++++++------ tasks/deploy.yaml | 6 +++--- tasks/lint.yaml | 2 +- tasks/publish.yaml | 4 ++-- tasks/test.yaml | 2 +- 13 files changed, 39 insertions(+), 29 deletions(-) rename bundles/{k3d-istio => k3d-slim-dev}/README.md (92%) rename bundles/{k3d-istio => k3d-slim-dev}/uds-bundle.yaml (97%) delete mode 100644 packages/istio/README.md create mode 100644 packages/slim-dev/README.md rename packages/{istio => slim-dev}/zarf.yaml (78%) diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index c95f375d9..20f76c616 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -50,14 +50,14 @@ jobs: run: | ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }} ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${{ matrix.flavor }} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress + ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml slim-dev-package --no-progress --set FLAVOR=${{ matrix.flavor }} + ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress if [ "${{ matrix.flavor }}" != "registry1" ]; then ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }} ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${{ matrix.flavor }} - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress + ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml slim-dev-package --no-progress --set FLAVOR=${{ matrix.flavor }} + ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress fi # Standard Package by default tests what's in the Istio Package diff --git a/README.md b/README.md index 16fc226ba..418aa2b65 100644 --- a/README.md +++ b/README.md @@ -60,16 +60,19 @@ uds deploy k3d-core-demo:0.16.1 #### UDS Package Development -In addition to the demo bundle, a [k3d-core-istio-dev bundle](./bundles/k3d-istio/README.md) also exists to work with UDS Core with only Istio & Pepr installed. Run the command below to use it: +In addition to the demo bundle, a [k3d-slim-dev bundle](./bundles/k3d-slim-dev/README.md) also exists to work with UDS Core with only Istio, Keycloak & Pepr installed. Run the command below to use it. + +Deploy Istio, Keycloak and Pepr: ```bash -uds deploy k3d-core-istio-dev:0.16.1 +uds deploy k3d-core-slim-dev:0.16.1 ``` + #### Developing UDS Core UDS Core development leverages the `uds zarf dev deploy` command. For convenience, a UDS Task is provided to setup the environment. You'll need to have [NodeJS](https://nodejs.org/en/download/) 20 or later installed to continue. Here's an example of a flow developing the [metrics-server package](./src/metrics-server/README.md): diff --git a/bundles/k3d-istio/README.md b/bundles/k3d-slim-dev/README.md similarity index 92% rename from bundles/k3d-istio/README.md rename to bundles/k3d-slim-dev/README.md index 7f3a54b43..54ee2b426 100644 --- a/bundles/k3d-istio/README.md +++ b/bundles/k3d-slim-dev/README.md @@ -1,8 +1,9 @@ -# Unicorn Delivery Service - K3d Istio (UDS Core) +# Unicorn Delivery Service - K3d Slim Dev (UDS Core) This bundle is a trimmed-down version of [UDS Core](../k3d-standard/README.md) bundle, with only the following UDS Core applications installed: - [Istio](https://istio.io/) - Service Mesh +- [KeyCloak](https://www.keycloak.org/) - Identity & Access Management - [Pepr](https://pepr.dev) - UDS policy engine & operator The k3d uds-dev-stack provides: diff --git a/bundles/k3d-istio/uds-bundle.yaml b/bundles/k3d-slim-dev/uds-bundle.yaml similarity index 97% rename from bundles/k3d-istio/uds-bundle.yaml rename to bundles/k3d-slim-dev/uds-bundle.yaml index 1984a9d20..a3a09a1ca 100644 --- a/bundles/k3d-istio/uds-bundle.yaml +++ b/bundles/k3d-slim-dev/uds-bundle.yaml @@ -1,6 +1,6 @@ kind: UDSBundle metadata: - name: k3d-core-istio-dev + name: k3d-core-slim-dev description: A UDS bundle for deploying Istio from UDS Core on a development cluster # x-release-please-start-version version: "0.16.1" @@ -33,7 +33,7 @@ packages: # renovate: datasource=github-tags depName=defenseunicorns/zarf versioning=semver ref: v0.32.5 - - name: core-istio + - name: core-slim-dev path: ../../build/ # x-release-please-start-version ref: 0.16.1 diff --git a/packages/istio/README.md b/packages/istio/README.md deleted file mode 100644 index 7903dbcf9..000000000 --- a/packages/istio/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# UDS Core Istio - -This is a special modified version of UDS Core that only includes the components needed to run Istio. diff --git a/packages/slim-dev/README.md b/packages/slim-dev/README.md new file mode 100644 index 000000000..1e3b1dce6 --- /dev/null +++ b/packages/slim-dev/README.md @@ -0,0 +1,3 @@ +# UDS Core Slim Dev + +This is a special modified version of UDS Core that only includes the components needed to run Istio, UDS Operator and Keycloak. diff --git a/packages/istio/zarf.yaml b/packages/slim-dev/zarf.yaml similarity index 78% rename from packages/istio/zarf.yaml rename to packages/slim-dev/zarf.yaml index 3b5bfd146..c06e2708c 100644 --- a/packages/istio/zarf.yaml +++ b/packages/slim-dev/zarf.yaml @@ -1,7 +1,7 @@ kind: ZarfPackageConfig metadata: - name: core-istio - description: "UDS Core (Istio Only)" + name: core-slim-dev + description: "UDS Core (Istio, UDS Operator and Keycloak)" authors: "Defense Unicorns - Product" # x-release-please-start-version version: "0.16.1" @@ -34,3 +34,9 @@ components: required: true import: path: ../standard + + # Keycloak + - name: keycloak + required: true + import: + path: ../standard diff --git a/release-please-config.json b/release-please-config.json index 2819a2be4..a67946a85 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -12,9 +12,9 @@ "versioning": "default", "extra-files": [ "README.md", - "packages/istio/zarf.yaml", + "packages/slim-dev/zarf.yaml", "packages/standard/zarf.yaml", - "bundles/k3d-istio/uds-bundle.yaml", + "bundles/k3d-slim-dev/uds-bundle.yaml", "bundles/k3d-standard/uds-bundle.yaml", "tasks/deploy.yaml", "tasks/publish.yaml" diff --git a/tasks/create.yaml b/tasks/create.yaml index fd6f88399..0f807bebe 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -21,19 +21,19 @@ tasks: - description: "Create the UDS Core Standard Bundle" cmd: "uds create bundles/k3d-standard --confirm --no-progress --architecture=${ZARF_ARCHITECTURE}" - - name: istio-package + - name: slim-dev-package description: "Create the UDS Core (Istio Only) Zarf Package" actions: - task: pepr-build - description: "Create the UDS Core Istio Zarf Package" - cmd: "uds zarf package create packages/istio --confirm --flavor ${FLAVOR}" + cmd: "uds zarf package create packages/slim-dev --confirm --flavor ${FLAVOR}" - - name: k3d-istio-bundle - description: "Create the K3d-UDS Core (Istio Only) Bundle" + - name: k3d-slim-dev-bundle + description: "Create the K3d-UDS Core (Istio and Keycloak Only) Bundle" actions: - - description: "Create the UDS Core Istio Only Bundle" - cmd: "uds create bundles/k3d-istio --confirm --no-progress --architecture=${ZARF_ARCHITECTURE}" + - description: "Create the UDS Core Istio and Keycloak Only Bundle" + cmd: "uds create bundles/k3d-slim-dev --confirm --no-progress --architecture=${ZARF_ARCHITECTURE}" - name: single-package description: "Create a single Zarf Package, must set UDS_PKG environment variable" diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml index 73e7d2c02..03321fb9b 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yaml @@ -13,10 +13,10 @@ tasks: - description: "Deploy the UDS Core Standard Bundle" cmd: uds deploy bundles/k3d-standard/uds-bundle-k3d-core-demo-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress - - name: k3d-istio-bundle + - name: k3d-slim-dev-bundle actions: - - description: "Deploy the UDS Core Istio Only Bundle" - cmd: uds deploy bundles/k3d-istio/uds-bundle-k3d-core-istio-dev-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress + - description: "Deploy the UDS Core Slim Dev Only Bundle" + cmd: uds deploy bundles/k3d-slim-dev/uds-bundle-k3d-core-slim-dev-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress - name: single-package actions: diff --git a/tasks/lint.yaml b/tasks/lint.yaml index 4e861c2db..d5b732137 100644 --- a/tasks/lint.yaml +++ b/tasks/lint.yaml @@ -14,6 +14,6 @@ tasks: - description: "Pepr Format check" cmd: npx pepr format --validate-only - description: install yamllint deps - cmd: pip install yamllint + cmd: CMD=pip && which $CMD || CMD=pip3 && $CMD install yamllint - description: yaml lint cmd: yamllint . -c .yamllint --no-warnings diff --git a/tasks/publish.yaml b/tasks/publish.yaml index d91f801cd..8791593bc 100644 --- a/tasks/publish.yaml +++ b/tasks/publish.yaml @@ -31,8 +31,8 @@ tasks: uds publish bundles/k3d-standard/uds-bundle-k3d-*-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress uds publish bundles/k3d-standard/uds-bundle-k3d-*-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress - uds publish bundles/k3d-istio/uds-bundle-k3d-*-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress - uds publish bundles/k3d-istio/uds-bundle-k3d-*-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress + uds publish bundles/k3d-slim-dev/uds-bundle-k3d-*-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress + uds publish bundles/k3d-slim-dev/uds-bundle-k3d-*-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress - description: "Tag the latest bundles" cmd: | diff --git a/tasks/test.yaml b/tasks/test.yaml index 45016266d..73c753576 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -28,7 +28,7 @@ tasks: description: "Build and test UDS Core" actions: - task: create:standard-package - - task: create:istio-package + - task: create:slim-dev-package - task: create:k3d-standard-bundle - task: deploy:k3d-standard-bundle - task: validate-packages