adjust upon suggestions

This commit is contained in:
cloudmelon
2020-08-19 23:15:04 +01:00
parent 82b8610b84
commit 6208c50815
5 changed files with 40 additions and 35 deletions
@@ -15,7 +15,7 @@ Using the sample Python script in **aks** folder, you will deploy a Kubernetes c
Using the sample Python script in **offline** folder, you will push the necessary images required for the deployment to your own repository.
## __[Deploy SQL Server big data cluster in private mode with Azure Kubernetes service (AKS) private cluster](private-bdc/)__
## __[Deploy SQL Server big data clusters (BDC) with Azure Kubernetes service (AKS) private cluster](private-aks/)__
Using the sample Python script in **private-bdc** folder, you will Deploy SQL Server big data cluster in private mode with Azure Kubernetes service (AKS) private cluster.
Using the sample Python script in **private-aks** folder, you will Deploy SQL Server big data cluster in private mode with Azure Kubernetes service (AKS) private cluster.
@@ -1,6 +1,6 @@
# Deploy BDC in private AKS cluster with User-defined Route (UDR)
This repository contains the scripts that you can use to deploy a private BDC cluster in Azure Kubernetes Service (AKS) 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.
@@ -8,7 +8,7 @@ This repository contains 3 bash scripts :
- 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.
## Prerequisite
## Prerequisites
The following table lists common big data cluster tools and how to install them:
@@ -1,7 +1,7 @@
#!/bin/bash
# Get password as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox.
#
#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
echo
@@ -14,10 +14,10 @@ while true; do
done
# Create BDC custom profile
#Create BDC custom profile
azdata bdc config init --source aks-dev-test --target private-bdc-aks --force
# Configurations for private BDC deployment
#Configurations for private 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"
@@ -29,12 +29,17 @@ azdata bdc config replace -c private-bdc-aks /bdc.json -j "$.spec.resources.mast
azdata bdc config replace -c private-bdc-aks /bdc.json -j "$.spec.resources.gateway.spec.endpoints[0].serviceType=NodePort"
azdata bdc config replace -c private-bdc-aks /bdc.json -j "$.spec.resources.appproxy.spec.endpoints[0].serviceType=NodePort"
# In case you're deploying BDC in HA mode ( aks-dev-test-ha profile ) please also use the following command
# azdata bdc config replace -c private-bdc-aks /bdc.json -j "$.spec.resources.master.spec.endpoints[1].serviceType= NodePort"
#In case you're deploying BDC in HA mode ( aks-dev-test-ha profile ) please also use the following command
#azdata bdc config replace -c private-bdc-aks /bdc.json -j "$.spec.resources.master.spec.endpoints[1].serviceType= NodePort"
export AZDATA_USERNAME=$bdcadmin
export AZDATA_PASSWORD=$password
export ACCEPT_EULA=yes #accept agreement
azdata bdc create --config-profile private-bdc-aks --accept-eula yes
#Login and get endpoint list for the cluster.
azdata login -n mssql-cluster
azdata bdc endpoint list --output table
@@ -1,7 +1,7 @@
#!/bin/bash
# Get Subscription ID and service principles as input. It is used as default for controller, SQL Server Master instance (sa account) and Knox.
#
#Get Subscription ID and service principles as input. 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
@@ -11,7 +11,7 @@ while true; do
done
# Define a set of environment variables to be used in resource creations.
#Define a set of environment variables to be used in resource creations.
export SUBID=$subscription
@@ -29,10 +29,10 @@ export FWROUTE_NAME=bdcaksroute
export FWROUTE_NAME_INTERNET=bdcaksrouteinet
# Create Azure Resource Group
#Create Azure Resource Group
az group create -n $RESOURCE_GROUP -l $REGION_NAME
# Create Azure Virtual Network to host your AKS cluster
#Create Azure Virtual Network to host your AKS cluster
az network vnet create \
--resource-group $RESOURCE_GROUP \
--location $REGION_NAME \
@@ -49,57 +49,57 @@ SUBNET_ID=$(az network vnet subnet show \
--query id -o tsv)
# Add Azure firewall extension
#Add Azure firewall extension
az extension add --name azure-firewall
# Dedicated subnet for Azure Firewall (Firewall name cannot be changed)
#Dedicated subnet for Azure Firewall (Firewall name cannot be changed)
az network vnet subnet create \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
--name AzureFirewallSubnet \
--address-prefix 10.2.0.0/24
# Create Azure firewall
#Create Azure firewall
az network firewall create -g $RESOURCE_GROUP -n $FWNAME -l $REGION_NAME --enable-dns-proxy true
# Create public IP for Azure Firewall
#Create public IP for Azure Firewall
az network public-ip create -g $RESOURCE_GROUP -n $FWPUBIP -l $REGION_NAME --sku "Standard"
# Create IP configurations for Azure Firewall
#Create IP configurations for Azure Firewall
az network firewall ip-config create -g $RESOURCE_GROUP -f $FWNAME -n $FWIPCONFIG_NAME --public-ip-address $FWPUBIP --vnet-name $VNET_NAME
# Getting public and private IP addresses for Azure Firewall
#Getting public and private IP addresses for Azure Firewall
export FWPUBLIC_IP=$(az network public-ip show -g $RESOURCE_GROUP -n $FWPUBIP --query "ipAddress" -o tsv)
export FWPRIVATE_IP=$(az network firewall show -g $RESOURCE_GROUP -n $FWNAME --query "ipConfigurations[0].privateIpAddress" -o tsv)
## Create an User defined route table
#Create an User defined route table
az network route-table create -g $RESOURCE_GROUP --name $FWROUTE_TABLE_NAME
# Create User defined routes
#Create User defined routes
az network route-table route create -g $RESOURCE_GROUP --name $FWROUTE_NAME --route-table-name $FWROUTE_TABLE_NAME --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address $FWPRIVATE_IP --subscription $SUBID
az network route-table route create -g $RESOURCE_GROUP --name $FWROUTE_NAME_INTERNET --route-table-name $FWROUTE_TABLE_NAME --address-prefix $FWPUBLIC_IP/32 --next-hop-type Internet
# Add FW Network Rules
#Add FW Network Rules
az network firewall network-rule create -g $RESOURCE_GROUP -f $FWNAME --collection-name 'aksfwnr' -n 'apiudp' --protocols 'UDP' --source-addresses '*' --destination-addresses "AzureCloud.$REGION_NAME" --destination-ports 1194 --action allow --priority 100
az network firewall network-rule create -g $RESOURCE_GROUP -f $FWNAME --collection-name 'aksfwnr' -n 'apitcp' --protocols 'TCP' --source-addresses '*' --destination-addresses "AzureCloud.$REGION_NAME" --destination-ports 9000
az network firewall network-rule create -g $RESOURCE_GROUP -f $FWNAME --collection-name 'aksfwnr' -n 'time' --protocols 'UDP' --source-addresses '*' --destination-fqdns 'ntp.ubuntu.com' --destination-ports 123
# Add FW Application Rules
#Add FW Application Rules
az network firewall application-rule create -g $RESOURCE_GROUP -f $FWNAME --collection-name 'aksfwar' -n 'fqdn' --source-addresses '*' --protocols 'http=80' 'https=443' --fqdn-tags "AzureKubernetesService" --action allow --priority 100
# Associate User defined route table (UDR) to AKS cluster where deployed BDC previsouly
#Associate User defined route table (UDR) to AKS cluster where deployed BDC previsouly
az network vnet subnet update -g $RESOURCE_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME --route-table $FWROUTE_TABLE_NAME
# Create SP and Assign Permission to Virtual Network
#Create SP and Assign Permission to Virtual Network
az ad sp create-for-rbac -n "bdcaks-sp" --skip-assignment
@@ -107,16 +107,16 @@ export APPID=$sp_id
export PASSWORD=$sp_pwd
export VNETID=$(az network vnet show -g $RESOURCE_GROUP --name $VNET_NAME --query id -o tsv)
# Assign SP Permission to VNET
#Assign SP Permission to VNET
az role assignment create --assignee $APPID --scope $VNETID --role "Network Contributor"
# Assign SP Permission to route table
#Assign SP Permission to route table
export RTID=$(az network route-table show -g $RESOURCE_GROUP -n $FWROUTE_TABLE_NAME --query id -o tsv)
az role assignment create --assignee $APPID --scope $RTID --role "Network Contributor"
# Create AKS Cluster
#Create AKS Cluster
az aks create \
--resource-group $RESOURCE_GROUP \
--location $REGION_NAME \
@@ -1,6 +1,6 @@
#!/bin/bash
# Define a set of environment variables to be used in resource creations.
#Define a set of environment variables to be used in resource creations.
export REGION_NAME=northeurope
export RESOURCE_GROUP=private-bdc-aks-rg
@@ -9,10 +9,10 @@ export VNET_NAME=bdc-vnet
export AKS_NAME=bdcaksprivatecluster
# Create Azure Resource Group
#Create Azure Resource Group
az group create -n $RESOURCE_GROUP -l $REGION_NAME
# Create Azure Virtual Network to host your AKS clus
#Create Azure Virtual Network to host your AKS clus
az network vnet create \
--resource-group $RESOURCE_GROUP \
--location $REGION_NAME \
@@ -27,7 +27,7 @@ SUBNET_ID=$(az network vnet subnet show \
--name $SUBNET_NAME \
--query id -o tsv)
# Create AKS Cluster
#Create AKS Cluster
az aks create \
--resource-group $RESOURCE_GROUP \
--name $AKS_NAME \