Learn to automate Azure tasks
Automate Azure tasks
Suppose you need to choose a tool to administer the Azure resources used to test your Customer Relationship Management (CRM) system. Your tests require you to create resource groups and provision virtual machines (VMs).
You want something that is easy for administrators to learn, but powerful enough to automate the installation and setup of multiple virtual machines or script a full application environment. There are multiple tools available; you need to find the best one for your people and your tasks.
Tools for automate Azure tasks
Azure provides three administration tools to choose from:
- The Azure portal
- The Azure CLI
- Azure PowerShell
The Azure portal is a website that lets you create, configure, and alter the resources in your Azure subscription. The portal is a Graphical User Interface (GUI) that makes it convenient to locate the resource you need and execute any required changes. It also guides you through complex administrative tasks by providing wizards and tooltips.
The portal does not provide any way to automate repetitive tasks. For example, to set up 15 VMs, you would need to create them one-by-one by completing the wizard for each VM. This can be time-consuming and error-prone for complex tasks.
Azure CLI
az vm create \ --resource-group CrmTestingResourceGroup \ --name CrmUnitTests \ --image UbuntuLTS ...
For example, Azure PowerShell provides the New-AzVM command that creates a virtual machine for you inside your Azure subscription. To use it, you would launch the PowerShell application and then issue a command like the following:
New-AzVm ` -ResourceGroupName "CrmTestingResourceGroup" ` -Name "CrmUnitTests" ` -Image "UbuntuLTS" ...
Administrative tool
- Automation: Do you need to automate a set of complex or repetitive tasks? Azure PowerShell and the Azure CLI support this while the portal does not.
Learning curve: Do you need to complete a task quickly without learning new commands or syntax? The Azure portal does not require you to learn syntax or memorize commands. In Azure PowerShell and the Azure CLI, you must know the detailed syntax for each command you use.
Team skillset: Does your team have existing expertise? For example, your team may have used PowerShell to administer Windows. If so, they will quickly become comfortable using Azure PowerShell.
Comments
Post a Comment