Updates for CTP3.0

This commit is contained in:
Mihaela Blendea
2019-05-21 19:31:05 -07:00
committed by GitHub
parent 40e1ff4362
commit 6c5d9abbda
@@ -1,7 +1,7 @@
#
# Prerequisites:
#
# 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 )
# 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 )
#
# Run `az login` at least once BEFORE running this script
#
@@ -44,18 +44,15 @@ CONTROLLER_USERNAME=input("Provide username to be used for Controller user - Pre
#
DOCKER_REGISTRY="private-repo.microsoft.com"
DOCKER_REPOSITORY="mssql-private-preview"
DOCKER_IMAGE_TAG="ctp2.5"
DOCKER_IMAGE_TAG="ctp3.0"
print ('Setting environment variables')
os.environ['MSSQL_SA_PASSWORD'] = PASSWORD
os.environ['CONTROLLER_USERNAME'] = CONTROLLER_USERNAME
os.environ['CONTROLLER_PASSWORD'] = PASSWORD
os.environ['KNOX_PASSWORD'] = PASSWORD
os.environ['DOCKER_REGISTRY'] = DOCKER_REGISTRY
os.environ['DOCKER_REPOSITORY'] = DOCKER_REPOSITORY
os.environ['DOCKER_USERNAME']=DOCKER_USERNAME
os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD
os.environ['DOCKER_IMAGE_TAG']=DOCKER_IMAGE_TAG
os.environ['DOCKER_IMAGE_POLICY']="IfNotPresent"
print ("Set azure context to subcription: "+SUBSCRIPTION_ID)
@@ -67,20 +64,27 @@ command="az group create --name "+GROUP_NAME+" --location "+AZURE_REGION
executeCmd (command)
print("Creating AKS cluster: "+CLUSTER_NAME)
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"
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"
executeCmd (command)
command = "az aks get-credentials --overwrite-existing --name "+CLUSTER_NAME+" --resource-group "+GROUP_NAME+" --admin"
executeCmd (command)
print("Creating SQL Big Data cluster:" +CLUSTER_NAME)
command="mssqlctl cluster config init --src aks-dev-test.json --target custom.json"
command="mssqlctl cluster config init --src aks-dev-test.json --target custom.json --force"
executeCmd (command)
command="mssqlctl cluster config section set --config-file custom.json --json-values ""metadata.name=" + CLUSTER_NAME + ""
command="mssqlctl cluster config section set -c custom.json -j ""metadata.name=" + CLUSTER_NAME + ""
executeCmd (command)
command="mssqlctl cluster create --config-file custom.json --accept-eula yes"
command="mssqlctl cluster config section set -c custom.json -j ""$.spec.controlPlane.spec.docker.registry=" + DOCKER_REGISTRY + ""
executeCmd (command)
command="mssqlctl cluster config section set -c custom.json -j ""$.spec.controlPlane.spec.docker.repository=" + DOCKER_REPOSITORY + ""
executeCmd (command)
command="mssqlctl cluster config section set -c custom.json -j ""$.spec.controlPlane.spec.docker.imageTag=" + DOCKER_IMAGE_TAG + ""
executeCmd (command)
command="mssqlctl cluster create -c custom.json --accept-eula yes"
executeCmd (command)
print("")