Skip to content

Commit c8b7594

Browse files
Updates for CTP3.2
1 parent 394045b commit c8b7594

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

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

Lines changed: 22 additions & 18 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/ctp3.1/mssqlctl/requirements.txt)
4+
# Azure CLI (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), python3 (https://www.python.org/downloads), azdata CLI (pip3 install -r https://aka.ms/azdata)
55
#
66
# Run `az login` at least once BEFORE running this script
77
#
@@ -38,21 +38,24 @@ def executeCmd (cmd):
3838
CLUSTER_NAME=input("Provide name of AKS cluster and SQL big data cluster - Press ENTER for using `sqlbigdata`:").strip() or "sqlbigdata"
3939

4040
#This password will be use for Controller user, Knox user and SQL Server Master SA accounts
41+
#
4142
CONTROLLER_USERNAME=input("Provide username to be used for Controller user - Press ENTER for using `admin`:").strip() or "admin"
4243
PASSWORD = getpass.getpass("Provide password to be used for Controller user, Knox user and SQL Server Master SA accounts - Press ENTER for using `MySQLBigData2019`").strip() or "MySQLBigData2019"
4344

44-
#docker registry details
45-
DOCKER_REGISTRY="private-repo.microsoft.com"
46-
DOCKER_REPOSITORY="mssql-private-preview"
47-
DOCKER_IMAGE_TAG="ctp3.1"
45+
# Docker registry details
46+
# Use this only if you are using a private registry different than mcr. If so, make sure you are also setting the environment variables for DOCKER_USERNAME and DOCKER_PASSWORD
47+
# DOCKER_REGISTRY="<your private registry>"
48+
# DOCKER_REPOSITORY="<your private repository>"
49+
# DOCKER_IMAGE_TAG="<your Docker image tag>"
4850

4951
print ('Setting environment variables')
5052
os.environ['MSSQL_SA_PASSWORD'] = PASSWORD
5153
os.environ['CONTROLLER_USERNAME'] = CONTROLLER_USERNAME
5254
os.environ['CONTROLLER_PASSWORD'] = PASSWORD
5355
os.environ['KNOX_PASSWORD'] = PASSWORD
54-
os.environ['DOCKER_USERNAME']=DOCKER_USERNAME
55-
os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD
56+
# Use this only if you are using a private registry different than mcr. If so, you must set the environment variables for DOCKER_USERNAME and DOCKER_PASSWORD
57+
# os.environ['DOCKER_USERNAME']=DOCKER_USERNAME
58+
# os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD
5659
os.environ['ACCEPT_EULA']="Yes"
5760

5861
print ("Set azure context to subcription: "+SUBSCRIPTION_ID)
@@ -71,29 +74,30 @@ def executeCmd (cmd):
7174
executeCmd (command)
7275

7376
print("Creating SQL Big Data cluster:" +CLUSTER_NAME)
74-
command="mssqlctl bdc config init --source aks-dev-test --target custom --force"
77+
command="azdata bdc config init --source aks-dev-test --target custom --force"
7578
executeCmd (command)
7679

77-
command="mssqlctl bdc config section set -c custom -j ""metadata.name=" + CLUSTER_NAME + ""
80+
command="azdata bdc config section set -c custom -j ""metadata.name=" + CLUSTER_NAME + ""
7881
executeCmd (command)
7982

80-
command="mssqlctl bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.registry=" + DOCKER_REGISTRY + ""
81-
executeCmd (command)
83+
# Use this only if you are using a private registry different than default Micrososft registry (mcr).
84+
# command="azdata bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.registry=" + DOCKER_REGISTRY + ""
85+
# executeCmd (command)
8286

83-
command="mssqlctl bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.repository=" + DOCKER_REPOSITORY + ""
84-
executeCmd (command)
87+
# command="azdata bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.repository=" + DOCKER_REPOSITORY + ""
88+
# executeCmd (command)
8589

86-
command="mssqlctl bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.imageTag=" + DOCKER_IMAGE_TAG + ""
87-
executeCmd (command)
90+
# command="azdata bdc config section set -c custom -j ""$.spec.controlPlane.spec.docker.imageTag=" + DOCKER_IMAGE_TAG + ""
91+
# executeCmd (command)
8892

89-
command="mssqlctl bdc create -c custom --accept-eula yes"
93+
command="azdata bdc create -c custom --accept-eula yes"
9094
executeCmd (command)
9195

92-
command="mssqlctl login --cluster-name " + CLUSTER_NAME
96+
command="azdata login --cluster-name " + CLUSTER_NAME
9397
executeCmd (command)
9498

9599
print("")
96100
print("SQL Server big data cluster endpoints: ")
97-
command="mssqlctl bdc endpoint list -o table"
101+
command="azdata bdc endpoint list -o table"
98102
executeCmd(command)
99103

0 commit comments

Comments
 (0)