diff --git a/tasks.yaml b/tasks.yaml index f99b7e871..5f6f6537c 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -37,6 +37,7 @@ includes: - create: ./tasks/create.yaml - publish: ./tasks/publish.yaml - setup: ./tasks/setup.yaml + - deploy: ./tasks/deploy.yaml tasks: ####### @@ -89,3 +90,38 @@ tasks: - task: create:vllm - task: create:text-embeddings - task: create:whisper + + ######## + # DEPLOY + ######## + - name: deploy-all + description: "Deploys all Zarf packages within the LeapfrogAI repository" + actions: + - task: deploy:supabase + - task: deploy:api + - task: deploy:ui + - task: deploy:repeater + - task: deploy:vllm + - task: deploy:llama-cpp-python + - task: deploy:text-embeddings + - task: deploy:whisper + + - name: deploy-cpu + description: "Deploys CPU deployment Zarf packages within the LeapfrogAI repository" + actions: + - task: deploy:supabase + - task: deploy:api + - task: deploy:ui + - task: deploy:llama-cpp-python + - task: deploy:text-embeddings + - task: deploy:whisper + + - name: deploy-gpu + description: "Deploys GPU deployment Zarf packages within the LeapfrogAI repository" + actions: + - task: deploy:supabase + - task: deploy:api + - task: deploy:ui + - task: deploy:vllm + - task: deploy:text-embeddings + - task: deploy:whisper diff --git a/tasks/create.yaml b/tasks/create.yaml index e4a4f0ce5..e5020fdac 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -72,6 +72,8 @@ tasks: description: "Image repository for the image tag" required: true actions: + - cmd: | + printf "\n🐸 Creating image at ${{ .inputs.dockerfile }}\n\n" - description: "Build the Docker image" shell: linux: bash @@ -120,6 +122,8 @@ tasks: description: "Set the version of the Zarf package and target image(s)" required: true actions: + - cmd: | + printf "\n🐸 Creating package at ${{ .inputs.path }}\n\n" - description: "Create the Zarf package" task: create-common:package env: @@ -151,6 +155,8 @@ tasks: default: "" required: false actions: + - cmd: | + printf "\n🐸 Creating bundle at ${{ .inputs.path }}\n\n" - description: "Create the UDS bundle" task: create-common:test-bundle with: @@ -515,7 +521,6 @@ tasks: with: path: "packages/vllm" outputPath: "packages/vllm" - zarfConfig: "packages/vllm/zarf-config.yaml" flavor: ${FLAVOR} architecture: ${ARCHITECTURE} version: ${VERSION} diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml new file mode 100644 index 000000000..671750577 --- /dev/null +++ b/tasks/deploy.yaml @@ -0,0 +1,130 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.14.0/tasks.schema.json +includes: + ######################### + # UDS COMMON TASK IMPORTS + ######################### + - deploy-common: https://raw.githubusercontent.com/defenseunicorns/uds-common/82e63be82766a2e550a847af904b2d738c9d3478/tasks/deploy.yaml + +tasks: + ########### + # REUSEABLE + ########### + + - name: package + description: "Deploy a Zarf package" + inputs: + path: + description: "Path to the Zarf package to being deployed" + required: true + zarfConfig: + description: "Zarf Config of the Zarf package being deployed" + default: "" + required: false + options: + description: "Extra Zarf package deployment options" + default: "--log-level warn --no-progress --confirm" + required: false + actions: + - cmd: | + printf "\n🐸 Deploying package at ${{ .inputs.path }}\n\n" + - description: Get the current Zarf package name + cmd: cat ${{ .inputs.path }}/zarf.yaml | uds zarf tools yq .metadata.name + setVariables: + - name: PACKAGE_NAME + - description: "Deploy the Zarf package" + env: + - ZARF_CONFIG=${{ .inputs.zarfConfig }} + cmd: | + uds zarf package deploy ${{ .inputs.path }}/zarf-package-${PACKAGE_NAME}-${ARCHITECTURE}-${VERSION}.tar.zst ${{ .inputs.options }} + + - name: bundle + description: "Deploy a UDS bundle" + inputs: + path: + description: "Path to the UDS Bundle to being deployed" + required: true + udsConfig: + description: "UDS Config of the UDS Bundle being deployed" + default: "" + required: false + options: + description: "Extra UDS Bundle deployment options" + default: "--log-level warn" + required: false + architecture: + description: "Architecture of the UDS Bundle being created" + required: true + version: + description: "Set the version of the UDS Bundle and target image(s)" + required: true + actions: + - cmd: | + printf "\n🐸 Deploying package at ${{ .inputs.path }}\n\n" + - task: deploy-common:test-bundle + env: + - UDS_ARCH=${{ .inputs.architecture }} + with: + options: ${{ .inputs.options }} + path: ${{ .inputs.path }} + + ########## + # PACKAGES + ########## + + - name: api + description: "Deploy the LeapfrogAI API Zarf package" + actions: + - task: package + with: + path: "packages/api" + zarfConfig: "packages/api/zarf-config.yaml" + + - name: ui + description: "Deploy the LeapfrogAI API Zarf package" + actions: + - task: package + with: + path: "packages/ui" + zarfConfig: "packages/ui/zarf-config.yaml" + + - name: supabase + description: "Deploy the Supabase Zarf package" + actions: + - task: package + with: + path: "packages/supabase" + + - name: repeater + description: "Deploy the Repeater Zarf package" + actions: + - task: package + with: + path: "packages/repeater" + + - name: vllm + description: "Deploy the vLLM Zarf package" + actions: + - task: package + with: + path: "packages/vllm" + + - name: llama-cpp-python + description: "Deploy the LLaMA-CPP-Python Zarf package" + actions: + - task: package + with: + path: "packages/llama-cpp-python" + + - name: text-embeddings + description: "Deploy the Text-Embeddings Zarf package" + actions: + - task: package + with: + path: "packages/text-embeddings" + + - name: whisper + description: "Deploy the Whisper Zarf package" + actions: + - task: package + with: + path: "packages/whisper"