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 15540ee5..5dc27b56 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 @@ -1,18 +1,20 @@ -# Deploy BDC in private AKS cluster with User-defined Route (UDR) +# Deploy BDC in private AKS cluster with Advanced Networking (CNI) 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-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 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 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. **Note** : Please use this scripts in the Azure VM which manages your AKS private cluster. ## Prerequisites -You can run those scripts on the following client envionrment with Linux OS or WSL/WSL2. +You can run those scripts on the following client environment with Linux OS or WSL/WSL2. -The following table link listed common big data cluster tools and how to install them: +The following link listed common big data cluster tools and how to install them: https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-big-data-tools?view=sql-server-ver15 @@ -24,7 +26,7 @@ https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-big-data-tools?view 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.sh +curl --output deploy-private-aks.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 @@ -44,7 +46,7 @@ sudo ./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-aks/scripts/deploy-private-aks-udr.sh +curl --output deploy-private-aks-udr.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 @@ -61,10 +63,11 @@ 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 +curl --output deploy-bdc 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 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 043bc80f..21c5160c 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 @@ -3,7 +3,7 @@ #Get password as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox. # while true; do - read -s -p "Create Admin username for Big Data Cluster: " bdcadmin + read -p "Create Admin username for Big Data Cluster: " bdcadmin echo read -s -p "Create Password for Big Data Cluster: " password echo 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 0ea137c8..13fb8085 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 @@ -1,17 +1,19 @@ #!/bin/bash #Get Subscription ID and Azure service principal as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox. +## +#You can also create service principal instead of using an existing one +#az ad sp create-for-rbac -n "bdcaks-sp" --skip-assignment # -while true; do - read -s -p "Your Azure Subscription: " subscription - echo - read -s -p "Your Resource Group Name: " resourcegroup - echo - read -s -p "In which region you're deploying: " region - echo - read -s -p "Your Azure service principal ID: " sp_id - echo - read -s -p "Your Azure service principal Password: " sp_pwd -done +read -p "Your Azure Subscription: " subscription +echo +read -p "Your Resource Group Name: " resourcegroup +echo +read -p "In which region you're deploying: " region +echo +read -p "Your Azure service principal ID: " sp_id +echo +read -p "Your Azure service principal Password: " sp_pwd + #Define a set of environment variables to be used in resource creations. export SUBID=$subscription @@ -60,7 +62,7 @@ az network vnet subnet create \ --resource-group $RESOURCE_GROUP \ --vnet-name $VNET_NAME \ --name AzureFirewallSubnet \ - --address-prefix 10.2.0.0/24 + --address-prefix 10.3.0.0/24 #Create Azure firewall az network firewall create -g $RESOURCE_GROUP -n $FWNAME -l $REGION_NAME --enable-dns-proxy true @@ -101,8 +103,6 @@ az network vnet subnet update -g $RESOURCE_GROUP --vnet-name $VNET_NAME --name $ #Create SP and Assign Permission to Virtual Network -az ad sp create-for-rbac -n "bdcaks-sp" --skip-assignment - export APPID=$sp_id export PASSWORD=$sp_pwd export VNETID=$(az network vnet show -g $RESOURCE_GROUP --name $VNET_NAME --query id -o tsv) @@ -135,4 +135,4 @@ az aks create \ --generate-ssh-keys - +az aks get-credentials -g $RESOURCE_GROUP -n $AKS_NAME diff --git a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh index e5a492e4..addb4b21 100644 --- a/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh +++ b/samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh @@ -5,14 +5,14 @@ #!/bin/bash #Get Subscription ID and resource groups. It is used as default for controller, SQL Server Master instance (sa account) and Knox. # -while true; do - read -s -p "Your Azure Subscription: " subscription - echo - read -s -p "Your Resource Group Name: " resourcegroup - echo - read -s -p "In which region you're deploying " region - echo -done + +read -p "Your Azure Subscription: " subscription +echo +read -p "Your Resource Group Name: " resourcegroup +echo +read -p "In which region you're deploying: " region +echo + #Define a set of environment variables to be used in resource creations. export SUBID=$subscription @@ -58,3 +58,5 @@ az aks create \ --node-vm-size Standard_D13_v2 \ --node-count 2 \ --generate-ssh-keys + +az aks get-credentials -g $RESOURCE_GROUP -n $AKS_NAME