diff --git a/extensions/azurehybridtoolkit/notebooks/hybridbook/_data/toc.yml b/extensions/azurehybridtoolkit/notebooks/hybridbook/_data/toc.yml
index 66c2be94f9..a0e2137144 100644
--- a/extensions/azurehybridtoolkit/notebooks/hybridbook/_data/toc.yml
+++ b/extensions/azurehybridtoolkit/notebooks/hybridbook/_data/toc.yml
@@ -78,4 +78,4 @@
- title: Glossary
url: /glossary
- title: Appendices
- url: /appendices
+ url: /Appendices
diff --git a/extensions/azurehybridtoolkit/notebooks/hybridbook/content/Appendices.ipynb b/extensions/azurehybridtoolkit/notebooks/hybridbook/content/Appendices.ipynb
new file mode 100644
index 0000000000..269a1977db
--- /dev/null
+++ b/extensions/azurehybridtoolkit/notebooks/hybridbook/content/Appendices.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "kernelspec": {
+ "name": "powershell",
+ "display_name": "PowerShell",
+ "language": "powershell"
+ },
+ "language_info": {
+ "name": "powershell",
+ "codemirror_mode": "shell",
+ "mimetype": "text/x-sh",
+ "file_extension": ".ps1"
+ }
+ },
+ "nbformat_minor": 2,
+ "nbformat": 4,
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Appendices"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "7894d5e9-9d20-462a-942d-5819c9eef811"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Appendix: Locations\r\n",
+ "See the Azure locations page for a complete list of Azure regions along with their general physical location. The following is a list of common North American location settings for this guide:\r\n",
+ "\r\n",
+ "### Regions\r\n",
+ "| Setting | Location\r\n",
+ "| ------------ | ---------\r\n",
+ "| Central US | Iowa\r\n",
+ "| East US | Virginia\r\n",
+ "| East US 2 | Virginia\r\n",
+ "| North Central US | Illinois\r\n",
+ "| South Central US | Texas\r\n",
+ "| West US 2 | Washington\r\n",
+ "| West Central US | Wyoming\r\n",
+ "| West US | California\r\n",
+ "| Canada Central | Toronto\r\n",
+ "| Canada East | Quebec City\r\n",
+ "| Brazil South | Sao Paulo\r\n",
+ "| Mexico Central | Queretaro"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "31b9ebca-6102-438b-8a1c-d14c2598abc5"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Appendix: Storage SKUs\r\n",
+ "Use these as values for provisioning storage skus. \r\n",
+ "\r\n",
+ "Data for table taken from SKU Types page but is subject to change. Not all skus are listed here. SKU type names are case-sensitive.\r\n",
+ "\r\n",
+ "| Name | Description |\r\n",
+ "| -----| ----------- |\r\n",
+ "| Standard_LRS | standard locally redundant storage |\r\n",
+ "| Standard_GRS | standard geo-replicated storage |\r\n",
+ "| Standard_RAGRS | standard read-access geo replicated storage |\r\n",
+ "| Standard_ZRS | standard zone redundant storage |\r\n",
+ "| Premium_LRS | Premium - provisioned IO locally redundant |\r\n",
+ "| Premium_ZRS | Premium - provisioned IO locally redundant |\r\n",
+ ""
+ ],
+ "metadata": {
+ "azdata_cell_guid": "a5272577-2f81-4cea-8dc2-8aaa7bbb6603"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Appendix: Azure SQL VM Offers\n",
+ "\n",
+ "Run the following command using PowerShell to get updated list of offers for Microsoft SQL Server in a location. These settings can be used for the OfferName associated with this migration. \n",
+ "\n",
+ "Note that the SQL Version is first then appended with an operating system version. E.g.: \"WS2019\" means Windows Server 2019. Along with various versions of Windows Servers, there are also enterprise Linux versions such as RedHat Enterprise, Suse Enterprise, and Ubuntu. Some versions are BYOL (Bring Your Own License) aka [Hybrid Benefit](https://azure.microsoft.com/en-us/pricing/hybrid-benefit/)."
+ ],
+ "metadata": {
+ "azdata_cell_guid": "3a67fc67-c1d3-4dcc-b2a0-5f893d175000"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "$Location = \"\" # Name of location to discover offering \r\n",
+ "$PublisherName = \"\" # Name of Publisher, Default would be 'MicrosoftSQLServer'\r\n",
+ "\r\n",
+ "Connect-AzAccount # Opens a dialog in another window\r\n",
+ "Get-AzVMImageOffer -Location $Location -Publisher $PublisherName | Select Offer"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "7eb125fd-dce9-4421-89c8-8c4830e3bfe7"
+ },
+ "outputs": [],
+ "execution_count": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/extensions/azurehybridtoolkit/notebooks/hybridbook/content/appendices.md b/extensions/azurehybridtoolkit/notebooks/hybridbook/content/appendices.md
deleted file mode 100644
index 85c6587520..0000000000
--- a/extensions/azurehybridtoolkit/notebooks/hybridbook/content/appendices.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Appendices
-[Home](readme.md)
-
-## Appendix: Locations
-See the Azure locations page for a complete list of Azure regions along with their general physical location. The following is a list of common North American location settings for this guide:
-
-### Regions
-| Setting | Location |
-| ------------ | --------- |
-| Central US | Iowa |
-| East US | Virginia |
-| East US 2 | Virginia |
-| North Central US | Illinois |
-| South Central US | Texas |
-| West US 2 | Washington |
-| West Central US | Wyoming |
-| West US | California |
-| Canada Central | Toronto |
-| Canada East | Quebec City |
-| Brazil South | Sao Paulo |
-| Mexico Central | Queretaro |
-
-## Appendix: Storage SKUs
-Use these as values for provisioning storage skus.
-
-Data for table taken from SKU Types page but is subject to change. Not all skus are listed here. SKU type names are case-sensitive.
-
-| Name | Description |
-| -----| ----------- |
-| Standard_LRS | standard locally redundant storage |
-| Standard_GRS | standard geo-replicated storage |
-| Standard_RAGRS | standard read-access geo replicated storage |
-| Standard_ZRS | standard zone redundant storage |
-| Premium_LRS | Premium - provisioned IO locally redundant |
-| Premium_ZRS | Premium - provisioned IO locally redundant |
diff --git a/extensions/azurehybridtoolkit/notebooks/hybridbook/content/provisioning/create-sqlvm.ipynb b/extensions/azurehybridtoolkit/notebooks/hybridbook/content/provisioning/create-sqlvm.ipynb
index cb9737bd6d..5aa7a09543 100644
--- a/extensions/azurehybridtoolkit/notebooks/hybridbook/content/provisioning/create-sqlvm.ipynb
+++ b/extensions/azurehybridtoolkit/notebooks/hybridbook/content/provisioning/create-sqlvm.ipynb
@@ -2,7 +2,8 @@
"metadata": {
"kernelspec": {
"name": "powershell",
- "display_name": "PowerShell"
+ "display_name": "PowerShell",
+ "language": "powershell"
},
"language_info": {
"name": "powershell",
@@ -17,21 +18,21 @@
{
"cell_type": "markdown",
"source": [
- "Create Azure SQL Virtual Machine\n",
- "============================================\n",
+ "# Create Azure SQL Virtual Machine\n",
"\n",
- "Description\n",
- "-----------\n",
- "For more information about other Azure PowerShell options for creating SQL VMs, see the Provisioning guide for SQL Server VMs with Azure PowerShell. See also Quickstart guide to creating a SQL Server VM with Azure PowerShell.\n",
+ "## Description\n",
"\n",
+ "For more information about other Azure PowerShell options for creating SQL VMs, see the [Provisioning guide for SQL Server VMs with Azure PowerShell](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-ps-sql-create). See also [Quickstart guide](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/quickstart-sql-vm-create-powershell) to creating a SQL Server VM with Azure PowerShell.\n",
"\n",
"Steps of this procedure include:\n",
- "1. Connect to Azure subscription\n",
- "1. Provision resource group for SQL VM migration\n",
- "2. Create a storage account\n",
- "3. Configure Network Settings\n",
- "3. Provision SQL VM\n",
- "4. Configure SQL VM IaaS agent"
+ "\n",
+ "1. Define notebook variables\n",
+ "2. Connect to Azure subscription\n",
+ "3. Provision resource group for SQL VM migration\n",
+ "4. Create a storage account\n",
+ "5. Configure Network Settings\n",
+ "6. Provision SQL VM\n",
+ "7. Configure SQL VM IaaS agent"
],
"metadata": {
"azdata_cell_guid": "e479b550-d6bd-49c5-965a-34a7d1d16412"
@@ -40,7 +41,7 @@
{
"cell_type": "markdown",
"source": [
- "#### *Enter all the values in quotes *"
+ "## Define Notebook Variables"
],
"metadata": {
"azdata_cell_guid": "37db2e50-dcde-4dd5-820c-7dc11212f1eb"
@@ -50,21 +51,22 @@
"cell_type": "code",
"source": [
"# Resource Group \r\n",
- "$ResourceGroupName = \"\" # Name of the resource group to create in the current subscription\r\n",
- "$Location = \"\" # see Appendix for a list of location settings\r\n",
+ "$Subscription = \"\" # Leave blank to open a dialog to get Azure Subscription, or explicitly specify\r\n",
+ "$ResourceGroup = \"\" # Name of the resource group to create in the current subscription\r\n",
+ "$Location = \"\" # see Appendix for a list of location settings\r\n",
"\r\n",
"# Compute\r\n",
- "$VMName = \"\" # VM to create\r\n",
- "$PublisherName = \"\" # Name of Publisher, Default would be 'MicrosoftSQLServer'\r\n",
- "$Version = \"\" # Version of VM, Default would be 'latest'\r\n",
+ "$VMName = \"\" # VM to create\r\n",
+ "$PublisherName = \"\" # Name of Publisher, Default would be 'MicrosoftSQLServer'\r\n",
+ "$Version = \"\" # Version of VM, Default would be 'latest'\r\n",
"\r\n",
"# Storage\r\n",
- "$StorageAccountName = $ResourceGroupName + \"_storage\"\r\n",
- "$StorageSku = \"\" # Choose your storage sku (see appendix)\r\n",
- "$StorageName = \"sqlstorage\" + (Get-Random -Minimum 1 -Maximum 100)\r\n",
+ "$StorageAccountName = $ResourceGroup + \"_storage\"\r\n",
+ "$StorageSKU = \"\" # Choose your storage SKU (see appendix)\r\n",
+ "$StorageName = \"sqlstorage\" + (Get-Random -Minimum 1 -Maximum 100)\r\n",
"\r\n",
"# VM Password\r\n",
- "$secureVMPassword = \"\" # Create the password for VM."
+ "$secureVMPassword = \"\" # Create the password for VM."
],
"metadata": {
"azdata_cell_guid": "b9aff9cc-a3af-41cb-a2a5-35f36b2bcc55",
@@ -76,28 +78,9 @@
{
"cell_type": "markdown",
"source": [
- "## Connect to Azure Account"
- ],
- "metadata": {
- "azdata_cell_guid": "b06fee5e-355d-47fc-8c1f-41294756cc87"
- }
- },
- {
- "cell_type": "code",
- "source": [
- "Connect-AzAccount"
- ],
- "metadata": {
- "azdata_cell_guid": "7dbdc638-d6cd-4ebe-9268-3efc18d3c415"
- },
- "outputs": [],
- "execution_count": null
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Get Subscription\r\n",
- "Below command will open a _Dialouge Box_ with list of subscriptions. Selecting one of those will set that subscription for rest of the commands."
+ "## Get Subscription\n",
+ "\n",
+ "Open a dialog box with a list of subscriptions, if one isn't specified. Selecting one will set that subscription in the Az CLI context for rest of the notebook."
],
"metadata": {
"azdata_cell_guid": "b58f1048-3e9d-4888-bda0-4d0443a11c97"
@@ -106,8 +89,12 @@
{
"cell_type": "code",
"source": [
- "$subscription = Get-AzSubscription | Out-GridView -PassThru\r\n",
- "Set-AzContext -SubscriptionName $subscription"
+ "if (!$Subscription)\r\n",
+ "{\r\n",
+ " $Subscription = Get-AzSubscription | Out-GridView -PassThru\r\n",
+ "} \r\n",
+ "Set-AzContext -SubscriptionName $Subscription\r\n",
+ "Connect-AzAccount -Subscription $Subscription"
],
"metadata": {
"azdata_cell_guid": "0cc44e68-3810-46f4-b29c-e6ad4321e384"
@@ -128,13 +115,13 @@
"cell_type": "code",
"source": [
"# Create Azure resource group, if necessary\r\n",
- "$rg = Get-AzResourceGroup | Where ResourceGroupName -eq $ResourceGroupName\r\n",
+ "$rg = Get-AzResourceGroup | Where ResourceGroupName -eq $ResourceGroup\r\n",
"\r\n",
"if (!$rg)\r\n",
"{\r\n",
" # Need to create a new resource group\r\n",
- " Write-Output \"Resource Group $ResourceGroupName does not exist. Creating...\"\r\n",
- " $rg = New-AzResourceGroup -Name $ResourceGroupName -Location $Location\r\n",
+ " Write-Output \"Resource Group '$ResourceGroup' does not exist\"\r\n",
+ " $rg = New-AzResourceGroup -Name $ResourceGroup -Location $Location\r\n",
"}"
],
"metadata": {
@@ -161,7 +148,7 @@
"if (!$StorageAccount)\r\n",
"{\r\n",
" Write-Output \"Storage Account $StorageName does not exist. Creating...\"\r\n",
- " $StorageAccount = New-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName -SkuName $StorageSku -Kind \"Storage\" -Location $Location\r\n",
+ " $StorageAccount = New-AzStorageAccount -ResourceGroupName $ResourceGroup -Name $StorageName -SkuName $StorageSku -Kind \"Storage\" -Location $Location\r\n",
"}"
],
"metadata": {
@@ -184,19 +171,19 @@
{
"cell_type": "code",
"source": [
- "$SubnetName = $ResourceGroupName + \"subnet\"\r\n",
- "$VnetName = $ResourceGroupName + \"vnet\"\r\n",
- "$PipName = $ResourceGroupName + $(Get-Random)\r\n",
+ "$SubnetName = $ResourceGroup + \"subnet\"\r\n",
+ "$VnetName = $ResourceGroup + \"vnet\"\r\n",
+ "$PipName = $ResourceGroup + $(Get-Random)\r\n",
"\r\n",
"# Create a subnet configuration\r\n",
"$SubnetConfig = New-AzVirtualNetworkSubnetConfig -Name $SubnetName -AddressPrefix 192.168.1.0/24\r\n",
"\r\n",
"# Create a virtual network\r\n",
- "$Vnet = New-AzVirtualNetwork -ResourceGroupName $ResourceGroupName -Location $Location `\r\n",
+ "$Vnet = New-AzVirtualNetwork -ResourceGroupName $ResourceGroup -Location $Location `\r\n",
" -Name $VnetName -AddressPrefix 192.168.0.0/16 -Subnet $SubnetConfig\r\n",
"\r\n",
"# Create a public IP address and specify a DNS name\r\n",
- "$Pip = New-AzPublicIpAddress -ResourceGroupName $ResourceGroupName -Location $Location `\r\n",
+ "$Pip = New-AzPublicIpAddress -ResourceGroupName $ResourceGroup -Location $Location `\r\n",
" -AllocationMethod Static -IdleTimeoutInMinutes 4 -Name $PipName"
],
"metadata": {
@@ -228,8 +215,8 @@
" -DestinationAddressPrefix * -DestinationPortRange 1433 -Access Allow\r\n",
"\r\n",
"# Create the network security group\r\n",
- "$NsgName = $ResourceGroupName + \"nsg\"\r\n",
- "$Nsg = New-AzNetworkSecurityGroup -ResourceGroupName $ResourceGroupName `\r\n",
+ "$NsgName = $ResourceGroup + \"nsg\"\r\n",
+ "$Nsg = New-AzNetworkSecurityGroup -ResourceGroupName $ResourceGroup `\r\n",
" -Location $Location -Name $NsgName `\r\n",
" -SecurityRules $NsgRuleRDP,$NsgRuleSQL"
],
@@ -251,9 +238,9 @@
{
"cell_type": "code",
"source": [
- "$InterfaceName = $ResourceGroupName + \"int\"\r\n",
+ "$InterfaceName = $ResourceGroup + \"int\"\r\n",
"$Interface = New-AzNetworkInterface -Name $InterfaceName `\r\n",
- " -ResourceGroupName $ResourceGroupName -Location $Location `\r\n",
+ " -ResourceGroupName $ResourceGroup -Location $Location `\r\n",
" -SubnetId $VNet.Subnets[0].Id -PublicIpAddressId $Pip.Id `\r\n",
" -NetworkSecurityGroupId $Nsg.Id"
],
@@ -287,29 +274,6 @@
"outputs": [],
"execution_count": null
},
- {
- "cell_type": "markdown",
- "source": [
- "### Appendix: Azure SQL VM Offers\r\n",
- "Run the following command to get updated list of offers for Microsoft SQL Server in your location. These settings can be used for the OfferName associated with this migration. Configure it for your purposes.\r\n",
- "\r\n",
- "Note that the SQL Version is first then appended with an operating system version. E.g.: \"WS2019\" means Windows Server 2019. Along with various versions of Windows Servers, there are also enterprise Linux versions such as RedHat Enterprise, Suse Enterprise, and Ubuntu. Some versions are BYOL (Bring Your Own License) aka Hybrid Benefit."
- ],
- "metadata": {
- "azdata_cell_guid": "ce2daf93-7c20-4073-babc-53c9187e5691"
- }
- },
- {
- "cell_type": "code",
- "source": [
- "Get-AzVMImageOffer -Location $Location -Publisher $PublisherName | Select Offer"
- ],
- "metadata": {
- "azdata_cell_guid": "e5808cbf-e6c6-4abe-8e1b-3c282bc7667c"
- },
- "outputs": [],
- "execution_count": null
- },
{
"cell_type": "markdown",
"source": [
@@ -327,9 +291,7 @@
"$VMConfig = New-AzVMConfig -VMName $VMName -VMSize Standard_DS13_V2 |\r\n",
" Set-AzVMOperatingSystem -Windows -ComputerName $VMName -Credential $Cred -ProvisionVMAgent -EnableAutoUpdate |\r\n",
" Set-AzVMSourceImage -PublisherName \"MicrosoftSQLServer\" -Offer \"SQL2017-WS2016\" -Skus \"SQLDEV\" -Version \"latest\" |\r\n",
- " Add-AzVMNetworkInterface -Id $Interface.Id\r\n",
- "\r\n",
- ""
+ " Add-AzVMNetworkInterface -Id $Interface.Id"
],
"metadata": {
"azdata_cell_guid": "6625d7b2-6c97-432e-b5f5-be4ca93017ae"
@@ -350,7 +312,7 @@
"cell_type": "code",
"source": [
"# Create the VM\r\n",
- "New-AzVM -ResourceGroupName $ResourceGroupName -Location $Location -VM $VMConfig"
+ "New-AzVM -ResourceGroupName $ResourceGroup -Location $Location -VM $VMConfig"
],
"metadata": {
"azdata_cell_guid": "05fa1f3d-94e1-480f-ad20-d3006bafc6ac"
@@ -371,7 +333,7 @@
{
"cell_type": "code",
"source": [
- "Set-AzVMSqlServerExtension -ResourceGroupName $ResourceGroupName -VMName $VMName -name \"SQLIaasExtension\" -version \"2.0\" -Location $Location"
+ "Set-AzVMSqlServerExtension -ResourceGroupName $ResourceGroup -VMName $VMName -name \"SQLIaasExtension\" -version \"2.0\" -Location $Location"
],
"metadata": {
"azdata_cell_guid": "bb3b5436-c34b-44b3-b631-ea60c9dcf16a"