From 969476e49e3d31ddce5165133b36aab6005f793e Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Fri, 12 Jul 2019 14:34:18 -0700 Subject: [PATCH] Update deploy-sql2019-image.ipynb (#6373) --- .../docker/2019/deploy-sql2019-image.ipynb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/extensions/resource-deployment/notebooks/docker/2019/deploy-sql2019-image.ipynb b/extensions/resource-deployment/notebooks/docker/2019/deploy-sql2019-image.ipynb index 49bafc1865..68235a8ee9 100644 --- a/extensions/resource-deployment/notebooks/docker/2019/deploy-sql2019-image.ipynb +++ b/extensions/resource-deployment/notebooks/docker/2019/deploy-sql2019-image.ipynb @@ -44,10 +44,10 @@ }, { "cell_type": "code", - "source": "md = f'docker ps -a'\r\nrun_command()", + "source": "cmd = f'docker ps -a'\r\nrun_command()", "metadata": {}, "outputs": [], - "execution_count": 3 + "execution_count": 2 }, { "cell_type": "markdown", @@ -59,7 +59,7 @@ "source": "import getpass\r\npassword_name = 'SQL Server sa account password'\r\nsql_password = getpass.getpass(prompt = password_name)\r\npassword_confirm = getpass.getpass(prompt = f'Confirm {password_name}')\r\nif sql_password != password_confirm:\r\n raise SystemExit(f'{password_name} does not match the confirmation password')\r\nprint(f'{password_name}: ******')\r\nsql_port = input('SQL Server port, default value is 1433')\r\nif len(sql_port) == 0:\r\n sql_port = '1433'\r\nprint(f'Port: {sql_port}')", "metadata": {}, "outputs": [], - "execution_count": 4 + "execution_count": 3 }, { "cell_type": "markdown", @@ -71,7 +71,7 @@ "source": "cmd = f'docker pull mcr.microsoft.com/mssql/server:2019-latest'\r\nrun_command()", "metadata": {}, "outputs": [], - "execution_count": 5 + "execution_count": 4 }, { "cell_type": "markdown", @@ -83,7 +83,7 @@ "source": "import time\r\ncontainer_name = 'sql2019-' + time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\r\nprint('New container name: ' + container_name)\r\ncmd = 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'\r\nrun_command()", "metadata": {}, "outputs": [], - "execution_count": 6 + "execution_count": 5 }, { "cell_type": "markdown", @@ -95,7 +95,7 @@ "source": "cmd = f'docker ps -a'\r\nrun_command()", "metadata": {}, "outputs": [], - "execution_count": 7 + "execution_count": 6 }, { "cell_type": "markdown", @@ -107,7 +107,7 @@ "source": "from IPython.display import *\r\ndisplay(HTML(\"Click here to connect to SQL Server\"))", "metadata": {}, "outputs": [], - "execution_count": 8 + "execution_count": 7 }, { "cell_type": "markdown", @@ -119,7 +119,7 @@ "source": "stop_container_command = f'docker stop {container_name}'\r\nremove_container_command = f'docker rm {container_name}'\r\ndisplay(HTML(\"Use this link to: open the terminal window in Azure Data Studio and use the links below to paste the command to the terminal.\"))\r\ndisplay(HTML(\"Stop the container: \" + stop_container_command + \"\"))\r\ndisplay(HTML(\"Remove the container: \" + remove_container_command + \"\"))", "metadata": {}, "outputs": [], - "execution_count": 9 + "execution_count": 8 } ] -} \ No newline at end of file +}