-
Notifications
You must be signed in to change notification settings - Fork 22
fix(e2e): fix local minikube scripts and switch CLI health checks to /status #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
matthewgrossman
merged 8 commits into
main
from
mgrossman/aircore-786-local-docker-image-build-story-is-broken-for-nemo-platform
Jun 23, 2026
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2974474
fix(e2e): Update scripts for minikube
matthewgrossman 5925d1f
fix prefixes
matthewgrossman f9faa85
fixes
matthewgrossman 1b9377b
remove the file chagnes
matthewgrossman 5f006a4
make vendor
matthewgrossman d7c7fb5
Merge branch 'main' into mgrossman/aircore-786-local-docker-image-bui…
matthewgrossman 0d57e9d
remove unnecessary comment
matthewgrossman 556df03
lint
matthewgrossman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,65 @@ | ||
| #!/usr/bin/env bash | ||
| # Build Docker images locally and deploy to minikube via Helm. | ||
| # | ||
| # This script handles the build step, then delegates the Helm install to | ||
| # install_helm_e2e.sh so install logic lives in one place. | ||
| # | ||
| # Environment variables: | ||
| # MINIKUBE_PROFILE - minikube profile name (default: minikube) | ||
| # NMP_REGISTRY - image registry (default: docker.io/my-registry) | ||
| # IMAGE_TAG - image tag (default: local-<epoch>) | ||
| # BUILD_ARCH - target platform (default: auto-detected from host) | ||
| # HELM_VALUES - values file (default: e2e/k8s/values/minikube.yaml) | ||
|
|
||
| set -e | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)" | ||
|
|
||
| MINIKUBE_PROFILE="${MINIKUBE_PROFILE:-minikube}" | ||
|
|
||
| # Check if minikube is running | ||
| if ! minikube status &>/dev/null; then | ||
| echo "Minikube is not running. Starting minikube..." | ||
| # Use the setup_local_minikube_gpu.sh script to start minikube, | ||
| # and ensure the script is in the same directory as this script. | ||
|
|
||
| "$SCRIPT_DIR/setup_local_minikube_gpu.sh" | ||
| if ! minikube status -p "${MINIKUBE_PROFILE}" &>/dev/null; then | ||
| echo "Minikube profile ${MINIKUBE_PROFILE} is not running. Starting..." | ||
| MINIKUBE_PROFILE="${MINIKUBE_PROFILE}" "$SCRIPT_DIR/setup_local_minikube_cpu.sh" | ||
| fi | ||
|
|
||
| # Wait for minikube to be ready | ||
| minikube status | ||
| minikube status -p "${MINIKUBE_PROFILE}" | ||
|
|
||
| # Build the images with a local tag and then load them | ||
| # Use epoch seconds (date +%s) so each run gets a unique tag and upgrades pick up new images | ||
| # Use epoch seconds so each run gets a unique tag and upgrades pick up new images | ||
| IMAGE_TAG="${IMAGE_TAG:-local-$(date +%s)}" | ||
|
|
||
| # Detect platform for build (match host arch) | ||
| BUILD_ARCH="${BUILD_ARCH:-linux/$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')}" | ||
| GIT_SHA=$(git -C "${REPO_ROOT}" rev-parse HEAD) | ||
|
|
||
| NMP_REGISTRY="${NMP_REGISTRY:-docker.io/my-registry}" | ||
|
matthewgrossman marked this conversation as resolved.
|
||
|
|
||
| echo "Building docker-cpu images with tag $IMAGE_TAG (platform=$BUILD_ARCH)..." | ||
|
|
||
| # Allow building directly into minikube's docker daemon | ||
| eval "$(minikube docker-env)" | ||
| # Build directly into minikube's docker daemon | ||
| eval "$(minikube -p "${MINIKUBE_PROFILE}" docker-env)" | ||
|
|
||
| # Set the image tag to the git sha | ||
| ( | ||
| cd "${REPO_ROOT}" | ||
| CI_COMMIT_SHA="$GIT_SHA" \ | ||
| BAKE_TAG="$IMAGE_TAG" \ | ||
| IMAGE_REGISTRY="docker.io/my-registry" \ | ||
| IMAGE_REGISTRY="${NMP_REGISTRY}" \ | ||
| BUILD_ARCH="$BUILD_ARCH" \ | ||
| docker buildx bake docker-cpu --set "*.platform=$BUILD_ARCH" | ||
| ) | ||
|
|
||
|
|
||
| # Echo the image tags and an example script to run end-to-end tests | ||
| echo "Image tags:" | ||
| echo " nmp-api: $IMAGE_TAG" | ||
| echo " nmp-cpu-tasks: $IMAGE_TAG" | ||
| echo " platform: $IMAGE_TAG" | ||
| echo "----------------------------------------" | ||
| echo "Example script to run end-to-end jobs tests:" | ||
| echo " NMP_E2E_INTERNAL_HOST=nemo-platform-api:8080 NMP_E2E_REGISTRY=docker.io/my-registry NMP_E2E_TAG=$IMAGE_TAG uv run pytest e2e --kubernetes --cluster-url=http://localhost:80" | ||
| echo "----------------------------------------" | ||
| echo "To rerun the helm install/upgrade, run:" | ||
| echo " helm upgrade --install nemo-platform k8s/helm/ -f e2e/k8s/values/local.yaml --set \"api.image.tag=$IMAGE_TAG\" --set \"core.image.tag=$IMAGE_TAG\" --set \"platformConfig.platform.image_tag=$IMAGE_TAG\"" | ||
| echo "Images built with tag: $IMAGE_TAG" | ||
| echo "----------------------------------------" | ||
|
|
||
| # Install/upgrade the helm chart with image tags | ||
| helm upgrade --install nemo-platform k8s/helm/ \ | ||
| -f e2e/k8s/values/local.yaml \ | ||
| --set "api.image.tag=$IMAGE_TAG" \ | ||
| --set "core.image.tag=$IMAGE_TAG" \ | ||
| --set "platformConfig.platform.image_tag=$IMAGE_TAG" | ||
| # Delegate helm install to install_helm_e2e.sh | ||
| export HELM_VALUES="${HELM_VALUES:-${REPO_ROOT}/e2e/k8s/values/minikube.yaml}" | ||
| export NMP_E2E_REGISTRY="${NMP_REGISTRY}" | ||
| export NMP_E2E_TAG="${IMAGE_TAG}" | ||
| export NMP_E2E_PULL_POLICY="Never" | ||
| export MINIKUBE_PROFILE | ||
| export REQUIRE_NMP_E2E_IMAGES=true | ||
|
|
||
| exec "$SCRIPT_DIR/install_helm_e2e.sh" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,18 @@ | ||
| # CPU-only minikube values for local auth E2E verification without ingress. | ||
| # Port-forward overlay — use on top of minikube.yaml + minikube-auth.yaml. | ||
| # | ||
| # Usage: | ||
| # helm upgrade -i nemo-platform k8s/helm -f e2e/k8s/values/minikube-auth-portforward.yaml | ||
| # helm upgrade -i nemo-platform k8s/helm \ | ||
| # -f e2e/k8s/values/minikube.yaml \ | ||
| # -f e2e/k8s/values/minikube-auth.yaml \ | ||
| # -f e2e/k8s/values/minikube-auth-portforward.yaml \ | ||
| # --set api.image.tag=<TAG> ... | ||
| # | ||
| # This keeps the auth-enabled local harness but disables ingress so the stack | ||
| # can be validated through kubectl port-forward on machines where registry.k8s.io | ||
| # is blocked and the ingress addon cannot bootstrap. The chart still keeps split | ||
| # pods on the API service URL while the API pod itself loops back to localhost. | ||
|
|
||
| k8s-nim-operator: | ||
| enabled: false | ||
|
|
||
| postgresql: | ||
| persistence: | ||
| storageClass: standard | ||
|
|
||
| core: | ||
| storage: | ||
| storageClass: standard | ||
| volumePermissionsImage: busybox | ||
| # Disables ingress and envoy proxy for machines where registry.k8s.io is | ||
|
crookedstorm marked this conversation as resolved.
Outdated
|
||
| # blocked and the ingress addon cannot bootstrap. Use kubectl port-forward | ||
| # instead. | ||
|
|
||
| envoyProxy: | ||
| enabled: false | ||
|
|
||
| ingress: | ||
| enabled: false | ||
|
|
||
| platformConfig: | ||
| auth: | ||
|
crookedstorm marked this conversation as resolved.
|
||
| enabled: true | ||
| policy_decision_point_provider: embedded | ||
| policy_data_refresh_interval: 2 | ||
| bundle_cache_seconds: 2 | ||
| admin_email: "admin@example.com" | ||
| inference_gateway: | ||
| mock_provider_prefix: igw-mock- | ||
| models: | ||
| controller: | ||
| backends: | ||
| nim_operator: | ||
| enabled: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.