mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Feature/cu5 features (#11046)
* openshift bdc target (#10358) * openshift bdc target * openshift bdc target * comments * new ad settings (#10390) * ad settings * comments * bump version requirement (#10587) * fix error * update the notebook description (#10888) * update notebooks
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.7.3",
|
||||
"version": "3.6.6",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
@@ -23,21 +23,27 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"\n",
|
||||
"\n",
|
||||
"## Run SQL Server 2019 container image with Docker\n",
|
||||
"This notebook will use Docker to pull and run the SQL Server 2019 container image and connect to it in Azure Data Studio\n",
|
||||
"\n",
|
||||
"### Dependencies\n",
|
||||
"- Docker Engine. For more information, see [Install Docker](https://docs.docker.com/engine/installation/).\n",
|
||||
"\n",
|
||||
"<span style=\"color:red\"><font size=\"3\">Please press the \"Run Cells\" button to run the notebook</font></span>"
|
||||
"<span style=\"color:red\"><font size=\"3\">Please press the \"Run all\" button to run the notebook</font></span>"
|
||||
],
|
||||
"metadata": {}
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "e5fb2be9-e904-4821-8473-b69b90760c6a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Check dependencies",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Check dependencies"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "76c571ab-358a-4b07-810c-53020ee1745a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -60,9 +66,11 @@
|
||||
"cmd = 'docker version'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "6196300e-f896-489b-8dca-b2c42eda2d6d"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
@@ -70,7 +78,9 @@
|
||||
"### List existing containers\n",
|
||||
"You can view the ports that have been used by existing containers"
|
||||
],
|
||||
"metadata": {}
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "87b07614-d57d-4731-ac3e-a8b324d231f2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -78,14 +88,20 @@
|
||||
"cmd = f'docker ps -a'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "26170d1b-4332-4383-bcc4-1d97030daffc"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Required information",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Required information"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "52b1faf2-d7c7-446b-ba0b-4f8b744da0bb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -106,14 +122,20 @@
|
||||
"print(f'{password_name}: ******')\n",
|
||||
"print(f'Port: {sql_port}')"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "93cb0147-7bf6-4630-b796-3811dfd1354b"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Pull the container image",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Pull the container image"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "643ccaca-fd1d-4482-b81e-aee29b627e34"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -121,14 +143,20 @@
|
||||
"cmd = f'docker pull mcr.microsoft.com/mssql/server:2019-latest'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "7b102447-3198-488f-a995-982ae1fc8555"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Start a new container",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Start a new container"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "a4527a5f-c2c5-4f60-bfd1-b119576178c5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -141,14 +169,20 @@
|
||||
"cmd = f'docker run -e ACCEPT_EULA=Y -e \"SA_PASSWORD={sql_password}\" -p {sql_port}:1433 --name {container_name} -d mcr.microsoft.com/mssql/server:2019-latest'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "82f27460-88eb-4484-92ee-40305e650d70"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 5
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### List all the containers",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### List all the containers"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "e267aa7d-dd22-43ac-9b03-cf282ef15f67"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -156,9 +190,11 @@
|
||||
"cmd = f'docker ps -a'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "211ee198-f1d1-4781-9daa-8497c2665de6"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
@@ -166,7 +202,9 @@
|
||||
"### Connect to SQL Server in Azure Data Studio\n",
|
||||
"It might take a couple minutes for SQL Server to launch"
|
||||
],
|
||||
"metadata": {}
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "5f5860c4-7962-439e-a15b-7f24f504dc18"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -175,14 +213,20 @@
|
||||
"connectionParameter = '{\"serverName\":\"localhost,' + sql_port + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\":\"sa\",\"password\":' + json.dumps(sql_password) + '}'\n",
|
||||
"display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to SQL Server</font></a><br/>'))"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "4bc64915-c5ae-4507-8fb0-9e413ccc2fd0"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Stop and remove the container",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Stop and remove the container"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "9a1039fa-fdd3-408b-b649-8fde0fcee660"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -193,9 +237,11 @@
|
||||
"display(HTML(\"Stop the container: <a href=\\\"command:workbench.action.terminal.sendSequence?%7B%22text%22%3A%22\"+stop_container_command.replace(\" \",\"%20\")+\"%22%7D\\\">\" + stop_container_command + \"</a>\"))\n",
|
||||
"display(HTML(\"Remove the container: <a href=\\\"command:workbench.action.terminal.sendSequence?%7B%22text%22%3A%22\"+remove_container_command.replace(\" \",\"%20\")+\"%22%7D\\\">\" + remove_container_command + \"</a>\"))"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "f9e0f1ad-ba6e-4c17-84ea-cc5dceb1289b"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
"execution_count": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user