Skip to content
Closed
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
203 changes: 203 additions & 0 deletions deploy/cluster-development-predeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ci": {
"type": "bool",
"defaultValue": false
},
"clusterName": {
"type": "string"
},
"clusterServicePrincipalId": {
"type": "string"
},
"diskEncryptionSetName": {
"type": "string"
},
"fpServicePrincipalId": {
"type": "string"
},
"kvName": {
"type": "string"
},
"masterAddressPrefix": {
"type": "string"
},
"routes": {
"type": "array",
"defaultValue": []
},
"rpServicePrincipalId": {
"type": "string"
},
"shouldCreateKey": {
"type": "string"
},
"shouldCreateKeyVault": {
"type": "string"
},
"vnetAddressPrefix": {
"type": "string"
},
"workerAddressPrefix": {
"type": "string"
}
},
"resources": [
{
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('vnetAddressPrefix')]"
]
}
},
"name": "dev-vnet",
"type": "Microsoft.Network/virtualNetworks",
"location": "[resourceGroup().location]",
"condition": "[parameters('ci')]",
"apiVersion": "2020-08-01"
},
{
"properties": {
"routes": "[parameters('routes')]"
},
"name": "[concat(parameters('clusterName'), '-rt')]",
"type": "Microsoft.Network/routeTables",
"location": "[resourceGroup().location]",
"apiVersion": "2020-08-01"
},
{
"properties": {
"addressPrefix": "[parameters('masterAddressPrefix')]",
"routeTable": {
"id": "[resourceid('Microsoft.Network/routeTables', concat(parameters('clusterName'), '-rt'))]",
"tags": null
}
},
"name": "[concat('dev-vnet/', parameters('clusterName'), '-master')]",
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2020-08-01",
"dependsOn": [
"[resourceid('Microsoft.Network/virtualNetworks', 'dev-vnet')]",
"[resourceid('Microsoft.Network/routeTables', concat(parameters('clusterName'), '-rt'))]"
],
"location": "[resourceGroup().location]"
},
{
"properties": {
"addressPrefix": "[parameters('workerAddressPrefix')]",
"routeTable": {
"id": "[resourceid('Microsoft.Network/routeTables', concat(parameters('clusterName'), '-rt'))]",
"tags": null
}
},
"name": "[concat('dev-vnet/', parameters('clusterName'), '-worker')]",
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2020-08-01",
"dependsOn": [
"[resourceid('Microsoft.Network/virtualNetworks/subnets', 'dev-vnet', concat(parameters('clusterName'), '-master'))]",
"[resourceid('Microsoft.Network/routeTables', concat(parameters('clusterName'), '-rt'))]"
],
"location": "[resourceGroup().location]"
},
{
"name": "[parameters('kvName')]",
"type": "Microsoft.KeyVault/vaults",
"location": "[resourceGroup().location]",
"properties": {
"tenantId": "[subscription().tenantId]",
"sku": {
"family": "A",
"name": "standard"
},
"accessPolicies": [
{
"tenantId": "[subscription().tenantId]",
"objectId": "[parameters('clusterServicePrincipalId')]",
"permissions": {
"keys": [
"create",
"get",
"delete"
]
}
}
],
"enabledForDiskEncryption": true,
"enablePurgeProtection": true
},
"condition": "[equals(parameters('shouldCreateKeyVault'), 'true')]",
"apiVersion": "2019-09-01"
},
{
"properties": {
"kty": "RSA",
"keySize": 4096
},
"name": "[concat(parameters('kvName'), '/', parameters('clusterName'), '-', 'disk-encryption-key')]",
"type": "Microsoft.KeyVault/vaults/keys",
"location": "[resourceGroup().location]",
"condition": "[equals(parameters('shouldCreateKey'), 'true')]",
"apiVersion": "2019-09-01",
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', parameters('kvName'))]"
]
},
{
"identity": {
"type": "SystemAssigned"
},
"properties": {
"activeKey": {
"sourceVault": {
"id": "[resourceId('Microsoft.KeyVault/vaults', parameters('kvName'))]"
},
"keyUrl": "[reference(resourceId('Microsoft.KeyVault/vaults/keys', parameters('kvName'), concat(parameters('clusterName'), '-', 'disk-encryption-key')), '2019-09-01', 'Full').properties.keyUriWithVersion]"
}
},
"name": "[parameters('diskEncryptionSetName')]",
"type": "Microsoft.Compute/diskEncryptionSets",
"location": "[resourceGroup().location]",
"apiVersion": "2020-12-01",
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults/keys', parameters('kvName'), concat(parameters('clusterName'), '-', 'disk-encryption-key'))]"
]
},
{
"name": "[concat(parameters('kvName'), '/add')]",
"type": "Microsoft.KeyVault/vaults/accessPolicies",
"location": "[resourceGroup().location]",
"properties": {
"accessPolicies": [
{
"tenantId": "[subscription().tenantId]",
"objectId": "[reference(resourceId('Microsoft.Compute/diskEncryptionSets', parameters('diskEncryptionSetName')), '2019-07-01', 'Full').identity.PrincipalId]",
"permissions": {
"keys": [
"get",
"wrapKey",
"unwrapKey"
]
}
},
{
"tenantId": "[subscription().tenantId]",
"objectId": "[parameters('rpServicePrincipalId')]",
"permissions": {
"keys": [
"create",
"delete"
]
}
}
]
},
"apiVersion": "2019-09-01",
"dependsOn": [
"[resourceId('Microsoft.Compute/diskEncryptionSets', parameters('diskEncryptionSetName'))]"
]
}
]
}
91 changes: 0 additions & 91 deletions deploy/cluster-predeploy.json

