Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Created September 16, 2020 16:55
Show Gist options
  • Save jsturtevant/3c8aad1ba5463d13b5909e968e07e5ad to your computer and use it in GitHub Desktop.
Save jsturtevant/3c8aad1ba5463d13b5909e968e07e5ad to your computer and use it in GitHub Desktop.
deploy aks-engine

Fill in values in setup.sh Run deploy-aks-engine.sh passing in simple-docker-windows.json:

deploy-aks-engine.sh ~/simple-windows.json
#!/bin/bash
set -e -u -o pipefail
MODEL=${1:?provide model path}
modelname=$(basename $MODEL .json | sed 's/windows/win/g')
group=test-${modelname}-${RANDOM}
(
${ACS_ENGINE_PATH}aks-engine deploy -m $MODEL \
-l $DEPLOY_REGION \
-g $group\
--auth-method client_secret \
--client-id $AZURE_CLIENT_ID \
--client-secret $AZURE_CLIENT_SECRET \
--dns-prefix $group \
--subscription-id $AZURE_SUBSCRIPTION_ID \
--set windowsProfile.adminPassword=$PASS \
--output-directory ${OUTPUT_DIR}/$group \
-f
)
echo "Use the following: "
echo "ssh -i ~/out/$group/azureuser_rsa azureuser@$group.$DEPLOY_REGION.cloudapp.azure.com"
echo "kubectl --kubeconfig ~/out/$group/kubeconfig/kubeconfig.$DEPLOY_REGION.json get nodes"
export DEPLOY_REGION=westus2
export OUTPUT_DIR=~/out
export ACS_ENGINE_PATH=~/projects/aks-engine/bin/
export AZURE_SUBSCRIPTION_ID=
export AZURE_CLIENT_ID=
export AZURE_CLIENT_SECRET=
export AZURE_TENANT_ID=
export PASS=changeMe!
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.19",
"orchestratorVersion": "1.19.0"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D16s_v3"
},
"agentPoolProfiles": [
{
"name": "agentwin",
"count": 1,
"vmSize": "Standard_D16s_v3",
"osType": "Windows"
},
{
"name": "agentlinux",
"count": 1,
"vmSize": "Standard_D2_v3"
}
],
"windowsProfile": {
"adminUsername": "azureuser",
"adminPassword": "replacepassword1234$",
"enableAutomaticUpdates": false,
"sshEnabled": true,
"windowsPublisher": "microsoft-aks",
"windowsOffer": "aks-windows",
"windowsSku": "2019-datacenter-core-smalldisk-2008",
"imageVersion": "latest"
},
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
},
"servicePrincipalProfile": {
"clientId": "",
"secret": ""
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment