From e9f53b13f279bbbd415d9235af4e6628f5edface Mon Sep 17 00:00:00 2001 From: cloudmelon Date: Thu, 20 Aug 2020 00:10:02 +0100 Subject: [PATCH] adjustment --- .../deployment/private-aks/README.md | 52 +++++++++++++++++-- .../private-aks/scripts/deploy-bdc.sh | 2 +- .../scripts/deploy-private-aks-udr.sh | 13 ++++- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/samples/features/sql-big-data-cluster/deployment/private-aks/README.md b/samples/features/sql-big-data-cluster/deployment/private-aks/README.md index 5659d662..b45f6062 100644 --- a/samples/features/sql-big-data-cluster/deployment/private-aks/README.md +++ b/samples/features/sql-big-data-cluster/deployment/private-aks/README.md @@ -3,13 +3,15 @@ This repository contains the scripts that you can use to deploy a BDC cluster in Azure Kubernetes Service (AKS) private cluster with advanced networking ( CNI ). This repository contains 3 bash scripts : -- deploy-private-aks.sh : You can use it to deploy private AKS cluster with private endpoint, it fits the use case that you need to deploy BDC with a private endpoint with AKS private cluster. -- deploy-private-aks-udr.sh : You can use it to deploy private AKS cluster with private endpoint, it fits the use case that you need to deploy BDC with a private endpoint with AKS private cluster and limit egress traffic with UDR ( User-defined Routes ). -- deploy-private-bdc.sh : You can use it to deploy Big Data Clusters ( BDC ) in private deployment mode on private AKS cluster with or without User-defined routes based on your project requirements. +- **deploy-private-aks.sh** : You can use it to deploy private AKS cluster with private endpoint, it fits the use case that you need to deploy BDC with a private endpoint with AKS private cluster. +- **deploy-private-aks-udr.sh** : You can use it to deploy private AKS cluster with private endpoint, it fits the use case that you need to deploy BDC with a private endpoint with AKS private cluster and limit egress traffic with UDR ( User-defined Routes ). +- **deploy-bdc.sh** : You can use it to deploy Big Data Clusters ( BDC ) in private deployment mode on private AKS cluster with or without User-defined routes based on your project requirements. ## Prerequisites +You can run those scripts on the following client envionrment with Linux OS or WSL/WSL2. + The following table lists common big data cluster tools and how to install them: | Tool | Required | Description | Installation | @@ -29,10 +31,12 @@ The following table lists common big data cluster tools and how to install them: ## Instructions -1. Download the script on the VM you are planning to use for the deployment +### deploy-private-aks.sh + +1. Download the script on the location that you are planning to use for the deployment ``` bash -curl --output setup-bdc.sh https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/private-bdc/ubuntu-single-node-vm/deploy-private-aks.sh +curl --output setup-bdc.sh https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh ``` 2. Make the script executable @@ -47,5 +51,43 @@ chmod +x deploy-private-aks.sh sudo ./deploy-private-aks.sh ``` +### deploy-private-aks-udr.sh +1. Download the script on the location that you are planning to use for the deployment + +``` bash +curl --output setup-bdc.sh https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh +``` + +2. Make the script executable + +``` bash +chmod +x deploy-private-aks-udr.sh +``` + +3. Run the script (make sure you are running with sudo) + +``` bash +sudo ./deploy-private-aks-udr.sh +``` + +### deploy-bdc.sh + +1. Download the script on the location that you are planning to use for the deployment + +``` bash +curl --output setup-bdc.sh https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh +``` + +2. Make the script executable + +``` bash +chmod +x deploy-bdc.sh +``` + +3. Run the script (make sure you are running with sudo) + +``` bash +sudo ./deploy-bdc.sh +``` diff --git a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh index 38d0aad9..4f56ddb7 100644 --- a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh +++ b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh @@ -17,7 +17,7 @@ done #Create BDC custom profile azdata bdc config init --source aks-dev-test --target private-bdc-aks --force -#Configurations for private BDC deployment +#Configurations for BDC deployment azdata bdc config replace -c private-bdc-aks/control.json -j "$.spec.docker.imageTag=2019-CU6-ubuntu-16.04" azdata bdc config replace -c private-bdc-aks/control.json -j "$.spec.storage.data.className=default" azdata bdc config replace -c private-bdc-aks/control.json -j "$.spec.storage.logs.className=default" diff --git a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh index 76ce79f2..11302b4e 100644 --- a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh +++ b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh @@ -8,6 +8,10 @@ while true; do read -s -p "Your service principles ID: " sp_id echo read -s -p "Your service principles Password: " sp_pwd + echo + read -s -p "Your Resource Group Name: " resourcegroup + echo + read -s -p "In which region you're deploying " region done @@ -15,8 +19,8 @@ done export SUBID=$subscription -export REGION_NAME=northeurope -export RESOURCE_GROUP=private-bdc-rg +export REGION_NAME=$region +export RESOURCE_GROUP=$resourcegroup export SUBNET_NAME=aks-subnet export VNET_NAME=bdc-vnet export AKS_NAME=bdcaksprivatecluster @@ -28,6 +32,8 @@ export FWROUTE_TABLE_NAME=bdcaks-rt export FWROUTE_NAME=bdcaksroute export FWROUTE_NAME_INTERNET=bdcaksrouteinet +#Set Azure subscription current in use +az account set --subscription $subscription #Create Azure Resource Group az group create -n $RESOURCE_GROUP -l $REGION_NAME @@ -134,3 +140,6 @@ az aks create \ --node-vm-size Standard_D13_v2 \ --node-count 2 \ --generate-ssh-keys + + +