|
| 1 | +--- |
| 2 | +title: Tutorial - Create an Azure ML workspace - Resource Manager template |
| 3 | +description: In this tutorial, you use an Azure Resource Manager template to quickly deploy an Azure workspace for machine learning |
| 4 | +services: machine-learning |
| 5 | +author: lobrien |
| 6 | +ms.author: laobri |
| 7 | +ms.custom: subject-armqs |
| 8 | +ms.date: 05/26/2020 |
| 9 | +ms.service: machine-learning |
| 10 | +ms.subservice: core |
| 11 | +ms.topic: tutorial |
| 12 | +--- |
| 13 | + |
| 14 | +# Tutorial: Deploy an Azure machine learning workspace using a Resource Manager template |
| 15 | +[!INCLUDE [applies-to-skus](../../includes/aml-applies-to-basic-enterprise-sku.md)] |
| 16 | + |
| 17 | +This tutorial will show you how to create an Azure machine learning workspace using an Azure Resource Manager template. Azure machine learning workspaces organize all your machine learning assets from baseline datasets to deployed models. Workspaces are a single location to collaborate with colleagues on creating, running, and reviewing experiments, manage your training and inferencing compute resources, and monitor and version deployed models. |
| 18 | + |
| 19 | +[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)] |
| 20 | + |
| 21 | +## Prerequisites |
| 22 | + |
| 23 | +* An Azure subscription. If you don't have an Azure subscription, create a [free account](https://aka.ms/AMLFree) before you begin |
| 24 | + |
| 25 | +* To use the CLI commands in this document from your **local environment**, you need the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) |
| 26 | + |
| 27 | +## Create a workspace |
| 28 | + |
| 29 | +### Review the template |
| 30 | + |
| 31 | +The template used in this quickstart is from [Azure Quickstart templates](https://azure.microsoft.com/resources/templates/101-machine-learning-create/). |
| 32 | + |
| 33 | +:::code language="json" source="~/quickstart-templates/101-machine-learning-create/azuredeploy.json"::: |
| 34 | + |
| 35 | +The following resources are defined in the template: |
| 36 | + |
| 37 | +* [Microsoft.MachineLearningServices/workspaces](/azure/templates/microsoft.machinelearningservices/workspaces): Create an Azure ML workspace. In this template, the location and name are parameters that the user can pass in or interactively enter. |
| 38 | + |
| 39 | +### Deploy the template |
| 40 | + |
| 41 | +To use the template from the Azure CLI, login and choose your subscription (See [Sign in with Azure CLI](https://docs.microsoft.com/cli/azure/authenticate-azure-cli?view=azure-cli-latest)). Then run: |
| 42 | + |
| 43 | +```azurecli-interactive |
| 44 | +read -p "Enter a project name that is used for generating resource names:" projectName && |
| 45 | +read -p "Enter the location (i.e. centralus):" location && |
| 46 | +templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-machine-learning-create/azuredeploy.json" && |
| 47 | +resourceGroupName="${projectName}rg" && |
| 48 | +workspaceName="${projectName}ws" && |
| 49 | +az group create --name $resourceGroupName --location "$location" && |
| 50 | +az deployment group create --resource-group $resourceGroupName --template-uri $templateUri --parameters workspaceName=$workspaceName location=$location && |
| 51 | +echo "Press [ENTER] to continue ..." && |
| 52 | +read |
| 53 | +``` |
| 54 | + |
| 55 | +When you run the above command, enter: |
| 56 | + |
| 57 | +1. A project name that will form the basis of the names of the created resource group and Azure ML workspace |
| 58 | +1. The Azure location in which you wish to make the deployment |
| 59 | + |
| 60 | +## Review deployed resources |
| 61 | + |
| 62 | +To see your Azure ML workspace: |
| 63 | + |
| 64 | +1. Go to https://portal.azure.com |
| 65 | +1. Sign in |
| 66 | +1. Choose the workspace you just created |
| 67 | + |
| 68 | +You'll see the Azure Machine Learning homepage: |
| 69 | + |
| 70 | +:::image type="content" source="media/tutorial-resource-manager-workspace/workspace-home.png" alt-text="Screenshot of the Azure ML workspace"::: |
| 71 | + |
| 72 | +To see all the resources associated with the deployment, click the link in the upper left with the workspace name (in the screenshot, `my_templated_ws`). That link takes you to the resource group in the Azure portal. The resource group name is `{projectName}rg` and the workspace is named `{projectName}ws`. |
| 73 | + |
| 74 | +## Clean up resources |
| 75 | + |
| 76 | +If you don't want to use this workspace, delete it. Since the workspace is associated with other resources such as a storage account, you'll probably want to delete the entire resource group you created. You can delete the resource group using the portal by clicking on the "Delete" button and confirming. Or, you can delete the resource group from the CLI with: |
| 77 | + |
| 78 | +```azurecli-interactive |
| 79 | +echo "Enter the Resource Group name:" && |
| 80 | +read resourceGroupName && |
| 81 | +az group delete --name $resourceGroupName && |
| 82 | +echo "Press [ENTER] to continue ..." |
| 83 | +``` |
| 84 | + |
| 85 | +## Next steps |
| 86 | + |
| 87 | +In this tutorial, you created an Azure Machine Learning workspace from an Azure Resource Manager template. If you'd like to explore Azure Machine Learning, continue with the tutorial. |
| 88 | + |
| 89 | +> [!div class="nextstepaction"] |
| 90 | +> [Tutorial: Get started creating your first ML experiment with the Python SDK](tutorial-1st-experiment-sdk-setup.md) |
0 commit comments