Skip to content

Commit 6c5d9ab

Browse files
Updates for CTP3.0
1 parent 40e1ff4 commit 6c5d9ab

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

samples/features/sql-big-data-cluster/deployment/aks/deploy-sql-big-data-aks.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
#
4545
DOCKER_REGISTRY="private-repo.microsoft.com"
4646
DOCKER_REPOSITORY="mssql-private-preview"
47-
DOCKER_IMAGE_TAG="ctp2.5"
47+
DOCKER_IMAGE_TAG="ctp3.0"
4848

4949
print ('Setting environment variables')
5050
os.environ['MSSQL_SA_PASSWORD'] = PASSWORD
5151
os.environ['CONTROLLER_USERNAME'] = CONTROLLER_USERNAME
5252
os.environ['CONTROLLER_PASSWORD'] = PASSWORD
5353
os.environ['KNOX_PASSWORD'] = PASSWORD
54-
os.environ['DOCKER_REGISTRY'] = DOCKER_REGISTRY
55-
os.environ['DOCKER_REPOSITORY'] = DOCKER_REPOSITORY
5654
os.environ['DOCKER_USERNAME']=DOCKER_USERNAME
5755
os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD
58-
os.environ['DOCKER_IMAGE_TAG']=DOCKER_IMAGE_TAG
5956
os.environ['DOCKER_IMAGE_POLICY']="IfNotPresent"
6057

6158
print ("Set azure context to subcription: "+SUBSCRIPTION_ID)
@@ -67,20 +64,27 @@ def executeCmd (cmd):
6764
executeCmd (command)
6865

6966
print("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"
7168
executeCmd (command)
7269

7370
command = "az aks get-credentials --overwrite-existing --name "+CLUSTER_NAME+" --resource-group "+GROUP_NAME+" --admin"
7471
executeCmd (command)
7572

7673
print("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"
7875
executeCmd (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 + ""
8178
executeCmd (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"
8488
executeCmd (command)
8589

8690
print("")

0 commit comments

Comments
 (0)