deploy BDC wizard improvement for CU1 (#7756)

* unified admin user account (#7485)

* azdata changes

* spaces

* error message

* comments

* support AD authentication for bdc deployment (#7518)

* enable ad authentication

* remove export for internal interface

* add comments

* more changes after testing

* update notebooks

* escape slash

* more comments

* Update deploy-bdc-aks.ipynb

* Update deploy-bdc-existing-aks.ipynb

* Update deploy-bdc-existing-kubeadm.ipynb

* AD changes and review feedback (#7618)

* enable ad authentication

* remove export for internal interface

* add comments

* more changes after testing

* update notebooks

* escape slash

* more comments

* Update deploy-bdc-aks.ipynb

* Update deploy-bdc-existing-aks.ipynb

* Update deploy-bdc-existing-kubeadm.ipynb

* address comments from scenario review (#7546)

* support AD authentication for bdc deployment (#7518)

* enable ad authentication

* remove export for internal interface

* add comments

* more changes after testing

* update notebooks

* escape slash

* more comments

* Update deploy-bdc-aks.ipynb

* Update deploy-bdc-existing-aks.ipynb

* Update deploy-bdc-existing-kubeadm.ipynb

* scenario review feedbacks

* more fixes

* adjust the display order of resource types

* different way to implement left side buttons

* revert unwanted changes

* rename variable

* more fixes for the scenario review feedback (#7589)

* fix more issues

* add help links

* model view readonly text with links

* fix size string

* address comments

* update notebooks

* text update

* address the feedback of 2nd round of deploy BDC wizard review (#7646)

* 2nd review meeting comments

* fix the unit test failure

* recent changes in azdata

* notebook background execution with azdata (#7741)

* notebook background execution with azdata

* prompt to open notebook in case of failure

* fix path quote issue

* better temp file handling

* expose docker settings (#7751)

* add docker settings

* new icon for container image
This commit is contained in:
Alan Ren
2019-10-16 20:41:15 -07:00
committed by GitHub
parent 5d4da455bd
commit 2ab7a47353
40 changed files with 2019 additions and 730 deletions

View File

@@ -0,0 +1,273 @@
{
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"pygments_lexer": "ipython3",
"nbconvert_exporter": "python",
"file_extension": ".py"
}
},
"nbformat_minor": 2,
"nbformat": 4,
"cells": [
{
"cell_type": "markdown",
"source": [
"![Microsoft](https://raw.githubusercontent.com/microsoft/azuredatastudio/master/src/sql/media/microsoft-small-logo.png)\n",
" \n",
"## Create Azure Kubernetes Service cluster and deploy SQL Server 2019 Big Data Cluster\n",
" \n",
"This notebook walks through the process of creating a new Azure Kubernetes Service cluster first, and then deploys a <a href=\"https://docs.microsoft.com/sql/big-data-cluster/big-data-cluster-overview?view=sqlallproducts-allversions\">SQL Server 2019 Big Data Cluster</a> on the newly created AKS cluster."
],
"metadata": {
"azdata_cell_guid": "4f6bc3bc-3592-420a-b534-384011189005"
}
},
{
"cell_type": "code",
"source": [
"import json,sys,os\n",
"def run_command(command):\n",
" print(\"Executing: \" + command)\n",
" !{command}\n",
" if _exit_code != 0:\n",
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
" print(f'Successfully executed: {command}')"
],
"metadata": {
"azdata_cell_guid": "326645cf-022a-47f2-8aff-37de71da8955",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "8716915b-1439-431b-ab0a-0221ef94cb7f"
}
},
{
"cell_type": "markdown",
"source": [
"### **Set password**"
],
"metadata": {
"azdata_cell_guid": "b083aa8d-990c-4170-ba1d-247ba5c6ae76"
}
},
{
"cell_type": "code",
"source": [
"mssql_password = os.environ[\"AZDATA_NB_VAR_BDC_ADMIN_PASSWORD\"]"
],
"metadata": {
"azdata_cell_guid": "de256ddd-b835-4eb6-8cfc-c1a6239b0726"
},
"outputs": [],
"execution_count": 0
},
{
"cell_type": "markdown",
"source": [
"### **Login to Azure**\n",
"\n",
"This will open a web browser window to enable credentials to be entered. If this cells is hanging forever, it might be because your Web browser windows is waiting for you to enter your Azure credentials!\n",
""
],
"metadata": {
"azdata_cell_guid": "baddf2d9-93ee-4c42-aaf1-b42116bb1912"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'az login')"
],
"metadata": {
"azdata_cell_guid": "8f1404a6-216d-49fb-b6ad-81beeea50083",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 5
},
{
"cell_type": "markdown",
"source": [
"\n",
"### **Set active Azure subscription**"
],
"metadata": {
"azdata_cell_guid": "230dc0f1-bf6e-474a-bfaa-aae6f8aad12e"
}
},
{
"cell_type": "code",
"source": [
"if azure_subscription_id != \"\":\n",
" run_command(f'az account set --subscription {azure_subscription_id}')\n",
"else:\n",
" print('Using the default Azure subscription', {azure_subscription_id})\n",
"run_command(f'az account show')"
],
"metadata": {
"azdata_cell_guid": "ab230931-2e99-483b-a229-3847684a8c1c",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
},
{
"cell_type": "markdown",
"source": [
"### **Create Azure resource group**"
],
"metadata": {
"azdata_cell_guid": "d51db914-f484-489f-990d-72edb3065068"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'az group create --name {azure_resource_group} --location {azure_region}')"
],
"metadata": {
"azdata_cell_guid": "7c53eb23-c327-41bf-8936-bd34a02ebdd5",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
},
{
"cell_type": "markdown",
"source": [
"### **Create AKS cluster**"
],
"metadata": {
"azdata_cell_guid": "818eb705-71e2-4013-8420-44886a5468b2"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'az aks create --name {aks_cluster_name} --resource-group {azure_resource_group} --generate-ssh-keys --node-vm-size {azure_vm_size} --node-count {azure_vm_count}')"
],
"metadata": {
"azdata_cell_guid": "3cea1da0-0c18-4030-a5aa-79bc98a5a14d",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 8
},
{
"cell_type": "markdown",
"source": [
"### **Set the new AKS cluster as current context**"
],
"metadata": {
"azdata_cell_guid": "5ade8453-5e71-478f-b6b6-83c55626243d"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'az aks get-credentials --resource-group {azure_resource_group} --name {aks_cluster_name} --admin --overwrite-existing')"
],
"metadata": {
"azdata_cell_guid": "9ccb9adf-1cf6-4dcb-8bd9-7ae9a85c2437",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 9
},
{
"cell_type": "markdown",
"source": [
"### **Create deployment configuration files**"
],
"metadata": {
"azdata_cell_guid": "57eb69fb-c68f-4ba8-818d-ffbaa0bc7aec"
}
},
{
"cell_type": "code",
"source": [
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
"bdcJsonObj = json.loads(bdc_json)\n",
"controlJsonObj = json.loads(control_json)\n",
"bdcJsonFile = open(f'{mssql_target_profile}/bdc.json', 'w')\n",
"bdcJsonFile.write(json.dumps(bdcJsonObj, indent = 4))\n",
"bdcJsonFile.close()\n",
"controlJsonFile = open(f'{mssql_target_profile}/control.json', 'w')\n",
"controlJsonFile.write(json.dumps(controlJsonObj, indent = 4))\n",
"controlJsonFile.close()\n",
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "3fd73c04-8a79-4d08-9049-1dad30265558",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 10
},
{
"cell_type": "markdown",
"source": [
"### **Create SQL Server 2019 Big Data Cluster**"
],
"metadata": {
"azdata_cell_guid": "6e82fad8-0fd0-4952-87ce-3fea1edd98cb"
}
},
{
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"if os.name == 'nt':\n",
" print(f'If you don\\'t see output produced by azdata, you can run the following command in a terminal window to check the deployment status:\\n\\tkubectl get pods -n {mssql_cluster_name} ')\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "c43ea026-ca5e-4e2a-8602-fcc786354168",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 11
}
]
}

View File

@@ -0,0 +1,170 @@
{
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"pygments_lexer": "ipython3",
"nbconvert_exporter": "python",
"file_extension": ".py"
}
},
"nbformat_minor": 2,
"nbformat": 4,
"cells": [
{
"cell_type": "markdown",
"source": [
"![Microsoft](https://raw.githubusercontent.com/microsoft/azuredatastudio/master/src/sql/media/microsoft-small-logo.png)\n",
" \n",
"## Deploy SQL Server 2019 Big Data Cluster on an existing Azure Kubernetes Service (AKS) cluster\n",
" \n",
"This notebook walks through the process of deploying a <a href=\"https://docs.microsoft.com/sql/big-data-cluster/big-data-cluster-overview?view=sqlallproducts-allversions\">SQL Server 2019 Big Data Cluster</a> on an existing AKS cluster."
],
"metadata": {
"azdata_cell_guid": "82e60c1a-7acf-47ee-877f-9e85e92e11da"
}
},
{
"cell_type": "code",
"source": [
"import json,sys,os\n",
"def run_command(command):\n",
" print(\"Executing: \" + command)\n",
" !{command}\n",
" if _exit_code != 0:\n",
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
" print(f'Successfully executed: {command}')"
],
"metadata": {
"azdata_cell_guid": "d973d5b4-7f0a-4a9d-b204-a16480f3940d",
"tags": []
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "4b266b2d-bd1b-4565-92c9-3fc146cdce6d"
}
},
{
"cell_type": "markdown",
"source": [
"### **Set password**"
],
"metadata": {
"azdata_cell_guid": "7c37d248-b9ac-4ad6-be56-158cd70443b1"
}
},
{
"cell_type": "code",
"source": [
"mssql_password = os.environ[\"AZDATA_NB_VAR_BDC_ADMIN_PASSWORD\"]"
],
"metadata": {
"azdata_cell_guid": "83d455f3-db10-48bb-bb81-78a6b4e5f2fd"
},
"outputs": [],
"execution_count": 0
},
{
"cell_type": "markdown",
"source": [
"### **Set and show current context**"
],
"metadata": {
"azdata_cell_guid": "127c8042-181f-4862-a390-96e59c181d09"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'kubectl config use-context {mssql_cluster_context}')\n",
"run_command('kubectl config current-context')"
],
"metadata": {
"azdata_cell_guid": "7d1a03d4-1df8-48eb-bff0-0042603b95b1",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 0
},
{
"cell_type": "markdown",
"source": [
"### **Create deployment configuration files**"
],
"metadata": {
"azdata_cell_guid": "138536c3-1db6-428f-9e5c-8269a02fb52e"
}
},
{
"cell_type": "code",
"source": [
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
"bdcJsonObj = json.loads(bdc_json)\n",
"controlJsonObj = json.loads(control_json)\n",
"bdcJsonFile = open(f'{mssql_target_profile}/bdc.json', 'w')\n",
"bdcJsonFile.write(json.dumps(bdcJsonObj, indent = 4))\n",
"bdcJsonFile.close()\n",
"controlJsonFile = open(f'{mssql_target_profile}/control.json', 'w')\n",
"controlJsonFile.write(json.dumps(controlJsonObj, indent = 4))\n",
"controlJsonFile.close()\n",
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "2ff82c8a-4bce-449c-9d91-3ac7dd272021",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
},
{
"cell_type": "markdown",
"source": [
"### **Create SQL Server 2019 Big Data Cluster**"
],
"metadata": {
"azdata_cell_guid": "efe78cd3-ed73-4c9b-b586-fdd6c07dd37f"
}
},
{
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "373947a1-90b9-49ee-86f4-17a4c7d4ca76",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
}
]
}

View File

@@ -0,0 +1,182 @@
{
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"pygments_lexer": "ipython3",
"nbconvert_exporter": "python",
"file_extension": ".py"
}
},
"nbformat_minor": 2,
"nbformat": 4,
"cells": [
{
"cell_type": "markdown",
"source": [
"![Microsoft](https://raw.githubusercontent.com/microsoft/azuredatastudio/master/src/sql/media/microsoft-small-logo.png)\n",
" \n",
"## Deploy SQL Server 2019 Big Data Cluster on an existing cluster deployed using kubeadm\n",
" \n",
"This notebook walks through the process of deploying a <a href=\"https://docs.microsoft.com/sql/big-data-cluster/big-data-cluster-overview?view=sqlallproducts-allversions\">SQL Server 2019 Big Data Cluster</a> on an existing kubeadm cluster."
],
"metadata": {
"azdata_cell_guid": "23954d96-3932-4a8e-ab73-da605f99b1a4"
}
},
{
"cell_type": "code",
"source": [
"import json,sys,os\n",
"def run_command(command):\n",
" print(\"Executing: \" + command)\n",
" !{command}\n",
" if _exit_code != 0:\n",
" sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{command}\\n')\n",
" print(f'Successfully executed: {command}')"
],
"metadata": {
"azdata_cell_guid": "26fa8bc4-4b8e-4c31-ae11-50484821cea8",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "e70640d0-6059-4cab-939e-e985a978c0da"
}
},
{
"cell_type": "markdown",
"source": [
"### **Set password**"
],
"metadata": {
"azdata_cell_guid": "7b383b0d-5687-45b3-a16f-ba3b170c796e"
}
},
{
"cell_type": "code",
"source": [
"mssql_password = os.environ[\"AZDATA_NB_VAR_BDC_ADMIN_PASSWORD\"]\n",
"if mssql_auth_mode == \"ad\":\n",
" mssql_domain_service_account_password = os.environ[\"AZDATA_NB_VAR_BDC_AD_DOMAIN_SVC_PASSWORD\"]"
],
"metadata": {
"azdata_cell_guid": "b5970f2b-cf13-41af-b0a2-5133d840325e",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 3
},
{
"cell_type": "markdown",
"source": [
"### **Set and show current context**"
],
"metadata": {
"azdata_cell_guid": "6456bd0c-5b64-4d76-be59-e3a5b32697f5"
}
},
{
"cell_type": "code",
"source": [
"run_command(f'kubectl config use-context {mssql_cluster_context}')\n",
"run_command('kubectl config current-context')"
],
"metadata": {
"azdata_cell_guid": "a38f8b3a-f93a-484c-b9e2-4eba3ed99cc2",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 0
},
{
"cell_type": "markdown",
"source": [
"### **Create deployment configuration files**"
],
"metadata": {
"azdata_cell_guid": "6d78da36-6af5-4309-baad-bc81bb2cdb7f"
}
},
{
"cell_type": "code",
"source": [
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
"bdcJsonObj = json.loads(bdc_json)\n",
"controlJsonObj = json.loads(control_json)\n",
"bdcJsonFile = open(f'{mssql_target_profile}/bdc.json', 'w')\n",
"bdcJsonFile.write(json.dumps(bdcJsonObj, indent = 4))\n",
"bdcJsonFile.close()\n",
"controlJsonFile = open(f'{mssql_target_profile}/control.json', 'w')\n",
"controlJsonFile.write(json.dumps(controlJsonObj, indent = 4))\n",
"controlJsonFile.close()\n",
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "3110ab23-ecfc-4e36-a1c5-28536b7edebf",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
},
{
"cell_type": "markdown",
"source": [
"### **Create SQL Server 2019 Big Data Cluster**"
],
"metadata": {
"azdata_cell_guid": "7d56d262-8cd5-49e4-b745-332c6e7a3cb2"
}
},
{
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"if mssql_auth_mode == \"ad\":\n",
" os.environ[\"DOMAIN_SERVICE_ACCOUNT_USERNAME\"] = mssql_domain_service_account_username\n",
" os.environ[\"DOMAIN_SERVICE_ACCOUNT_PASSWORD\"] = mssql_domain_service_account_password\n",
"if os.name == 'nt':\n",
" print(f'If you don\\'t see output produced by azdata, you can run the following command in a terminal window to check the deployment status:\\n\\tkubectl get pods -n {mssql_cluster_name} ')\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "0a743e88-e7d0-4b41-b8a3-e43985d15f2b",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
}
]
}

View File

@@ -6,7 +6,7 @@
},
"language_info": {
"name": "python",
"version": "3.7.3",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
@@ -85,11 +85,24 @@
"run_command('az --version')"
],
"metadata": {
"azdata_cell_guid": "326645cf-022a-47f2-8aff-37de71da8955"
"azdata_cell_guid": "326645cf-022a-47f2-8aff-37de71da8955",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "8716915b-1439-431b-ab0a-0221ef94cb7f"
}
},
{
"cell_type": "markdown",
"source": [
@@ -115,21 +128,14 @@
"print('You can also use the controller password to access Knox and SQL Server.')"
],
"metadata": {
"azdata_cell_guid": "17e5d087-7128-4d02-8c16-fe1ddee675e5"
"azdata_cell_guid": "17e5d087-7128-4d02-8c16-fe1ddee675e5",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 2
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "4945bace-a50a-4e58-b55c-e9736106f805"
}
},
{
"cell_type": "markdown",
"source": [
@@ -148,7 +154,10 @@
"run_command(f'az login')"
],
"metadata": {
"azdata_cell_guid": "8f1404a6-216d-49fb-b6ad-81beeea50083"
"azdata_cell_guid": "8f1404a6-216d-49fb-b6ad-81beeea50083",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 5
@@ -173,7 +182,10 @@
"run_command(f'az account show')"
],
"metadata": {
"azdata_cell_guid": "ab230931-2e99-483b-a229-3847684a8c1c"
"azdata_cell_guid": "ab230931-2e99-483b-a229-3847684a8c1c",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
@@ -193,7 +205,10 @@
"run_command(f'az group create --name {azure_resource_group} --location {azure_region}')"
],
"metadata": {
"azdata_cell_guid": "7c53eb23-c327-41bf-8936-bd34a02ebdd5"
"azdata_cell_guid": "7c53eb23-c327-41bf-8936-bd34a02ebdd5",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
@@ -213,7 +228,10 @@
"run_command(f'az aks create --name {aks_cluster_name} --resource-group {azure_resource_group} --generate-ssh-keys --node-vm-size {azure_vm_size} --node-count {azure_vm_count}')"
],
"metadata": {
"azdata_cell_guid": "3cea1da0-0c18-4030-a5aa-79bc98a5a14d"
"azdata_cell_guid": "3cea1da0-0c18-4030-a5aa-79bc98a5a14d",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 8
@@ -233,7 +251,10 @@
"run_command(f'az aks get-credentials --resource-group {azure_resource_group} --name {aks_cluster_name} --admin --overwrite-existing')"
],
"metadata": {
"azdata_cell_guid": "9ccb9adf-1cf6-4dcb-8bd9-7ae9a85c2437"
"azdata_cell_guid": "9ccb9adf-1cf6-4dcb-8bd9-7ae9a85c2437",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 9
@@ -250,7 +271,6 @@
{
"cell_type": "code",
"source": [
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
@@ -265,7 +285,10 @@
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "3fd73c04-8a79-4d08-9049-1dad30265558"
"azdata_cell_guid": "3fd73c04-8a79-4d08-9049-1dad30265558",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 10
@@ -283,14 +306,18 @@
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"CONTROLLER_USERNAME\"] = mssql_controller_username\n",
"os.environ[\"CONTROLLER_PASSWORD\"] = mssql_password\n",
"os.environ[\"MSSQL_SA_PASSWORD\"] = mssql_password\n",
"os.environ[\"KNOX_PASSWORD\"] = mssql_password\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"if os.name == 'nt':\n",
" print(f'If you don\\'t see output produced by azdata, you can run the following command in a terminal window to check the deployment status:\\n\\tkubectl get pods -n {mssql_cluster_name} ')\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "c43ea026-ca5e-4e2a-8602-fcc786354168"
"azdata_cell_guid": "c43ea026-ca5e-4e2a-8602-fcc786354168",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 11
@@ -307,10 +334,13 @@
{
"cell_type": "code",
"source": [
"run_command(f'azdata login --cluster-name {mssql_cluster_name}')"
"run_command(f'azdata login -n {mssql_cluster_name}')"
],
"metadata": {
"azdata_cell_guid": "5120c387-1088-435b-856e-e59f147c45a2"
"azdata_cell_guid": "5120c387-1088-435b-856e-e59f147c45a2",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 12
@@ -337,7 +367,10 @@
"display(HTML(endpointsDataFrame.to_html(index=False, render_links=True)))"
],
"metadata": {
"azdata_cell_guid": "9a5d0aef-a8da-4845-b470-d714435f0304"
"azdata_cell_guid": "9a5d0aef-a8da-4845-b470-d714435f0304",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 13
@@ -357,16 +390,19 @@
"source": [
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":' + json.dumps(mssql_username) + ',\"password\":' + json.dumps(mssql_password) + '}'\n",
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
"else:\n",
" sys.exit('Could not find the SQL Server Master instance endpoint.')"
],
"metadata": {
"azdata_cell_guid": "1c9d1f2c-62ba-4070-920a-d30b67bdcc7c"
"azdata_cell_guid": "1c9d1f2c-62ba-4070-920a-d30b67bdcc7c",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 14
}
]
}
}

View File

@@ -6,7 +6,7 @@
},
"language_info": {
"name": "python",
"version": "3.7.3",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
@@ -83,11 +83,24 @@
"run_command('azdata --version')"
],
"metadata": {
"azdata_cell_guid": "d973d5b4-7f0a-4a9d-b204-a16480f3940d"
"azdata_cell_guid": "d973d5b4-7f0a-4a9d-b204-a16480f3940d",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "4b266b2d-bd1b-4565-92c9-3fc146cdce6d"
}
},
{
"cell_type": "markdown",
"source": [
@@ -113,21 +126,14 @@
"print('You can also use the controller password to access Knox and SQL Server.')"
],
"metadata": {
"azdata_cell_guid": "e7e10828-6cae-45af-8c2f-1484b6d4f9ac"
"azdata_cell_guid": "e7e10828-6cae-45af-8c2f-1484b6d4f9ac",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 3
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "c009edfe-b964-4b28-beeb-02a2c65f9918"
}
},
{
"cell_type": "markdown",
"source": [
@@ -144,7 +150,10 @@
"run_command('kubectl config current-context')"
],
"metadata": {
"azdata_cell_guid": "7d1a03d4-1df8-48eb-bff0-0042603b95b1"
"azdata_cell_guid": "7d1a03d4-1df8-48eb-bff0-0042603b95b1",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 0
@@ -161,7 +170,6 @@
{
"cell_type": "code",
"source": [
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
@@ -176,7 +184,10 @@
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "2ff82c8a-4bce-449c-9d91-3ac7dd272021"
"azdata_cell_guid": "2ff82c8a-4bce-449c-9d91-3ac7dd272021",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
@@ -194,14 +205,18 @@
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"CONTROLLER_USERNAME\"] = mssql_controller_username\n",
"os.environ[\"CONTROLLER_PASSWORD\"] = mssql_password\n",
"os.environ[\"MSSQL_SA_PASSWORD\"] = mssql_password\n",
"os.environ[\"KNOX_PASSWORD\"] = mssql_password\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"if os.name == 'nt':\n",
" print(f'If you don\\'t see output produced by azdata, you can run the following command in a terminal window to check the deployment status:\\n\\tkubectl get pods -n {mssql_cluster_name} ')\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "373947a1-90b9-49ee-86f4-17a4c7d4ca76"
"azdata_cell_guid": "373947a1-90b9-49ee-86f4-17a4c7d4ca76",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
@@ -218,10 +233,13 @@
{
"cell_type": "code",
"source": [
"run_command(f'azdata login --cluster-name {mssql_cluster_name}')"
"run_command(f'azdata login -n {mssql_cluster_name}')"
],
"metadata": {
"azdata_cell_guid": "79adda27-371d-4dcb-b867-db025f8162a5"
"azdata_cell_guid": "79adda27-371d-4dcb-b867-db025f8162a5",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 8
@@ -248,7 +266,10 @@
"display(HTML(endpointsDataFrame.to_html(index=False, render_links=True)))"
],
"metadata": {
"azdata_cell_guid": "a2202494-fd6c-4534-987d-15c403a5096f"
"azdata_cell_guid": "a2202494-fd6c-4534-987d-15c403a5096f",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 9
@@ -268,16 +289,19 @@
"source": [
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":' + json.dumps(mssql_username) + ',\"password\":' + json.dumps(mssql_password) + '}'\n",
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
"else:\n",
" sys.exit('Could not find the SQL Server Master instance endpoint')"
" sys.exit('Could not find the SQL Server Master instance endpoint.')"
],
"metadata": {
"azdata_cell_guid": "48342355-9d2b-4fa6-b1aa-3bc77d434dfa"
"azdata_cell_guid": "48342355-9d2b-4fa6-b1aa-3bc77d434dfa",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 10
}
]
}
}

View File

@@ -6,7 +6,7 @@
},
"language_info": {
"name": "python",
"version": "3.7.3",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
@@ -83,11 +83,24 @@
"run_command('azdata --version')"
],
"metadata": {
"azdata_cell_guid": "26fa8bc4-4b8e-4c31-ae11-50484821cea8"
"azdata_cell_guid": "26fa8bc4-4b8e-4c31-ae11-50484821cea8",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "e70640d0-6059-4cab-939e-e985a978c0da"
}
},
{
"cell_type": "markdown",
"source": [
@@ -103,6 +116,8 @@
"invoked_by_wizard = \"AZDATA_NB_VAR_BDC_ADMIN_PASSWORD\" in os.environ\n",
"if invoked_by_wizard:\n",
" mssql_password = os.environ[\"AZDATA_NB_VAR_BDC_ADMIN_PASSWORD\"]\n",
" if mssql_auth_mode == \"ad\":\n",
" mssql_domain_service_account_password = os.environ[\"AZDATA_NB_VAR_BDC_AD_DOMAIN_SVC_PASSWORD\"]\n",
"else:\n",
" mssql_password = getpass.getpass(prompt = 'SQL Server 2019 Big Data Cluster controller password')\n",
" if mssql_password == \"\":\n",
@@ -110,24 +125,21 @@
" confirm_password = getpass.getpass(prompt = 'Confirm password')\n",
" if mssql_password != confirm_password:\n",
" sys.exit(f'Passwords do not match.')\n",
" if mssql_auth_mode == \"ad\":\n",
" mssql_domain_service_account_password = getpass.getpass(prompt = 'Domain service account password')\n",
" if mssql_domain_service_account_password == \"\":\n",
" sys.exit(f'Domain service account password is required.')\n",
"print('You can also use the controller password to access Knox and SQL Server.')"
],
"metadata": {
"azdata_cell_guid": "b5970f2b-cf13-41af-b0a2-5133d840325e"
"azdata_cell_guid": "b5970f2b-cf13-41af-b0a2-5133d840325e",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 3
},
{
"cell_type": "markdown",
"source": [
"### **Set variables**\n",
"Generated by Azure Data Studio using the values collected in the Deploy Big Data Cluster wizard"
],
"metadata": {
"azdata_cell_guid": "1d28aac5-955d-4b15-8b9c-8d6ec2b588fe"
}
},
{
"cell_type": "markdown",
"source": [
@@ -161,7 +173,6 @@
{
"cell_type": "code",
"source": [
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"mssql_target_profile = 'ads-bdc-custom-profile'\n",
"if not os.path.exists(mssql_target_profile):\n",
" os.mkdir(mssql_target_profile)\n",
@@ -176,7 +187,10 @@
"print(f'Created deployment configuration folder: {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "3110ab23-ecfc-4e36-a1c5-28536b7edebf"
"azdata_cell_guid": "3110ab23-ecfc-4e36-a1c5-28536b7edebf",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 6
@@ -194,14 +208,21 @@
"cell_type": "code",
"source": [
"print (f'Creating SQL Server 2019 Big Data Cluster: {mssql_cluster_name} using configuration {mssql_target_profile}')\n",
"os.environ[\"CONTROLLER_USERNAME\"] = mssql_controller_username\n",
"os.environ[\"CONTROLLER_PASSWORD\"] = mssql_password\n",
"os.environ[\"MSSQL_SA_PASSWORD\"] = mssql_password\n",
"os.environ[\"KNOX_PASSWORD\"] = mssql_password\n",
"os.environ[\"ACCEPT_EULA\"] = 'yes'\n",
"os.environ[\"AZDATA_USERNAME\"] = mssql_username\n",
"os.environ[\"AZDATA_PASSWORD\"] = mssql_password\n",
"if mssql_auth_mode == \"ad\":\n",
" os.environ[\"DOMAIN_SERVICE_ACCOUNT_USERNAME\"] = mssql_domain_service_account_username\n",
" os.environ[\"DOMAIN_SERVICE_ACCOUNT_PASSWORD\"] = mssql_domain_service_account_password\n",
"if os.name == 'nt':\n",
" print(f'If you don\\'t see output produced by azdata, you can run the following command in a terminal window to check the deployment status:\\n\\tkubectl get pods -n {mssql_cluster_name} ')\n",
"run_command(f'azdata bdc create -c {mssql_target_profile}')"
],
"metadata": {
"azdata_cell_guid": "0a743e88-e7d0-4b41-b8a3-e43985d15f2b"
"azdata_cell_guid": "0a743e88-e7d0-4b41-b8a3-e43985d15f2b",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 7
@@ -218,10 +239,13 @@
{
"cell_type": "code",
"source": [
"run_command(f'azdata login --cluster-name {mssql_cluster_name}')"
"run_command(f'azdata login -n {mssql_cluster_name}')"
],
"metadata": {
"azdata_cell_guid": "3a49909b-e09e-4e62-a825-c39de2cffc94"
"azdata_cell_guid": "3a49909b-e09e-4e62-a825-c39de2cffc94",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 8
@@ -248,7 +272,10 @@
"display(HTML(endpointsDataFrame.to_html(index=False, render_links=True)))"
],
"metadata": {
"azdata_cell_guid": "2a8c8d5d-862c-4672-9309-38aa03afc4e6"
"azdata_cell_guid": "2a8c8d5d-862c-4672-9309-38aa03afc4e6",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 9
@@ -268,16 +295,19 @@
"source": [
"sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\n",
"if sqlEndpoints and len(sqlEndpoints) == 1:\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\n",
" connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":' + json.dumps(mssql_username) + ',\"password\":' + json.dumps(mssql_password) + '}'\n",
" display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server Master instance</font></a><br/>'))\n",
"else:\n",
" sys.exit('Could not find the SQL Server Master instance endpoint')"
" sys.exit('Could not find the SQL Server Master instance endpoint.')"
],
"metadata": {
"azdata_cell_guid": "d591785d-71aa-4c5d-9cbb-a7da79bca503"
"azdata_cell_guid": "d591785d-71aa-4c5d-9cbb-a7da79bca503",
"tags": [
"hide_input"
]
},
"outputs": [],
"execution_count": 10
}
]
}
}