mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
implement review feedback (#11470)
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
"\n",
|
||||
"## Deploy Azure SQL Edge to an Azure VM via IoT hub\n",
|
||||
"This notebook will walk you through the end to end setup of Azure SQL Edge.\n",
|
||||
"1. Create an Azure Edge VM as a virtual IoT device\n",
|
||||
"1. Create an Azure IoT hub\n",
|
||||
"1. Create an Azure Edge VM as a virtual IoT device, you can go the \"Default Settings\" cell and adjust the vm_size variable based on your needs. Available sizes and pricing information can be found [here](https://docs.microsoft.com/azure/virtual-machines/linux/sizes).\n",
|
||||
"1. Create an Azure IoT hub, you can go to the \"Default Settings\" cell and adjust value of the following variables based on your needs: iot_hub_sku and iot_hub_units. Available SKUs and pricing information can be found [here](https://azure.microsoft.com/pricing/details/iot-hub/).\n",
|
||||
"1. Add the device to the IoT hub\n",
|
||||
"1. Deploy SQL Edge module to the device with optional dacpac\n",
|
||||
"1. Enable connecting to the SQL Edge instance on the device\n",
|
||||
@@ -126,7 +126,6 @@
|
||||
"sa_password = os.environ[\"AZDATA_NB_VAR_SA_PASSWORD\"]\n",
|
||||
"vm_admin = os.environ[\"AZDATA_NB_VAR_ASDE_VM_ADMIN\"]\n",
|
||||
"vm_password = os.environ[\"AZDATA_NB_VAR_ASDE_VM_PASSWORD\"]\n",
|
||||
"iot_device_id = os.environ[\"AZDATA_NB_VAR_ASDE_DEVICE_ID\"]\n",
|
||||
"dacpac_path = os.environ[\"AZDATA_NB_VAR_ASDE_DACPAC_PATH\"]\n",
|
||||
"sql_port = os.environ[\"AZDATA_NB_VAR_ASDE_SQL_PORT\"]\n",
|
||||
"new_rg_flag = os.environ[\"AZDATA_NB_VAR_ASDE_NEW_RESOURCEGROUP\"]\n",
|
||||
@@ -137,7 +136,6 @@
|
||||
"print(f'Subscription: {azure_subscription_id}')\n",
|
||||
"print(f'Resource group: {azure_resource_group}')\n",
|
||||
"print(f'Location: {azure_location}')\n",
|
||||
"print(f'VM name: {iot_device_id}')\n",
|
||||
"print(f'VM admin username: {vm_admin}')\n",
|
||||
"print(f'VM admin password: ******')\n",
|
||||
"print(f'SQL Server port: {sql_port}')\n",
|
||||
@@ -165,18 +163,19 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"suffix = time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\n",
|
||||
"suffix = time.strftime(\"%y%m%d%H%M%S\", time.localtime())\n",
|
||||
"network_security_group = f'nsg{suffix}'\n",
|
||||
"public_ip_address_name = f'ip{suffix}'\n",
|
||||
"iot_hub_name = f'hub{suffix}'\n",
|
||||
"iot_hub_sku = 'S1'\n",
|
||||
"iot_hub_units = 4\n",
|
||||
"iot_device_id = f'vm{suffix}'\n",
|
||||
"vm_size = 'Standard_DS3_v2'\n",
|
||||
"vnet_name = f'net{suffix}'\n",
|
||||
"subnet_name = f'subnet{suffix}'\n",
|
||||
"subnet_address_prefix = '10.0.0.0/24'\n",
|
||||
"vnet_address_prefix = '10.0.0.0/16'\n",
|
||||
"azure_storage_account = azure_resource_group.lower()\n",
|
||||
"azure_storage_account = f'sa{suffix}'\n",
|
||||
"storage_account_container = 'sqldatabasedacpac'\n",
|
||||
"sql_lcid = '1033'\n",
|
||||
"sql_collation = 'SQL_Latin1_General_CP1_CI_AS'"
|
||||
@@ -495,8 +494,8 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### **Connect to SQL Server instance in Azure Data Studio**\n",
|
||||
"Click the link below to connect to the SQL Server, it might take a couple minutes for the service to start."
|
||||
"### **Connect to Azure SQL Edge instance in Azure Data Studio**\n",
|
||||
"Click the link below to connect to the Azure SQL Edge instance, it might take a couple minutes for the service to start."
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "3bdfa537-a749-45c4-b219-57d296c22739"
|
||||
@@ -507,8 +506,8 @@
|
||||
"source": [
|
||||
"from IPython.display import *\n",
|
||||
"connectionParameter = '{\"serverName\":\"' + f'{ip_address},{sql_port}' + '\",\"providerName\":\"MSSQL\",\"authenticationType\":\"SqlLogin\",\"userName\": \"sa\",\"password\":' + json.dumps(sa_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/>'))\n",
|
||||
"display(HTML('<br/><span style=\"color:red\"><font size=\"2\">NOTE: The SQL Server password is included in this link, you may want to clear the results of this code cell before saving the notebook.</font></span>'))"
|
||||
"display(HTML('<br/><a href=\"command:azdata.connect?' + html.escape(connectionParameter)+'\"><font size=\"3\">Click here to connect to the Azure SQL Edge instance</font></a><br/>'))\n",
|
||||
"display(HTML('<br/><span style=\"color:red\"><font size=\"2\">NOTE: The Azure SQL Edge instance password is included in this link, you may want to clear the results of this code cell before saving the notebook.</font></span>'))"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "8bc29cce-96a7-4a78-89af-5c73a6431c24",
|
||||
|
||||
Reference in New Issue
Block a user