diff --git a/samples/features/sql-big-data-cluster/app-deploy/RollDice/roll-dice.R b/samples/features/sql-big-data-cluster/app-deploy/RollDice/roll-dice.R index f0e2002c..3c7dc182 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/RollDice/roll-dice.R +++ b/samples/features/sql-big-data-cluster/app-deploy/RollDice/roll-dice.R @@ -7,17 +7,22 @@ ##################################################### ##################################################### #install.packages("TeachingDemos") - +# Note if you choose > 10 as the number of dice the app fails as it is not able to handle Null or N/A which are the default lables for the colors rollEm <- function(numDice = 2) + { -list.of.packages <- c("TeachingDemos") -new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] -if(length(new.packages)) install.packages(new.packages) + if (numDice < 11) + { + list.of.packages <- c("TeachingDemos") + new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] + if(length(new.packages)) install.packages(new.packages) library(TeachingDemos) - - r<-dice(ndice = numDice) - return(as.data.frame(r)) + r<-dice(ndice = numDice) + return(as.data.frame(r)) + } + else {"Oops we have not quite figued this out... number of dice need to be less than or equal to 10!"} } + result<-rollEm(x) diff --git a/samples/features/sql-big-data-cluster/deployment/aks/README.md b/samples/features/sql-big-data-cluster/deployment/aks/README.md index dbb6578d..a07d5c41 100644 --- a/samples/features/sql-big-data-cluster/deployment/aks/README.md +++ b/samples/features/sql-big-data-cluster/deployment/aks/README.md @@ -18,7 +18,7 @@ Using this sample Python script, you will deploy a Kubernetes cluster in Azure u ``` - Install mssqlctl CLI latest version using . Run the command below using elevated priviledges (sudo or admin cmd window): ``` - pip3 install --extra-index-url https://private-repo.microsoft.com/python/ctp-2.2 mssqlctl + pip3 install -r https://private-repo.microsoft.com/python/ctp-2.3/mssqlctl/requirements.txt ``` 1. Login into your Azure account. Run this command: ``` diff --git a/samples/features/sql-big-data-cluster/deployment/aks/deploy-sql-big-data-aks.py b/samples/features/sql-big-data-cluster/deployment/aks/deploy-sql-big-data-aks.py index 3f9ab628..5fdbc201 100644 --- a/samples/features/sql-big-data-cluster/deployment/aks/deploy-sql-big-data-aks.py +++ b/samples/features/sql-big-data-cluster/deployment/aks/deploy-sql-big-data-aks.py @@ -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 --index-url https://private-repo.microsoft.com/python/ctp-2.0 mssqlctl ) +# 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.3/mssqlctl/requirements.txt ) # # Run `az login` at least once BEFORE running this script # @@ -58,7 +58,7 @@ os.environ['DOCKER_IMAGE_TAG']=DOCKER_IMAGE_TAG os.environ['DOCKER_IMAGE_POLICY']="IfNotPresent" os.environ['DOCKER_PRIVATE_REGISTRY']="1" os.environ['CLUSTER_PLATFORM']="aks" -os.environ['ACCEPT_EULA']="Y" +os.environ['ACCEPT_EULA']="yes" print ("Set azure context to subcription: "+SUBSCRIPTION_ID) command = "az account set -s "+ SUBSCRIPTION_ID @@ -72,11 +72,11 @@ 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.10.9" executeCmd (command) -command = "az aks get-credentials --name "+CLUSTER_NAME+" --resource-group "+GROUP_NAME+" --admin" +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 create cluster "+CLUSTER_NAME +command="mssqlctl cluster create --name "+CLUSTER_NAME executeCmd (command) print("") @@ -86,10 +86,10 @@ command="kubectl get service endpoint-master-pool -o=custom-columns=""IP:.status executeCmd(command) print("") print("HDFS/KNOX:") -command="kubectl get service service-security-lb -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME +command="kubectl get service endpoint-security -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME executeCmd(command) print("") print("Cluster administration portal (https://:):") -command="kubectl get service service-proxy-lb -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME +command="kubectl get service endpoint-service-proxy -o=custom-columns=""IP:status.loadBalancer.ingress[0].ip,PORT:.spec.ports[0].port"" -n "+CLUSTER_NAME executeCmd(command) print("")