Skip to content

Commit

Permalink
fixup! wip: basic test for peerpods
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Nov 12, 2024
1 parent a5b08e3 commit e2a7c74
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e_peerpods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
echo "rg=contrastpp$RANDOM" | tee -a "$GITHUB_OUTPUT"
- name: Test peer-pods
run: |
export azure_resource_group="${{ steps.resourcegroup.outputs.rg }}"
export azure_resource_group=contrast-ci
export azure_location=northeurope
export azure_subscription_id="0d202bbb-4fa7-4af8-8125-58c269a05435"
export CONTRAST_CACHE_DIR="./workspace.cache"
nix run .#scripts.test-peerpods
- name: Terminate cluster
if: always()
run: |
az group delete --name "${{ steps.resourcegroup.outputs.rg }}_caa_cluster" --yes
nix run -L .#terraform -- -chdir=infra/azure-peerpods destroy --auto-approve
2 changes: 1 addition & 1 deletion infra/azure-peerpods/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ locals {
}

data "azurerm_resource_group" "rg" {
name = local.name
name = "${var.resource_group}"
}

resource "azuread_application" "app" {
Expand Down
2 changes: 1 addition & 1 deletion infra/azure-peerpods/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variable "name_prefix" {
type = string
}

variable "image_resource_group_name" {
variable "resource_group" {
type = string
}

Expand Down
16 changes: 15 additions & 1 deletion packages/test-peerpods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@

set -euo pipefail

just create AKS-PEER-SNP
# TODO(burgerdev): this should be possible with `just create AKS-PEER-SNP`
true || nix run -L .#scripts.upload-image -- \
--subscription-id="${azure_subscription_id:?}" \
--location="${azure_location:?}" \
--resource-group="${azure_resource_group:?}"
image_id=/subscriptions/0d202bbb-4fa7-4af8-8125-58c269a05435/resourceGroups/contrast-ci/providers/Microsoft.Compute/galleries/contrast_ci_contrast/images/contrast/versions/0.0.1730981348
echo "image_id = \"${image_id}\"" > infra/azure-peerpods/image_id.auto.tfvars

echo "name_prefix = \"${azure_resource_group:?}\"" > infra/azure-peerpods/just.auto.tfvars
echo "resource_group = \"${azure_resource_group:?}\"" >> infra/azure-peerpods/just.auto.tfvars
echo "subscription_id = \"${azure_subscription_id:?}\"" >> infra/azure-peerpods/just.auto.tfvars

nix run -L .#terraform -- -chdir=infra/azure-peerpods init
nix run -L .#terraform -- -chdir=infra/azure-peerpods apply --auto-approve

just get-credentials AKS-PEER-SNP
just node-installer AKS-PEER-SNP

Expand Down

0 comments on commit e2a7c74

Please sign in to comment.