Skip to content

Commit 70e6496

Browse files
Updates for CTP2.5
1 parent d6b9c3e commit 70e6496

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

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

Lines changed: 18 additions & 11 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.4/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/ctp-2.5/mssqlctl/requirements.txt )
55
#
66
# Run `az login` at least once BEFORE running this script
77
#
@@ -33,16 +33,18 @@ def executeCmd (cmd):
3333
AZURE_REGION=input("Provide Azure region - Press ENTER for using `westus`:") or "westus"
3434
VM_SIZE=input("Provide VM size for the AKS cluster - Press ENTER for using `Standard_L8s`:") or "Standard_L8s"
3535
AKS_NODE_COUNT=input("Provide number of worker nodes for AKS cluster - Press ENTER for using `1`:") or "1"
36+
3637
#This is both Kubernetes cluster name and SQL Big Data cluster name
3738
CLUSTER_NAME=input("Provide name of AKS cluster and SQL big data cluster - Press ENTER for using `sqlbigdata`:") or "sqlbigdata"
39+
3840
#This password will be use for Controller user, Knox user and SQL Server Master SA accounts
3941
PASSWORD=input("Provide password to be used for Controller user, Knox user and SQL Server Master SA accounts - Press ENTER for using `MySQLBigData2019`:") or "MySQLBigData2019"
4042
CONTROLLER_USERNAME=input("Provide username to be used for Controller user - Press ENTER for using `admin`:") or "admin"
4143

4244
#
4345
DOCKER_REGISTRY="private-repo.microsoft.com"
4446
DOCKER_REPOSITORY="mssql-private-preview"
45-
DOCKER_IMAGE_TAG="ctp2.4"
47+
DOCKER_IMAGE_TAG="ctp2.5"
4648

4749
print ('Setting environment variables')
4850
os.environ['MSSQL_SA_PASSWORD'] = PASSWORD
@@ -53,13 +55,8 @@ def executeCmd (cmd):
5355
os.environ['DOCKER_REPOSITORY'] = DOCKER_REPOSITORY
5456
os.environ['DOCKER_USERNAME']=DOCKER_USERNAME
5557
os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD
56-
os.environ['DOCKER_EMAIL']=DOCKER_USERNAME
5758
os.environ['DOCKER_IMAGE_TAG']=DOCKER_IMAGE_TAG
5859
os.environ['DOCKER_IMAGE_POLICY']="IfNotPresent"
59-
os.environ['DOCKER_PRIVATE_REGISTRY']="1"
60-
os.environ['CLUSTER_PLATFORM']="aks"
61-
os.environ['ACCEPT_EULA']="yes"
62-
os.environ['STORAGE_SIZE']="10Gi"
6360

6461
print ("Set azure context to subcription: "+SUBSCRIPTION_ID)
6562
command = "az account set -s "+ SUBSCRIPTION_ID
@@ -77,20 +74,30 @@ def executeCmd (cmd):
7774
executeCmd (command)
7875

7976
print("Creating SQL Big Data cluster:" +CLUSTER_NAME)
80-
command="mssqlctl cluster create --name "+CLUSTER_NAME
77+
command="mssqlctl cluster config init --src aks-dev-test.json --target custom.json"
78+
executeCmd (command)
79+
80+
command="mssqlctl cluster config section set --config-file custom.json --json-values ""metadata.name=" + CLUSTER_NAME + ""
81+
executeCmd (command)
82+
83+
command="mssqlctl cluster create --config-file custom.json --accept-eula yes"
8184
executeCmd (command)
8285

8386
print("")
8487
print("SQL Server big data cluster connection endpoints: ")
88+
8589
print("SQL Server master instance:")
86-
command="kubectl get service endpoint-master-pool -o=custom-columns=""IP:.status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
90+
command="kubectl get service master-svc-external -o=custom-columns=""IP:.status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
8791
executeCmd(command)
92+
8893
print("")
8994
print("HDFS/KNOX:")
90-
command="kubectl get service endpoint-security -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
95+
command="kubectl get service gateway-svc-external -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
9196
executeCmd(command)
97+
9298
print("")
9399
print("Cluster administration portal (https://<ip>:<port>):")
94-
command="kubectl get service endpoint-service-proxy -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
100+
command="kubectl get service mgmtproxy-svc-external -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME
95101
executeCmd(command)
102+
96103
print("")

0 commit comments

Comments
 (0)