mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
update the notebooks for the new release (#6451)
* get ready for new release * azdata * header update * comments * update text * remove kubernetes version option
This commit is contained in:
@@ -1,214 +0,0 @@
|
||||
{
|
||||
"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": "\n\n## Create Azure Kubernetes Service cluster and deploy SQL Server 2019 big data cluster\n\nThis notebook walks through the process of deploying a SQL Server 2019 big data cluster on Azure Kubernetes Service.\n\n* Please follow the instructions in the **Dependencies** cell to install the dependencies.\n* The **Required information** cell will prompt you for the required information to create a SQL Server 2019 big data cluster.\n* We have included some default settings in the **Azure settings** cell of this Notebook, Please review the default values and make changes accordingly.\n* If you are experiencing issue in the *Create AKS cluster* step you might need to re-run the cell, more information: https://docs.microsoft.com/en-us/azure/aks/kubernetes-service-principal#specify-a-service-principal-for-an-aks-cluster. \n\n",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Dependencies**\n<table>\n<colgroup>\n<col style=\"width: 10%\" />\n<col style=\"width: 80%\" />\n<col style=\"width: 10%\" />\n</colgroup>\n<thead>\n<tr class=\"header\">\n<th>Tool</th>\n<th>Description</th>\n<th>Installation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Azure CLI</strong></td>\n<td>Command-line interface for managing Azure services. Used with AKS big data cluster deployments (<a href=\"https://docs.microsoft.com/cli/azure/?view=azure-cli-latest\">More info</a>).</td>\n<td><a href=\"https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest\">Install</a></td>\n</tr>\n<tr>\n<td><strong>kubectl</strong></td>\n<td>Command-line tool for monitoring the underlying Kuberentes cluster (<a href=\"https://kubernetes.io/docs/tasks/tools/install-kubectl/\">More info</a>).</td>\n<td><a href=\"https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-using-native-package-management\">Install</a></td>\n</tr>\n<tr>\n<td><strong>mssqlctl</strong></td>\n<td>Command-line tool for installing and managing a big data cluster.</td>\n<td><a href=\"https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions\">Install</a></td>\n</tr>\n</tbody>\n</table>\n<p>",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Check dependencies**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "#Run command helper function\r\ndef run_command():\r\n print(\"Executing: \" + cmd)\r\n !{cmd}\r\n if _exit_code != 0:\r\n raise SystemExit(f'Shell command:\\n\\n\\t{cmd}\\n\\nreturned non-zero exit code: ' + str(_exit_code) + '.\\n')\r\n print(f'Successfully executed: {cmd}')\r\n\r\ncmd = 'az --version'\r\nrun_command()\r\ncmd = 'kubectl version --client=true'\r\nrun_command()\r\ncmd = 'mssqlctl --version'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Required information**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import getpass\ndef get_user_input(input_name, is_password = False, confirm_password = False):\n if is_password:\n user_input = getpass.getpass(prompt = input_name)\n if confirm_password:\n user_input_confirm = getpass.getpass(prompt = 'Confirm '+ input_name)\n if user_input != user_input_confirm:\n raise SystemExit(f'{input_name} does not match the confirmation password')\n print(f'{input_name}: ******')\n else:\n user_input = input(input_name)\n print(input_name + ': ' + user_input)\n if user_input == \"\":\n raise SystemExit(f'{input_name} is required')\n return user_input;\n\nmssql_cluster_name = get_user_input('Cluster name')\nbdc_controller_username = get_user_input('Controller username')\nbdc_password = get_user_input('Controller password', True, True)\nprint('Knox and SQL Server will use the same password')\ndocker_username = get_user_input('Docker username')\ndocker_password = get_user_input('Docker password', True)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Azure settings**\n*Subscription ID*: visit <a href=\"https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade\">here</a> to find out the subscriptions you can use, if you leave it unspecified, the default subscription will be used.\n\n*VM Size*: visit <a href=\"https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes\">here</a> to find out the available VM sizes you could use. \n \n*Region*: visit <a href=\"https://azure.microsoft.com/en-us/global-infrastructure/services/?products=kubernetes-service\">here</a> to find out the Azure regions where the Azure Kubernettes Service is available.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "azure_subscription_id = \"\"\nazure_vm_size = \"Standard_E4s_v3\"\nazure_region = \"eastus\"\nazure_vm_count = int(5)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Default settings**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "azure_resource_group = mssql_cluster_name\naks_kubernetes_version = ''\naks_cluster_name = mssql_cluster_name\nmssqlctl_configuration_profile = 'aks-dev-test'\nmssqlctl_configuration_file = 'mssql-bdc-configuration'\n\n# Show parameter values\nprint('')\nprint(f'mssql_cluster_name = {mssql_cluster_name}')\nprint(f'azure_subscription_id = {azure_subscription_id}')\nprint(f'azure_vm_size = {azure_vm_size}')\nprint(f'azure_vm_count = {str(azure_vm_count)}')\nprint(f'azure_region = {azure_region}')\nprint(f'azure_resource_group = {azure_resource_group}')\nprint(f'aks_kubernetes_version = {aks_kubernetes_version}')\nprint(f'aks_cluster_name = {aks_cluster_name}')\nprint(f'docker_username = {docker_username}')\nprint(f'mssqlctl_configuration_profile = {mssqlctl_configuration_profile}')\nprint(f'mssqlctl_configuration_file = {mssqlctl_configuration_file}')\nprint(f'bdc_controller_username = {bdc_controller_username}')\nprint('')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to Azure**\n\nThis 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": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az login'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 5
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "\n### **Set active Azure subscription**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "if azure_subscription_id != \"\":\n cmd = f'az account set --subscription {azure_subscription_id}'\n run_command()\nelse:\n print('Using the default Azure subscription', {azure_subscription_id})\ncmd = f'az account show'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create Azure resource group**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az group create --name {azure_resource_group} --location {azure_region}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create AKS cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "if aks_kubernetes_version != \"\":\n kubernetes_version_option=\"--kubernetes-version {aks_kubernetes_version}\"\nelse:\n kubernetes_version_option = \"\"\ncmd = 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} {kubernetes_version_option}' \nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Set the new AKS cluster as current context**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az aks get-credentials --resource-group {azure_resource_group} --name {aks_cluster_name} --admin --overwrite-existing'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 9
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **List the MSSQLCTL configuration profiles**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nos.environ[\"ACCEPT_EULA\"] = 'yes'\ncmd = f'mssqlctl bdc config list'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 10
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create a MSSQLCTL configuration file**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "# Create a configuration file\ncmd = f'mssqlctl bdc config init --source {mssqlctl_configuration_profile} --target {mssqlctl_configuration_file} --force'\nrun_command()\n\n# Set the 'big data cluster' name\njsonPath = '\"metadata.name=''{0}''\"'.format(mssql_cluster_name)\ncmd = f'mssqlctl bdc config section set -c {mssqlctl_configuration_file} -j {jsonPath}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 11
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nprint (f'Creating SQL Server 2019 big data cluster: {mssql_cluster_name} using configuration file {mssqlctl_configuration_file}')\nos.environ[\"CONTROLLER_USERNAME\"] = bdc_controller_username\nos.environ[\"CONTROLLER_PASSWORD\"] = bdc_password\nos.environ[\"MSSQL_SA_PASSWORD\"] = bdc_password\nos.environ[\"KNOX_PASSWORD\"] = bdc_password\nos.environ[\"DOCKER_USERNAME\"] = docker_username\nos.environ[\"DOCKER_PASSWORD\"] = docker_password\n\ncmd = f'mssqlctl bdc create -c {mssqlctl_configuration_file} --accept-eula yes'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 12
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'mssqlctl login --cluster-name {mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 13
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show SQL Server 2019 big data cluster endpoints**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import json\nimport pandas as pd\nfrom IPython.display import *\npd.set_option('display.max_colwidth', -1)\n\ndef formatColumnNames(column):\n return ' '.join(word[0].upper() + word[1:] for word in column.split())\n\ndef show_results(results):\n df = pd.DataFrame(results)\n df.columns = [formatColumnNames(n) for n in results[0].keys()]\n mydata = HTML(df.to_html(render_links=True))\n display(mydata)\n\ncmd = f'mssqlctl bdc endpoint list'\nendpointsResults = !{cmd}\nendpointsInJson = json.loads(''.join(endpointsResults))\nshow_results(endpointsInJson)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 14
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Connect to master SQL Server instance in Azure Data Studio**\r\nClick the link below to connect to the master SQL Server instance of the SQL Server 2019 big data cluster.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "filteredEndpoints = [x for x in endpointsInJson if x['name'] == 'sql-server-master']\r\nif filteredEndpoints and len(filteredEndpoints) == 1:\r\n display(HTML(\"<h3><a href=\\\"command:azdata.connect?{"serverName":"\"+filteredEndpoints[0]['endpoint']+\"","providerName":"MSSQL", "authenticationType":"SqlLogin","userName":"sa","password":"\"+bdc_password+\""}\\\">Click here to connect to SQL Server</a></h3>\"))",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
{
|
||||
"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": "\n\n## Deploy SQL Server 2019 big data cluster on an existing Kubernetes cluster\n\nThis notebook walks through the process of deploying a SQL Server 2019 big data cluster on an existing Kubernetes cluster\n\n* Follow the instructions in the **Dependencies** cell to install the dependencies.\n* Make sure you have the target cluster set as the current context in your kubectl config file.\n* The **Required information** cell will prompt you for the required information to create a SQL Server 2019 big data cluster.\n\n",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Dependencies**\n<table>\n<colgroup>\n<col style=\"width: 10%\" />\n<col style=\"width: 85%\" />\n<col style=\"width: 10%\" />\n</colgroup>\n<thead>\n<tr class=\"header\">\n<th>Tool</th>\n<th>Description</th>\n<th>Installation</th>\n</tr>\n</thead>\n<tbody>\n<td><strong>kubectl</strong></td>\n<td>Command-line tool for monitoring the underlying Kuberentes cluster (<a href=\"https://kubernetes.io/docs/tasks/tools/install-kubectl/\">More info</a>)</td>\n<td><a href=\"https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-using-native-package-management\">Install</a></td>\n</tr>\n<tr>\n<td><strong>mssqlctl</strong></td>\n<td>Command-line tool for installing and managing a big data cluster</td>\n<td><a href=\"https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions\">Install</a></td>\n</tr>\n</tbody>\n</table>\n<p>",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Check dependencies**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "#Run command helper function\r\ndef run_command():\r\n print(\"Executing: \" + cmd)\r\n !{cmd}\r\n if _exit_code != 0:\r\n raise SystemExit(f'Shell command:\\n\\n\\t{cmd}\\n\\nreturned non-zero exit code: ' + str(_exit_code) + '.\\n')\r\n print(f'Successfully executed: {cmd}')\r\n\r\ncmd = 'kubectl version --client=true'\r\nrun_command()\r\ncmd = 'mssqlctl --version'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show current context**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = ' kubectl config current-context'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Required information**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import getpass\ndef get_user_input(input_name, is_password = False, confirm_password = False):\n if is_password:\n user_input = getpass.getpass(prompt = input_name)\n if confirm_password:\n user_input_confirm = getpass.getpass(prompt = 'Confirm '+ input_name)\n if user_input != user_input_confirm:\n raise SystemExit(f'{input_name} does not match the confirmation password')\n print(f'{input_name}: ******')\n else:\n user_input = input(input_name)\n print(input_name + ': ' + user_input)\n if user_input == \"\":\n raise SystemExit(f'{input_name} is required')\n return user_input;\n\nmssql_cluster_name = get_user_input('Cluster name')\nbdc_controller_username = get_user_input('Controller username')\nbdc_password = get_user_input('Controller password', True, True)\nprint('Knox and SQL Server will use the same password')\ndocker_username = get_user_input('Docker username')\ndocker_password = get_user_input('Docker password', True)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Default settings**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "mssqlctl_configuration_profile = 'aks-dev-test'\nmssqlctl_configuration_file = 'mssql-bdc-configuration'\n\n# Show parameter values\nprint('')\nprint(f'mssql_cluster_name = {mssql_cluster_name}')\nprint(f'docker_username = {docker_username}')\nprint(f'mssqlctl_configuration_profile = {mssqlctl_configuration_profile}')\nprint(f'mssqlctl_configuration_file = {mssqlctl_configuration_file}')\nprint(f'bdc_controller_username = {bdc_controller_username}')\nprint('')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **List the MSSQLCTL configuration profiles**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nos.environ[\"ACCEPT_EULA\"] = 'yes'\ncmd = f'mssqlctl bdc config list'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 5
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create a MSSQLCTL configuration file**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "# Create a configuration file\ncmd = f'mssqlctl bdc config init --source {mssqlctl_configuration_profile} --target {mssqlctl_configuration_file} --force'\nrun_command()\n\n# Set the 'big data cluster' name\njsonPath = '\"metadata.name=''{0}''\"'.format(mssql_cluster_name)\ncmd = f'mssqlctl bdc config section set -c {mssqlctl_configuration_file} -j {jsonPath}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nprint (f'Creating SQL Server 2019 big data cluster: {mssql_cluster_name} using configuration file {mssqlctl_configuration_file}')\nos.environ[\"CONTROLLER_USERNAME\"] = bdc_controller_username\nos.environ[\"CONTROLLER_PASSWORD\"] = bdc_password\nos.environ[\"MSSQL_SA_PASSWORD\"] = bdc_password\nos.environ[\"KNOX_PASSWORD\"] = bdc_password\nos.environ[\"DOCKER_USERNAME\"] = docker_username\nos.environ[\"DOCKER_PASSWORD\"] = docker_password\n\ncmd = f'mssqlctl bdc create -c {mssqlctl_configuration_file} --accept-eula yes'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'mssqlctl login --cluster-name {mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show SQL Server 2019 big data cluster endpoints**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import json\nimport pandas as pd\nfrom IPython.display import *\npd.set_option('display.max_colwidth', -1)\n\ndef formatColumnNames(column):\n return ' '.join(word[0].upper() + word[1:] for word in column.split())\n\ndef show_results(results):\n df = pd.DataFrame(results)\n df.columns = [formatColumnNames(n) for n in results[0].keys()]\n mydata = HTML(df.to_html(render_links=True))\n display(mydata)\n\ncmd = f'mssqlctl bdc endpoint list'\nendpointsResults = !{cmd}\nendpointsInJson = json.loads(''.join(endpointsResults))\nshow_results(endpointsInJson)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 9
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Connect to master SQL Server instance in Azure Data Studio**\r\nClick the link below to connect to the master SQL Server instance of the SQL Server 2019 big data cluster.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "filteredEndpoints = [x for x in endpointsInJson if x['name'] == 'sql-server-master']\r\nif filteredEndpoints and len(filteredEndpoints) == 1:\r\n display(HTML(\"<h3><a href=\\\"command:azdata.connect?{"serverName":"\"+filteredEndpoints[0]['endpoint']+\"","providerName":"MSSQL", "authenticationType":"SqlLogin","userName":"sa","password":"\"+bdc_password+\""}\\\">Click here to connect to SQL Server</a></h3>\"))",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"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": "\n \n## Create Azure Kubernetes Service cluster and deploy SQL Server 2019 CTP 3.2 big data cluster\n \nThis 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 CTP 3.2 big data cluster</a> on the newly created AKS cluster.\n \n* Follow the instructions in the **Prerequisites** cell to install the tools if not already installed.\n* The **Required information** cell will prompt you for a password that will be used to access the cluster controller, SQL Server, and Knox.\n* The values in the **Azure settings** and **Default settings** cell can be changed as appropriate.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Prerequisites**\nEnsure the following tools are installed and added to PATH before proceeding.\n\n|Tools|Description|Installation|\n|---|---|---|\n| Azure CLI |Command-line tool for managing Azure services. Used to create AKS cluster | [Installation](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) |\n|kubectl | Command-line tool for monitoring the underlying Kuberentes cluster | [Installation](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-using-native-package-management) |\n|azdata | Command-line tool for installing and managing a big data cluster |[Installation](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) |",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Check dependencies**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import sys\r\ndef run_command():\r\n print(\"Executing: \" + cmd)\r\n !{cmd}\r\n if _exit_code != 0:\r\n sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{cmd}\\n')\r\n print(f'Successfully executed: {cmd}')\r\n\r\ncmd = 'az --version'\r\nrun_command()\r\ncmd = 'kubectl version --client=true'\r\nrun_command()\r\ncmd = 'azdata --version'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Required information**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import getpass\nmssql_password = getpass.getpass(prompt = 'SQL Server 2019 big data cluster controller password')\nif mssql_password == \"\":\n sys.exit(f'Password is required')\nconfirm_password = getpass.getpass(prompt = 'Confirm password')\nif mssql_password != confirm_password:\n sys.exit(f'Passwords do not match.')\nprint('Password accepted, you can also use the same password to access Knox and SQL Server.')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Azure settings**\n*Subscription ID*: visit <a href=\"https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade\">here</a> to find out the subscriptions you can use, if you leave it unspecified, the default subscription will be used.\n\n*VM Size*: visit <a href=\"https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes\">here</a> to find out the available VM sizes you could use. \n \n*Region*: visit <a href=\"https://azure.microsoft.com/en-us/global-infrastructure/services/?products=kubernetes-service\">here</a> to find out the Azure regions where the Azure Kubernettes Service is available.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "azure_subscription_id = \"\"\nazure_vm_size = \"Standard_E4s_v3\"\nazure_region = \"eastus\"\nazure_vm_count = int(5)",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Default settings**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import time\nmssql_cluster_name = 'mssql-cluster'\nmssql_controller_username = 'admin'\nazure_resource_group = mssql_cluster_name + '-' + time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\naks_cluster_name = azure_resource_group\nconfiguration_profile = 'aks-dev-test'\nconfiguration_folder = 'mssql-bdc-configuration'\nprint(f'Azure subscription: {azure_subscription_id}')\nprint(f'Azure VM size: {azure_vm_size}')\nprint(f'Azure VM count: {str(azure_vm_count)}')\nprint(f'Azure region: {azure_region}')\nprint(f'Azure resource group: {azure_resource_group}')\nprint(f'AKS cluster name: {aks_cluster_name}')\nprint(f'SQL Server big data cluster name: {mssql_cluster_name}')\nprint(f'SQL Server big data cluster controller user name: {mssql_controller_username}')\nprint(f'Deployment configuration profile: {configuration_profile}')\nprint(f'Deployment configuration: {configuration_folder}')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to Azure**\n\nThis 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": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az login'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 5
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "\n### **Set active Azure subscription**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "if azure_subscription_id != \"\":\n cmd = f'az account set --subscription {azure_subscription_id}'\n run_command()\nelse:\n print('Using the default Azure subscription', {azure_subscription_id})\ncmd = f'az account show'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create Azure resource group**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az group create --name {azure_resource_group} --location {azure_region}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create AKS cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = 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}' \nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Set the new AKS cluster as current context**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'az aks get-credentials --resource-group {azure_resource_group} --name {aks_cluster_name} --admin --overwrite-existing'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 9
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create a deployment configuration file**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nos.environ[\"ACCEPT_EULA\"] = 'yes'\ncmd = f'azdata bdc config init --source {configuration_profile} --target {configuration_folder} --force'\nrun_command()\ncmd = f'azdata bdc config replace -c {configuration_folder}/cluster.json -j metadata.name={mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 10
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "print (f'Creating SQL Server 2019 big data cluster: {mssql_cluster_name} using configuration {configuration_folder}')\nos.environ[\"CONTROLLER_USERNAME\"] = mssql_controller_username\nos.environ[\"CONTROLLER_PASSWORD\"] = mssql_password\nos.environ[\"MSSQL_SA_PASSWORD\"] = mssql_password\nos.environ[\"KNOX_PASSWORD\"] = mssql_password\ncmd = f'azdata bdc create -c {configuration_folder}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 11
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'azdata login --cluster-name {mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 12
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show SQL Server 2019 big data cluster endpoints**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import json,html,pandas\nfrom IPython.display import *\npandas.set_option('display.max_colwidth', -1)\ncmd = f'azdata bdc endpoint list'\ncmdOutput = !{cmd}\nendpoints = json.loads(''.join(cmdOutput))\nendpointsDataFrame = pandas.DataFrame(endpoints)\nendpointsDataFrame.columns = [' '.join(word[0].upper() + word[1:] for word in columnName.split()) for columnName in endpoints[0].keys()]\ndisplay(HTML(endpointsDataFrame.to_html(index=False, render_links=True)))",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 13
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Connect to master SQL Server instance in Azure Data Studio**\r\nClick the link below to connect to the master SQL Server instance of the SQL Server 2019 big data cluster.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\r\nif sqlEndpoints and len(sqlEndpoints) == 1:\r\n connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\r\n display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to master SQL Server instance</font></a><br/>'))\r\nelse:\r\n sys.exit('Could not find the master SQL Server instance endpoint')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 14
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"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": "\n \n## Deploy SQL Server 2019 CTP 3.2 big data cluster on an existing Azure Kubernetes Service (AKS) cluster\n \nThis 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 CTP 3.2 big data cluster</a> on an existing AKS cluster.\n \n* Follow the instructions in the **Prerequisites** cell to install the tools if not already installed.\n* Make sure you have the target cluster set as the current context in your kubectl config file.\n The config file would typically be under C:\\Users\\(userid)\\.kube on Windows, and under ~/.kube/ for macOS and Linux for a default installation.\n In the kubectl config file, look for \"current-context\" and ensure it is set to the AKS cluster that the SQL Server 2019 CTP 3.2 big data cluster will be deployed to.\n* The **Required information** cell will prompt you for password that will be used to access the cluster controller, SQL Server, and Knox.\n* The values in the **Default settings** cell can be changed as appropriate.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Prerequisites** \nEnsure the following tools are installed and added to PATH before proceeding.\n \n|Tools|Description|Installation|\n|---|---|---|\n|kubectl | Command-line tool for monitoring the underlying Kuberentes cluster | [Installation](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-using-native-package-management) |\n|azdata | Command-line tool for installing and managing a big data cluster |[Installation](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) |",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Check dependencies**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import sys\r\ndef run_command():\r\n print(\"Executing: \" + cmd)\r\n !{cmd}\r\n if _exit_code != 0:\r\n sys.exit(f'Command execution failed with exit code: {str(_exit_code)}.\\n\\t{cmd}\\n')\r\n print(f'Successfully executed: {cmd}')\r\n\r\ncmd = 'kubectl version --client=true'\r\nrun_command()\r\ncmd = 'azdata --version'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show current context**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = ' kubectl config current-context'\r\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Required information**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import getpass\nmssql_password = getpass.getpass(prompt = 'SQL Server 2019 big data cluster controller password')\nif mssql_password == \"\":\n sys.exit(f'Password is required')\nconfirm_password = getpass.getpass(prompt = 'Confirm password')\nif mssql_password != confirm_password:\n sys.exit(f'Passwords do not match.')\nprint('Password accepted, you can also use the same password to access Knox and SQL Server.')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Default settings**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "mssql_cluster_name = 'mssql-cluster'\nmssql_controller_username = 'admin'\nconfiguration_profile = 'aks-dev-test'\nconfiguration_folder = 'mssql-bdc-configuration'\nprint(f'SQL Server big data cluster name: {mssql_cluster_name}')\nprint(f'SQL Server big data cluster controller user name: {mssql_controller_username}')\nprint(f'Deployment configuration profile: {configuration_profile}')\nprint(f'Deployment configuration: {configuration_folder}')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create a deployment configuration file**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nos.environ[\"ACCEPT_EULA\"] = 'yes'\ncmd = f'azdata bdc config init --source {configuration_profile} --target {configuration_folder} --force'\nrun_command()\ncmd = f'azdata bdc config replace -c {configuration_folder}/cluster.json -j metadata.name={mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Create SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import os\nprint (f'Creating SQL Server 2019 big data cluster: {mssql_cluster_name} using configuration {configuration_folder}')\nos.environ[\"CONTROLLER_USERNAME\"] = mssql_controller_username\nos.environ[\"CONTROLLER_PASSWORD\"] = mssql_password\nos.environ[\"MSSQL_SA_PASSWORD\"] = mssql_password\nos.environ[\"KNOX_PASSWORD\"] = mssql_password\ncmd = f'azdata bdc create -c {configuration_folder}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Login to SQL Server 2019 big data cluster**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "cmd = f'azdata login --cluster-name {mssql_cluster_name}'\nrun_command()",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Show SQL Server 2019 big data cluster endpoints**",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "import json,html,pandas\nfrom IPython.display import *\npandas.set_option('display.max_colwidth', -1)\ncmd = f'azdata bdc endpoint list'\ncmdOutput = !{cmd}\nendpoints = json.loads(''.join(cmdOutput))\nendpointsDataFrame = pandas.DataFrame(endpoints)\nendpointsDataFrame.columns = [' '.join(word[0].upper() + word[1:] for word in columnName.split()) for columnName in endpoints[0].keys()]\ndisplay(HTML(endpointsDataFrame.to_html(index=False, render_links=True)))",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 9
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### **Connect to master SQL Server instance in Azure Data Studio**\r\nClick the link below to connect to the master SQL Server instance of the SQL Server 2019 big data cluster.",
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": "sqlEndpoints = [x for x in endpoints if x['name'] == 'sql-server-master']\r\nif sqlEndpoints and len(sqlEndpoints) == 1:\r\n connectionParameter = '{\"serverName\":\"' + sqlEndpoints[0]['endpoint'] + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(mssql_password) + '}'\r\n display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to master SQL Server instance</font></a><br/>'))\r\nelse:\r\n sys.exit('Could not find the master SQL Server instance endpoint')",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -131,8 +131,8 @@
|
||||
"displayName": "%version-display-name%",
|
||||
"values": [
|
||||
{
|
||||
"name": "ctp3.1",
|
||||
"displayName": "%sql-2019ctp31-display-name%"
|
||||
"name": "bdc2019",
|
||||
"displayName": "%bdc-2019-display-name%"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -153,7 +153,7 @@
|
||||
],
|
||||
"providers": [
|
||||
{
|
||||
"notebook": "%bdc-ctp31-aks-notebook%",
|
||||
"notebook": "%bdc-2019-aks-notebook%",
|
||||
"requiredTools": [
|
||||
{
|
||||
"name": "kubectl"
|
||||
@@ -162,22 +162,22 @@
|
||||
"name": "azcli"
|
||||
},
|
||||
{
|
||||
"name": "mssqlctl"
|
||||
"name": "azdata"
|
||||
}
|
||||
],
|
||||
"when": "target=aks&&version=ctp3.1"
|
||||
"when": "target=aks&&version=bdc2019"
|
||||
},
|
||||
{
|
||||
"notebook": "%bdc-ctp31-existing-cluster-notebook%",
|
||||
"notebook": "%bdc-2019-existing-cluster-notebook%",
|
||||
"requiredTools": [
|
||||
{
|
||||
"name": "kubectl"
|
||||
},
|
||||
{
|
||||
"name": "mssqlctl"
|
||||
"name": "azdata"
|
||||
}
|
||||
],
|
||||
"when": "target=existingCluster&&version=ctp3.1"
|
||||
"when": "target=existingCluster&&version=bdc2019"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
"resource-type-sql-bdc-description": "SQL Server big data cluster allows you to deploy scalable clusters of SQL Server, Spark, and HDFS containers running on Kubernetes",
|
||||
"version-display-name": "Version",
|
||||
"sql-2017-display-name": "SQL Server 2017",
|
||||
"sql-2019-display-name": "SQL Server 2019 CTP 3.1",
|
||||
"sql-2019-display-name": "SQL Server 2019 CTP 3.2",
|
||||
"sql-2017-docker-notebook": "./notebooks/docker/2017/deploy-sql2017-image.ipynb",
|
||||
"sql-2019-docker-notebook": "./notebooks/docker/2019/deploy-sql2019-image.ipynb",
|
||||
"sql-2019ctp31-display-name": "SQL Server 2019 big data cluster CTP 3.1",
|
||||
"bdc-2019-display-name": "SQL Server 2019 CTP 3.2 big data cluster",
|
||||
"bdc-deployment-target": "Deployment target",
|
||||
"bdc-deployment-target-aks": "New Azure Kubernetes Service Cluster",
|
||||
"bdc-deployment-target-existing-cluster": "Existing Kubernetes Cluster",
|
||||
"bdc-ctp31-aks-notebook": "./notebooks/bdc/2019/ctp3-1/deploy-bdc-aks.ipynb",
|
||||
"bdc-ctp31-existing-cluster-notebook": "./notebooks/bdc/2019/ctp3-1/deploy-bdc-existing-cluster.ipynb"
|
||||
"bdc-deployment-target-existing-cluster": "Existing Azure Kubernetes Service Cluster",
|
||||
"bdc-2019-aks-notebook": "./notebooks/bdc/2019/deploy-bdc-aks.ipynb",
|
||||
"bdc-2019-existing-cluster-notebook": "./notebooks/bdc/2019/deploy-bdc-existing-cluster.ipynb"
|
||||
}
|
||||
@@ -7,13 +7,13 @@ import { ToolType, ITool } from '../../interfaces';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export class MSSQLCtlTool implements ITool {
|
||||
export class AzdataTool implements ITool {
|
||||
get name(): string {
|
||||
return 'mssqlctl';
|
||||
return 'azdata';
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.MssqlCtlDescription', 'A command-line utility written in Python that enables cluster administrators to bootstrap and manage the big data cluster via REST APIs');
|
||||
return localize('resourceDeployment.AzdataDescription', 'A command-line utility written in Python that enables cluster administrators to bootstrap and manage the big data cluster via REST APIs');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
@@ -21,6 +21,6 @@ export class MSSQLCtlTool implements ITool {
|
||||
}
|
||||
|
||||
get displayName(): string {
|
||||
return localize('resourceDeployment.MssqlCtlDisplayName', 'mssqlctl');
|
||||
return localize('resourceDeployment.AzdataDisplayName', 'azdata');
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
import { ITool } from '../interfaces';
|
||||
import { DockerTool } from './tools/dockerTool';
|
||||
import { AzCliTool } from './tools/azCliTool';
|
||||
import { MSSQLCtlTool } from './tools/mssqlCtlTool';
|
||||
import { AzdataTool } from './tools/azdataTool';
|
||||
import { KubeCtlTool } from './tools/kubeCtlTool';
|
||||
|
||||
export interface IToolsService {
|
||||
@@ -15,12 +15,12 @@ export interface IToolsService {
|
||||
|
||||
export class ToolsService implements IToolsService {
|
||||
constructor() {
|
||||
this.SupportedTools = [new DockerTool(), new AzCliTool(), new MSSQLCtlTool(), new KubeCtlTool()];
|
||||
this.supportedTools = [new DockerTool(), new AzCliTool(), new AzdataTool(), new KubeCtlTool()];
|
||||
}
|
||||
|
||||
private SupportedTools: ITool[];
|
||||
private supportedTools: ITool[];
|
||||
|
||||
getToolByName(toolName: string): ITool | undefined {
|
||||
return this.SupportedTools.find(t => t.name === toolName);
|
||||
return this.supportedTools.find(t => t.name === toolName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user