This file was deleted.

36 changes: 34 additions & 2 deletions deploy/env-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"azureServicePrincipalId": {
"type": "string"
},
"ciAzpToken": {
"type": "string",
"defaultValue": ""
Expand Down Expand Up @@ -235,11 +238,40 @@
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "[resourceGroup().location]",
"condition": "[greater(parameters('ciCapacity'), 0)]",
"apiVersion": "2020-06-01",
"apiVersion": "2020-12-01",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', 'dev-vnet')]"
]
},
{
"name": "[concat(resourceGroup().name, '-diskEncKV')]",
"type": "Microsoft.KeyVault/vaults",
"location": "[resourceGroup().location]",
"properties": {
"tenantId": "[subscription().tenantId]",
"sku": {
"family": "A",
"name": "standard"
},
"accessPolicies": [
{
"tenantId": "[subscription().tenantId]",
"objectId": "[parameters('azureServicePrincipalId')]",
"permissions": {
"keys": [
"create",
"get",
"delete",
"recover"
]
}
}
],
"enabledForDiskEncryption": true,
"enablePurgeProtection": true
},
"apiVersion": "2019-09-01"
},
{
"sku": {
"name": "Standard_D2s_v3",
Expand Down Expand Up @@ -332,7 +364,7 @@
"name": "dev-proxy-vmss",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "[resourceGroup().location]",
"apiVersion": "2020-06-01"
"apiVersion": "2020-12-01"
}
]
}
2 changes: 1 addition & 1 deletion deploy/gateway-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"name": "[concat('gateway-vmss-', parameters('vmssName'))]",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "[resourceGroup().location]",
"apiVersion": "2020-06-01",
"apiVersion": "2020-12-01",
"dependsOn": [
"[resourceId('Microsoft.Network/loadBalancers', 'gateway-lb-internal')]",
"[resourceId('Microsoft.Storage/storageAccounts', substring(parameters('gatewayStorageAccountDomain'), 0, indexOf(parameters('gatewayStorageAccountDomain'), '.')))]"
Expand Down
2 changes: 1 addition & 1 deletion deploy/rp-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
"name": "[concat('rp-vmss-', parameters('vmssName'))]",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "[resourceGroup().location]",
"apiVersion": "2020-06-01",
"apiVersion": "2020-12-01",
"dependsOn": [
"[resourceId('Microsoft.Authorization/roleAssignments', guid(resourceGroup().id, parameters('rpServicePrincipalId'), 'RP / Reader'))]",
"[resourceId('Microsoft.Network/loadBalancers', 'rp-lb')]",
Expand Down
3 changes: 3 additions & 0 deletions hack/devtools/deploy-shared-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ deploy_env_dev_ci() {
"proxyImage=arointsvc.azurecr.io/proxy:latest" \
"proxyImageAuth=$(jq -r '.auths["arointsvc.azurecr.io"].auth' <<<$PULL_SECRET)" \
"proxyKey=$(base64 -w0 <secrets/proxy.key)" \
"azureServicePrincipalId=$AZURE_SERVICE_PRINCIPAL_ID" \
"sshPublicKey=$(<secrets/proxy_id_rsa.pub)" >/dev/null
}

Expand All @@ -65,6 +66,7 @@ deploy_env_dev() {
"proxyImageAuth=$(jq -r '.auths["arointsvc.azurecr.io"].auth' <<<$PULL_SECRET)" \
"proxyKey=$(base64 -w0 <secrets/proxy.key)" \
"sshPublicKey=$(<secrets/proxy_id_rsa.pub)" \
"azureServicePrincipalId=$AZURE_SERVICE_PRINCIPAL_ID" \
"vpnCACertificate=$(base64 -w0 <secrets/vpn-ca.crt)" >/dev/null
}

Expand All @@ -84,6 +86,7 @@ deploy_env_dev_override() {
"sshPublicKey=$(<secrets/proxy_id_rsa.pub)" \
"vpnCACertificate=$(base64 -w0 <secrets/vpn-ca.crt)" \
"publicIPAddressSkuName=Basic" \
"azureServicePrincipalId=$AZURE_SERVICE_PRINCIPAL_ID" \
"publicIPAddressAllocationMethod=Dynamic" >/dev/null
}

Expand Down
Loading