Skip to content
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

Change Azure region to match allowed list #931

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .buildkite/capi/aks-cluster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# aks-cluster

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for aks capi clusters

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| clientID | string | `""` | |
| clientSecret.name | string | `""` | |
| clientSecret.namespace | string | `""` | |
| controlPlaneReplicas | int | `1` | |
| kubernetesVersion | string | `"1.26.3"` | |
| location | string | `"eastus2"` | |
| resourceGroup | string | `""` | |
| subscriptionID | string | `""` | |
| tenantID | string | `""` | |
| workerReplicas | int | `1` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
2 changes: 1 addition & 1 deletion .buildkite/capi/aks-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
kubernetesVersion: 1.26.3

# Name of the Azure datacenter location. Change this value to your desired location
location: "westus2"
location: "eastus2"

clientID: ""
tenantID: ""
Expand Down
18 changes: 9 additions & 9 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -133,33 +133,33 @@ test_aks() {

export TEST_STORAGE_ACCOUNT TEST_RESOURCE_GROUP TEST_STORAGE_CONTAINER

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az login --service-principal \
--username $AZURE_CLIENT_ID \
--password $AZURE_CLIENT_SECRET \
--tenant $AZURE_TENANT_ID

# the westus2 is used as buildkite is deployed in us-west-2 which is close to Azure westus2 (Maybe in the same city)
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group create \
--name $TEST_RESOURCE_GROUP \
--location westus2
--location eastus2

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage account create \
--name $TEST_STORAGE_ACCOUNT \
--resource-group $TEST_RESOURCE_GROUP \
--location westus2 \
--location eastus2 \
--sku Standard_RAGRS \
--kind StorageV2

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage container create \
--name $TEST_STORAGE_CONTAINER \
--account-name $TEST_STORAGE_ACCOUNT
--account-name $TEST_STORAGE_ACCOUNT \
--auth-mode login


TEST_AZURE_SHARED_KEY=$(docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 az storage account keys list -g $TEST_RESOURCE_GROUP -n $TEST_STORAGE_ACCOUNT --query '[0].value' -o tsv)
TEST_AZURE_SHARED_KEY=$(docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 az storage account keys list -g $TEST_RESOURCE_GROUP -n $TEST_STORAGE_ACCOUNT --query '[0].value' -o tsv)
export TEST_AZURE_SHARED_KEY

trap kind_dump EXIT
Expand Down
8 changes: 4 additions & 4 deletions .buildkite/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ cleanup_aks() {

export CI TEST_STORAGE_ACCOUNT TEST_RESOURCE_GROUP

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az login --service-principal \
--username 918839a6-3e96-4950-8bf2-f56d0a2e7447 \
--password $AZURE_CLIENT_SECRET \
--tenant 9a95fd9e-005d-487a-9a01-d08c1eab2757 || true

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage account delete \
--name $TEST_STORAGE_ACCOUNT \
--resource-group $TEST_RESOURCE_GROUP \
--yes

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group delete --resource-group $TEST_RESOURCE_GROUP --yes --debug

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group delete --resource-group $TEST_RESOURCE_GROUP --yes --debug || true
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/cloud-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gke() {

aks() {
echo '--- testing that there is data in the azure storage container'
if (docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 az storage blob list -c $TEST_STORAGE_CONTAINER --account-key $TEST_AZURE_SHARED_KEY --account-name $TEST_STORAGE_ACCOUNT --query "[].{name:name}" --output tsv | grep manifest.json ); then
if (docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 az storage blob list -c $TEST_STORAGE_CONTAINER --account-key $TEST_AZURE_SHARED_KEY --account-name $TEST_STORAGE_ACCOUNT --query "[].{name:name}" --output tsv | grep manifest.json ); then
echo "Manifest found. Success!"
else
echo "No manifest uploaded. Cloud-storage test failed."
Expand Down