mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -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 2017 container images with Docker\n",
|
||||
"This notebook will use Docker to pull and run the SQL Server 2017 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": "1d10b817-e9f4-4532-b69f-4d47504d590b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Check dependencies",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Check dependencies"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "630e76af-01a6-4905-90a7-2d643126cdb4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -60,9 +66,11 @@
|
||||
"cmd = 'docker version'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "64f3e119-408a-4b61-bce4-68114e2a727c"
|
||||
},
|
||||
"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": "b671aaac-226f-4bbd-9839-552ec676c027"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -78,14 +88,20 @@
|
||||
"cmd = f'docker ps -a'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "dd665751-efbc-4089-af1b-0fa456a4fb58"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
"execution_count": null
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": "### Required information",
|
||||
"metadata": {}
|
||||
"source": [
|
||||
"### Required information"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "9927c86e-e929-497e-bced-ced60e6a5a7c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -106,14 +122,20 @@
|
||||
"print(f'{password_name}: ******')\n",
|
||||
"print(f'Port: {sql_port}')"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "a2e06bb2-23f3-4fc7-81bc-d38e250b24c0"
|
||||
},
|
||||
"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": "ca95b65d-e6f9-43a3-b06e-aa9cfc917725"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -121,14 +143,20 @@
|
||||
"cmd = f'docker pull mcr.microsoft.com/mssql/server:2017-latest'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "d75ae87c-2e59-4cf5-b61e-43f4bf8ac680"
|
||||
},
|
||||
"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": "5bbde6b1-4933-417d-90cc-0c853e002552"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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:2017-latest'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "73585d5d-0c8c-4786-92f2-7e0fd2653f9e"
|
||||
},
|
||||
"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": "e338290a-0e1d-4780-aad5-3416447be0a1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -156,9 +190,11 @@
|
||||
"cmd = f'docker ps -a'\n",
|
||||
"run_command()"
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "5e30c110-a631-4c9b-8485-cd64d34c54d5"
|
||||
},
|
||||
"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": "11add202-2f03-4d20-8411-d4f274910107"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "182517d3-f6d6-4ecc-b2cb-4c21a0f23b4e"
|
||||
},
|
||||
"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": "416a7e11-0ea7-487d-804f-b8449f0ce5fc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "1593a0a6-7009-4d0b-9f3f-ac7ed6d2bb1e"
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 8
|
||||
"execution_count": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user