11#
22# Prerequisites:
33#
4- # Azure CLI (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), python3 (https://www.python.org/downloads), mssqlctl CLI (pip3 install -r https://private-repo.microsoft.com/python/ctp-2.5 /mssqlctl/requirements.txt )
4+ # Azure CLI (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), python3 (https://www.python.org/downloads), mssqlctl CLI (pip3 install -r https://private-repo.microsoft.com/python/ctp3.0 /mssqlctl/requirements.txt )
55#
66# Run `az login` at least once BEFORE running this script
77#
@@ -44,18 +44,15 @@ def executeCmd (cmd):
4444#
4545DOCKER_REGISTRY = "private-repo.microsoft.com"
4646DOCKER_REPOSITORY = "mssql-private-preview"
47- DOCKER_IMAGE_TAG = "ctp2.5 "
47+ DOCKER_IMAGE_TAG = "ctp3.0 "
4848
4949print ('Setting environment variables' )
5050os .environ ['MSSQL_SA_PASSWORD' ] = PASSWORD
5151os .environ ['CONTROLLER_USERNAME' ] = CONTROLLER_USERNAME
5252os .environ ['CONTROLLER_PASSWORD' ] = PASSWORD
5353os .environ ['KNOX_PASSWORD' ] = PASSWORD
54- os .environ ['DOCKER_REGISTRY' ] = DOCKER_REGISTRY
55- os .environ ['DOCKER_REPOSITORY' ] = DOCKER_REPOSITORY
5654os .environ ['DOCKER_USERNAME' ]= DOCKER_USERNAME
5755os .environ ['DOCKER_PASSWORD' ]= DOCKER_PASSWORD
58- os .environ ['DOCKER_IMAGE_TAG' ]= DOCKER_IMAGE_TAG
5956os .environ ['DOCKER_IMAGE_POLICY' ]= "IfNotPresent"
6057
6158print ("Set azure context to subcription: " + SUBSCRIPTION_ID )
@@ -67,20 +64,27 @@ def executeCmd (cmd):
6764executeCmd (command )
6865
6966print ("Creating AKS cluster: " + CLUSTER_NAME )
70- command = "az aks create --name " + CLUSTER_NAME + " --resource-group " + GROUP_NAME + " --generate-ssh-keys --node-vm-size " + VM_SIZE + " --node-count " + AKS_NODE_COUNT + " --kubernetes-version 1.12.6 "
67+ command = "az aks create --name " + CLUSTER_NAME + " --resource-group " + GROUP_NAME + " --generate-ssh-keys --node-vm-size " + VM_SIZE + " --node-count " + AKS_NODE_COUNT + " --kubernetes-version 1.12.8 "
7168executeCmd (command )
7269
7370command = "az aks get-credentials --overwrite-existing --name " + CLUSTER_NAME + " --resource-group " + GROUP_NAME + " --admin"
7471executeCmd (command )
7572
7673print ("Creating SQL Big Data cluster:" + CLUSTER_NAME )
77- command = "mssqlctl cluster config init --src aks-dev-test.json --target custom.json"
74+ command = "mssqlctl cluster config init --src aks-dev-test.json --target custom.json --force "
7875executeCmd (command )
7976
80- command = "mssqlctl cluster config section set --config-file custom.json --json-values " "metadata.name=" + CLUSTER_NAME + ""
77+ command = "mssqlctl cluster config section set -c custom.json -j " "metadata.name=" + CLUSTER_NAME + ""
8178executeCmd (command )
8279
83- command = "mssqlctl cluster create --config-file custom.json --accept-eula yes"
80+ command = "mssqlctl cluster config section set -c custom.json -j " "$.spec.controlPlane.spec.docker.registry=" + DOCKER_REGISTRY + ""
81+ executeCmd (command )
82+ command = "mssqlctl cluster config section set -c custom.json -j " "$.spec.controlPlane.spec.docker.repository=" + DOCKER_REPOSITORY + ""
83+ executeCmd (command )
84+ command = "mssqlctl cluster config section set -c custom.json -j " "$.spec.controlPlane.spec.docker.imageTag=" + DOCKER_IMAGE_TAG + ""
85+ executeCmd (command )
86+
87+ command = "mssqlctl cluster create -c custom.json --accept-eula yes"
8488executeCmd (command )
8589
8690print ("" )
0 commit comments