Skip to content

Commit

Permalink
setup tasks for k3d cluster and test user
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Oct 2, 2024
1 parent ff79754 commit 8eaf672
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ variables:
description: "Explicitly set this to mutate the local registry port away from `5000` (e.g., `5001` for MacOS)"
default: "5000"

- name: ENABLE_INSECURE_KEYCLOAK_ADMIN_PASSWORD
description: "Explicitly set this to `false` to disable insecure KeyCloak admin password generation"
default: "true"

includes:
#########################
# UDS COMMON TASK IMPORTS
Expand All @@ -32,6 +36,7 @@ includes:
- badge: ./tasks/badge.yaml
- create: ./tasks/create.yaml
- publish: ./tasks/publish.yaml
- setup: ./tasks/setup.yaml

tasks:
#######
Expand Down
11 changes: 11 additions & 0 deletions tasks/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ tasks:
# IMAGES
########

- name: k3d-gpu-image
description: "Create the K3s CUDA image for K3d"
actions:
- description: "Create the K3s CUDA image"
task: image
with:
dockerfile: "packages/k3d-gpu/Dockerfile"
architecture: "amd64"
version: ${VERSION}
imageRepository: ghcr.io/defenseunicorns/leapfrogai/k3d-gpu

- name: sdk-image
description: "Create the LeapfrogAI SDK Docker image"
inputs:
Expand Down
53 changes: 53 additions & 0 deletions tasks/setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.14.0/tasks.schema.json
includes:
#########################
# UDS COMMON TASK IMPORTS
#########################
- setup-common: https://raw.githubusercontent.com/defenseunicorns/uds-common/82e63be82766a2e550a847af904b2d738c9d3478/tasks/setup.yaml

###########################
# LEAPFROGAI-SPECIFIC TASKS
###########################
- create: ./create.yaml

tasks:
- name: e2e-test-user
description: "Creates a test user in KeyCloak with fake credentials, mainly for CI testing workflows"
actions:
- task: setup-common:create-doug-user

- name: k3d-cpu-cluster-slim
description: "Creates a UDS K3d cluster with slim UDS Core and CPU-only Capability"
actions:
- task: setup-common:k3d-test-cluster

- name: k3d-gpu-cluster-slim
description: "Creates a UDS K3d cluster with slim UDS Core and NVIDIA GPU Capability"
actions:
- task: create:k3d-gpu-image
- task: setup-common:k3d-test-cluster
with:
version: 0.27.3
snapshots: "false"
insecure_keycloak_admin: ${ENABLE_INSECURE_KEYCLOAK_ADMIN_PASSWORD}
options: "--set K3D_EXTRA_ARGS='--gpus=all --image=ghcr.io/defenseunicorns/leapfrogai/k3d-gpu:${VERSION}'"

- name: k3d-cpu-cluster-full
description: "Creates a UDS K3d cluster with full UDS Core and CPU-only Capability"
actions:
- task: setup-common:k3d-full-cluster
with:
version: 0.27.3
snapshots: "false"
insecure_keycloak_admin: ${ENABLE_INSECURE_KEYCLOAK_ADMIN_PASSWORD}

- name: k3d-gpu-cluster-full
description: "Creates a UDS K3d cluster with full UDS Core and NVIDIA GPU Capability"
actions:
- task: create:k3d-gpu-image
- task: setup-common:k3d-full-cluster
with:
version: 0.27.3
snapshots: "false"
insecure_keycloak_admin: ${ENABLE_INSECURE_KEYCLOAK_ADMIN_PASSWORD}
options: "--set K3D_EXTRA_ARGS='--gpus=all --image=ghcr.io/defenseunicorns/leapfrogai/k3d-gpu:${VERSION}'"

0 comments on commit 8eaf672

Please sign in to comment.