|
| 1 | +# Cognitive services Translation Services |
| 2 | + |
| 3 | +The purpose of this ARM Template is **deploy a Cognitive Service Translate Service**. |
| 4 | + |
| 5 | +Let's understand a bit better how all this work. |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +Azure Cognitive Services are APIs, SDKs, and services available to help developers build intelligent applications without having direct AI or data science skills or knowledge. Azure Cognitive Services enable developers to easily add cognitive features into their applications. The goal of Azure Cognitive Services is to help developers create applications that can see, hear, speak, understand, and even begin to reason. The catalog of services within Azure Cognitive Services can be categorized into five main pillars - Vision, Speech, Language, Web Search, and Decision. |
| 10 | + |
| 11 | +## Pre Deployment Steps |
| 12 | + |
| 13 | +Before processing to the deployment of the template, we need to perform the following steps. |
| 14 | + |
| 15 | +### The template |
| 16 | + |
| 17 | +Don't let the size of the template scares you. The structure is very intuitive and once that you get the gist of it, you will see how easier your life will be regarding deploying resources to Azure. |
| 18 | + |
| 19 | +Those are the parameters on the template. Some of them are already with the values, the ones that you need to inform are **cognitiveServiceName** and the **sku** in case that need a powerful service. |
| 20 | + |
| 21 | +Parameter | Suggested value | Description |
| 22 | +:--------------- |:------------- |:--------------------- |
| 23 | +**cognitiveServiceName** |*location*-*name*-*enviroment* i.e.: uks-name-tst | A globally unique name of azure cognitive services. I recommend you to use the notation above, that will help to create a unique name for your Cognitive Service. The name must use alphanumeric and underscore characters only. There is a 35 character limit to this field. |
| 24 | +**location**| The default location | Select the geographic location for your resource group. |
| 25 | +**Resource Group**| your resource group | That is the Resource Group that you need to deploy your resources. |
| 26 | +**sku**| F0 | Sku is an identifier for the product that we need. F0 is for the most basic characteristics. |
| 27 | + |
| 28 | +## Deployment |
| 29 | + |
| 30 | +There are a few ways to deploy this template. |
| 31 | +You can use [PowerShell](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy), [Azure CLI](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy-cli), [Azure Portal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy-portal) or your favorite SDK. |
| 32 | + |
| 33 | +For Azure CLI I'm using the Visual Code with Azure CLI extensions, if you like, you can find more information [here](https://code.visualstudio.com/docs/azure/extensions). But bare in mind that you don't need to use the Visual Code, you can stick with the old good always present **Command Line** on Windows or any **bash terminal** |
| 34 | + |
| 35 | +### Using Azure CLI with Visual Code |
| 36 | + |
| 37 | +Type on the terminal window: **az login** |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +You will be redirected to the Azure Portal where you can insert your credentials and log in. |
| 42 | + |
| 43 | +After logged in, you will see your credentials on the terminal. |
| 44 | + |
| 45 | +To set the right subscription, type following command: |
| 46 | + |
| 47 | +#### az account set --subscription "your subscription id" |
| 48 | + |
| 49 | +### Resource Group |
| 50 | + |
| 51 | +Now you need a Resource Group for our deployment. If you haven't yet created a Resource Group, you can do it now. If you are new on Azure and wonder what is a Resource Group? Bare with me! A Resource Group is a container that holds related resources for an Azure solution. The resource group includes those resources that you want to manage as a group. Simply saying, it's like a folder that contains files. Simple as that. |
| 52 | + |
| 53 | +To create a Resource Group, you need a name and a location for your Resource Group. |
| 54 | + |
| 55 | +For a list of locations, type: **az account list-locations** |
| 56 | + |
| 57 | +To create the Resource group, type the command: |
| 58 | + |
| 59 | +#### az group create --name "resource-group" --location "your location" |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +Super simple, right? Now that we have our **Resource Group** created, let's deploy the **Cognitive Service Translation**. |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +Go grab a cup of coffee, have some fresh air. Before you come back you will have your Cognitive Service. |
| 68 | + |
| 69 | +Let's check the resource on the [Azure Portal](https://portal.azure.com). |
| 70 | + |
| 71 | +On the portal, go to Resource Groups. In this blade, you can see the Resource Group that you created. |
| 72 | + |
| 73 | +Click on the Resource Group and there it's the resources |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +Congratulations! You have deployed the template successfully. |
| 78 | + |
| 79 | +### Using the Portal |
| 80 | + |
| 81 | +At the Portal, in All Services look for **Templates**, you can favourite this service. |
| 82 | + |
| 83 | +Click in **Add** to add your template: |
| 84 | + |
| 85 | +On General, type the name and the description for your template, and click on [ok]. |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +On ARM Template, replace the content of the template with your template, and click on [OK] and then on [Add]. |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +Click on the refresh button and you will find your template. Click on it and then click in [Deploy]. |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +On the screen Custom Deployment, inform the values for the parameters, by now you must be already familiar with. |
| 98 | + |
| 99 | +Select [Agree] and click on [Purchase]. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +As you can see, it's deploying. |
| 104 | + |
| 105 | +After a couple of minutes, voilà, you have your Cognitive Service deployed. |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | +Go to the Resource. Repeat the test that you have done before. |
| 110 | + |
| 111 | +**p.s.: Pretty easy to create resources on Azure, right? But if you are the sort of IT guy that always loves automation, here is the surprise. Just click on the button below and it will automatically deploy the VM through the Azure Portal.** |
| 112 | + |
| 113 | +<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-cognitive-services-translate%2Fazuredeploy.json" target="_blank"> |
| 114 | + <img src="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.png"/> |
| 115 | +</a> |
| 116 | +<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-cognitive-services-translate%2Fazuredeploy.json" target="_blank"> |
| 117 | + <img src="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.png"/> |
| 118 | +</a> |
| 119 | + |
| 120 | +#### Important disclaimer: Azure charges you for the resources you are using, and you don't want to finish all your credits at once, right? So, don't forget to stop the ___Service___ at the portal or even delete the Resource Group you have created to avoid unnecessary charges |
| 121 | + |
| 122 | +### How to delete your resources |
| 123 | + |
| 124 | +#### Using the portal |
| 125 | + |
| 126 | +On the portal, open your Resource Group, if you will not use the Cognitive Service anymore, you can just click on the [Delete] button. |
| 127 | + |
| 128 | + |
0 commit comments