From 525e976d2d52f8fea8ed9c29e6fbe0a120ff6306 Mon Sep 17 00:00:00 2001 From: Otto Bittner Date: Wed, 9 Nov 2022 12:04:23 +0100 Subject: [PATCH] Take location from state file for az jump host (#422) * Also fix readme badges --- .github/docs/development.md | 2 +- README.md | 3 +-- docs/versioned_docs/version-2.0/workflows/recovery.md | 1 + hack/azure-jump-host/jump-host-create | 4 +++- hack/azure-jump-host/parameters.json | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/docs/development.md b/.github/docs/development.md index d3ff9d70c..6e884bebe 100644 --- a/.github/docs/development.md +++ b/.github/docs/development.md @@ -56,7 +56,7 @@ You can do this by utilizing our terraform setup. Instructions on how to set it up can be found in it's [README](/terraform/libvirt/README.md). # Verification -In order to verify your cluster we describe a [verification workflow](https://docs.edgeless.systems/constellation/workflows/verify) in our official docs. +In order to verify your cluster we describe a [verification workflow](https://docs.edgeless.systems/constellation/workflows/verify-cluster) in our official docs. Apart from that you can also reproduce some of the measurements described in the [docs](https://docs.edgeless.systems/constellation/architecture/attestation#runtime-measurements) locally. To do so you have to create a cluster locally as described in the [previous section](/.github/docs/development.md#locally). However, you don't have to go through the full manual, you can stop after running `terraform apply`. diff --git a/README.md b/README.md index d3de79337..893244f1c 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@

Constellation License - E2E Test Azure - E2E Test GCP + E2E Tests Go Report Discord Twitter diff --git a/docs/versioned_docs/version-2.0/workflows/recovery.md b/docs/versioned_docs/version-2.0/workflows/recovery.md index e6b54991a..00b5bef53 100644 --- a/docs/versioned_docs/version-2.0/workflows/recovery.md +++ b/docs/versioned_docs/version-2.0/workflows/recovery.md @@ -124,6 +124,7 @@ See the [Identify unhealthy clusters](#identify-unhealthy-clusters) description Note that the recovery command needs to connect to the recovering nodes. Nodes only have private IP addresses in the VPC of the cluster, hence, the command needs to be issued from within the VPC network of the cluster. The easiest approach is to set up a jump host connected to the VPC network and perform the recovery from there. +For Azure you can find a script that does this for you in the repo at `/hack/azure-jump-host/jump-host-create`. Given these prerequisites a node can be recovered like this: diff --git a/hack/azure-jump-host/jump-host-create b/hack/azure-jump-host/jump-host-create index 5e6246720..ec19475f5 100755 --- a/hack/azure-jump-host/jump-host-create +++ b/hack/azure-jump-host/jump-host-create @@ -5,6 +5,7 @@ set -o pipefail SCRIPTDIR="$( dirname -- $(realpath "${BASH_SOURCE}"); )"; RG=$(jq -r .azureresourcegroup constellation-state.json) SUBNET=$(jq -r .azuresubnet constellation-state.json) +LOCATION=$(jq -r .azurelocation constellation-state.json) VNET=${SUBNET%"/subnets/nodeNetwork"} PUBKEY=$(cat ~/.ssh/id_rsa.pub) DEPLOYMENT_NAME=jump-host @@ -18,7 +19,8 @@ az deployment group create \ --parameters "@${SCRIPTDIR}/parameters.json" \ --parameters "{ \"virtualNetworkId\": { \"value\": \"${VNET}\" } }" \ --parameters "{ \"subnetRef\": { \"value\": \"${SUBNET}\" } }" \ - --parameters "{ \"adminPublicKey\": { \"value\": \"${PUBKEY}\" } }" + --parameters "{ \"adminPublicKey\": { \"value\": \"${PUBKEY}\" } }" \ + --parameters "{ \"location\": { \"value\": \"${LOCATION}\" } }" az deployment group wait --created --name "${DEPLOYMENT_NAME}" --resource-group "${RG}" PUBIP=$(az vm list-ip-addresses --resource-group "${RG}" --name "${VM_NAME}" --query "[].virtualMachine.network.publicIpAddresses[0].ipAddress" --output tsv) echo "Jump host created. Cleanup by deleteing the resource group." diff --git a/hack/azure-jump-host/parameters.json b/hack/azure-jump-host/parameters.json index 60ff13b23..a15020050 100644 --- a/hack/azure-jump-host/parameters.json +++ b/hack/azure-jump-host/parameters.json @@ -3,10 +3,10 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "value": "westus" + "value": null }, "networkInterfaceName": { - "value": "jump-host814" + "value": "jump-host" }, "networkSecurityGroupName": { "value": "jump-host-nsg"