Skip to content

Commit c1645fc

Browse files
authored
Merge pull request #812 from cloudmelon/master
Update the automation scripts
2 parents 8906510 + bf645f4 commit c1645fc

File tree

4 files changed

+38
-33
lines changed

4 files changed

+38
-33
lines changed

samples/features/sql-big-data-cluster/deployment/private-aks/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
# Deploy BDC in private AKS cluster with User-defined Route (UDR)
1+
# Deploy BDC in private AKS cluster with Advanced Networking (CNI)
22

33
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 ).
44

55
This repository contains 3 bash scripts :
6-
- **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.
7-
- **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 ).
8-
- **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.
6+
- **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.
7+
8+
- **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 ).
9+
10+
- **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.
911

1012

1113
## Prerequisites
1214

13-
You can run those scripts on the following client envionrment with Linux OS or WSL/WSL2.
15+
You can run those scripts on the following client environment with Linux OS or WSL/WSL2.
1416

15-
The following table link listed common big data cluster tools and how to install them:
17+
The following link listed common big data cluster tools and how to install them:
1618

1719
https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-big-data-tools?view=sql-server-ver15
1820

@@ -24,7 +26,7 @@ https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-big-data-tools?view
2426
1. Download the script on the location that you are planning to use for the deployment
2527

2628
``` bash
27-
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
29+
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
2830
```
2931

3032
2. Make the script executable
@@ -44,7 +46,7 @@ sudo ./deploy-private-aks.sh
4446
1. Download the script on the location that you are planning to use for the deployment
4547

4648
``` bash
47-
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
49+
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
4850
```
4951

5052
2. Make the script executable
@@ -61,10 +63,11 @@ sudo ./deploy-private-aks-udr.sh
6163

6264
### deploy-bdc.sh
6365

66+
6467
1. Download the script on the location that you are planning to use for the deployment
6568

6669
``` bash
67-
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
70+
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
6871
```
6972

7073
2. Make the script executable

samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-bdc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#Get password as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox.
44
#
55
while true; do
6-
read -s -p "Create Admin username for Big Data Cluster: " bdcadmin
6+
read -p "Create Admin username for Big Data Cluster: " bdcadmin
77
echo
88
read -s -p "Create Password for Big Data Cluster: " password
99
echo

samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks-udr.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
#!/bin/bash
22
#Get Subscription ID and Azure service principal as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox.
3+
##
4+
#You can also create service principal instead of using an existing one
5+
#az ad sp create-for-rbac -n "bdcaks-sp" --skip-assignment
36
#
4-
while true; do
5-
read -s -p "Your Azure Subscription: " subscription
6-
echo
7-
read -s -p "Your Resource Group Name: " resourcegroup
8-
echo
9-
read -s -p "In which region you're deploying: " region
10-
echo
11-
read -s -p "Your Azure service principal ID: " sp_id
12-
echo
13-
read -s -p "Your Azure service principal Password: " sp_pwd
14-
done
7+
read -p "Your Azure Subscription: " subscription
8+
echo
9+
read -p "Your Resource Group Name: " resourcegroup
10+
echo
11+
read -p "In which region you're deploying: " region
12+
echo
13+
read -p "Your Azure service principal ID: " sp_id
14+
echo
15+
read -p "Your Azure service principal Password: " sp_pwd
16+
1517

1618
#Define a set of environment variables to be used in resource creations.
1719
export SUBID=$subscription
@@ -60,7 +62,7 @@ az network vnet subnet create \
6062
--resource-group $RESOURCE_GROUP \
6163
--vnet-name $VNET_NAME \
6264
--name AzureFirewallSubnet \
63-
--address-prefix 10.2.0.0/24
65+
--address-prefix 10.3.0.0/24
6466

6567
#Create Azure firewall
6668
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 $
101103

102104

103105
#Create SP and Assign Permission to Virtual Network
104-
az ad sp create-for-rbac -n "bdcaks-sp" --skip-assignment
105-
106106
export APPID=$sp_id
107107
export PASSWORD=$sp_pwd
108108
export VNETID=$(az network vnet show -g $RESOURCE_GROUP --name $VNET_NAME --query id -o tsv)
@@ -135,4 +135,4 @@ az aks create \
135135
--generate-ssh-keys
136136

137137

138-
138+
az aks get-credentials -g $RESOURCE_GROUP -n $AKS_NAME

samples/features/sql-big-data-cluster/deployment/private-aks/scripts/deploy-private-aks.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
#!/bin/bash
66
#Get Subscription ID and resource groups. It is used as default for controller, SQL Server Master instance (sa account) and Knox.
77
#
8-
while true; do
9-
read -s -p "Your Azure Subscription: " subscription
10-
echo
11-
read -s -p "Your Resource Group Name: " resourcegroup
12-
echo
13-
read -s -p "In which region you're deploying " region
14-
echo
15-
done
8+
9+
read -p "Your Azure Subscription: " subscription
10+
echo
11+
read -p "Your Resource Group Name: " resourcegroup
12+
echo
13+
read -p "In which region you're deploying: " region
14+
echo
15+
1616

1717
#Define a set of environment variables to be used in resource creations.
1818
export SUBID=$subscription
@@ -58,3 +58,5 @@ az aks create \
5858
--node-vm-size Standard_D13_v2 \
5959
--node-count 2 \
6060
--generate-ssh-keys
61+
62+
az aks get-credentials -g $RESOURCE_GROUP -n $AKS_NAME

0 commit comments

Comments
 (0)