Choose the best tools for managing and configuring your Azure environment

Identify the product options

At a high level, there are two broad categories of management tools: visual tools and code-based tools.

Visual tools provide full, visually friendly access to all the functionality of Azure. However, visual tools might be less useful when you're trying to set up a large deployment of resources with interdependencies and configuration options.

When you're attempting to quickly set up and configure Azure resources, a code-based tool is usually the better choice. Although it might take time to understand the right commands and parameters at first, after they've been entered, they can be saved into files and used repeatedly as needed. Also, the code that performs setup and configuration can be stored, versioned, and maintained along with application source code in a source code-management tool such as Git. This approach to managing hardware and cloud resources, which developers use when they write application code, is referred to as infrastructure as code.

There are two approaches to infrastructure as code: imperative code and declarative code. Imperative code details each individual step that should be performed to achieve a desired outcome. By contrast, declarative code details only a desired outcome, and it allows an interpreter to decide how to best achieve that outcome. This distinction is important because tools that are based on declarative code can provide a more robust approach to deploying dozens or hundreds of resources simultaneously and reliably.

The Azure portal

By using the Azure portal, a web-based user interface, you can access virtually every feature of Azure. The Azure portal provides a friendly, graphical UI to view all the services you're using, create new services, configure your services, and view reports. The Azure portal is how most users first experience Azure. But, as your Azure usage grows, you'll likely choose a more repeatable code-centric approach to managing your Azure resources.

The Azure mobile app

The Azure mobile app provides iOS and Android access to your Azure resources when you're away from your computer. With it, you can:

  • Monitor the health and status of your Azure resources.
  • Check for alerts, quickly diagnose and fix issues, and restart a web app or virtual machine (VM).
  • Run the Azure CLI or Azure PowerShell commands to manage your Azure resources.

Azure PowerShell

Azure PowerShell is a shell with which developers and DevOps and IT professionals can execute commands called cmdlets (pronounced command-lets). These commands call the Azure Rest API to perform every possible management task in Azure. Cmdlets can be executed independently or combined into a script file and executed together to orchestrate:

  • The routine setup, teardown, and maintenance of a single resource or multiple connected resources.
  • The deployment of an entire infrastructure, which might contain dozens or hundreds of resources, from imperative code.

Capturing the commands in a script makes the process repeatable and automatable.

Azure PowerShell is available for Windows, Linux, and Mac, and you can access it in a web browser via Azure Cloud Shell.

Windows PowerShell has helped Windows-centric IT organizations automate many of their on-premises operations for years, and these organizations have built up a large catalog of custom scripts and cmdlets, as well as expertise.

The Azure CLI

The Azure CLI command-line interface is an executable program with which a developer, DevOps professional, or IT professional can execute commands in Bash. The commands call the Azure Rest API to perform every possible management task in Azure. You can run the commands independently or combined into a script and executed together for the routine setup, teardown, and maintenance of a single resource or an entire environment.

In many respects, the Azure CLI is almost identical to Azure PowerShell in what you can do with it. Both run on Windows, Linux, and Mac, and can be accessed in a web browser via Cloud Shell. The primary difference is the syntax you use. If you're already proficient in PowerShell or Bash, you can use the tool you prefer.

ARM templates

Although it's possible to write imperative code in Azure PowerShell or the Azure CLI to set up and tear down one Azure resource or orchestrate an infrastructure comprising hundreds of resources, there's a better way to implement this functionality.

By using Azure Resource Manager templates (ARM templates), you can describe the resources you want to use in a declarative JSON format. The benefit is that the entire ARM template is verified before any code is executed to ensure that the resources will be created and connected correctly. The template then orchestrates the creation of those resources in parallel. That is, if you need 50 instances of the same resource, all 50 instances are created at the same time.

Ultimately, the developer, DevOps professional, or IT professional needs only to define the desired state and configuration of each resource in the ARM template, and the template does the rest. Templates can even execute PowerShell and Bash scripts before or after the resource has been set up.

Analyze the decision criteria

 

Do you need to perform one-off management, administrative, or reporting actions?

Use either Azure PowerShell or the Azure CLI if you need to quickly obtain the IP address of a virtual machine (VM) you've deployed, reboot a VM, or scale an app. You might want to keep custom scripts handy on your local hard drive for certain operations that you perform occasionally.

By contrast, Azure Resource Manager templates (ARM templates) express the infrastructure requirements for your application for a repeatable deployment. ARM templates aren't intended for one-off scenarios but, depending on the scenario, it's possible to use them for this purpose. In these instances, you should prefer PowerShell, Azure CLI scripts, or the Azure portal.

Also, ARM templates can include PowerShell or Azure CLI scripts, which can trigger the execution of ARM templates. This gives you flexibility in choosing the right tool for your particular needs.

You could perform most, if not all, management and administrative actions via the Azure portal. If you're just learning Azure, need to set up and manage resources infrequently, or prefer a visual interface for viewing reports, it makes sense to take advantage of the visual presentation that the Azure portal offers.

However, if you're in a cloud management or administrative role, it's less efficient to rely solely on visual scanning and clicking. To find the settings and information you want to work with, it's often quicker and more repeatable to use the Azure CLI or PowerShell.

The last option in this case is the Azure mobile app, which you can access via an iOS or Android phone or tablet. Because it's full featured, it's likely the best choice when a laptop isn't readily available and you need to view and triage issues immediately.

Do you need a way to repeatedly set up one or more resources and ensure that all the dependencies are created in the proper order?

ARM templates express your application's infrastructure requirements for a repeatable deployment. A validation step ensures that all resources can be created, so that the resources are created in the proper order based on dependencies, in parallel, and idempotent.

By contrast, it's entirely possible to use either PowerShell or the Azure CLI to set up all the resources for a deployment. However, there's no validation step in these tools. If a script encounters an error, the dependency resources can't be rolled back easily, deployments happen serially, and only some operations are idempotent.

When you're scripting, do you come from a Windows administration or Linux administration background?

If you or your cloud administrators come from a Windows administration background, it's likely you'll prefer PowerShell. If you or your cloud administrators come from a Linux administration background, it's likely you'll prefer the Azure CLI. In practice, either tool can be used to perform most one-off administration tasks.

Use the Azure portal to visually understand and manage your cloud environment

Tailwind Traders uses Azure extensively throughout its entire organization. To make sure that both the technical and executive teams are aware of the company's cloud spend, the director of cloud operations will begin to meet weekly with the chief financial officer (CFO) to talk about their cloud spend.

Conversations might begin at a high level, but the two officers might want to dive deep during the meeting to gain more insight into how Azure resources are being used. Ideally, they would be able to see the data displayed visually, but also be able to run custom reports in real time. Which tool can they use during their meeting?

Which service should you choose?

Apply the decision criteria you learned about in the preceding unit to find the right option.

First, in this scenario, does Tailwind Traders need to perform one-off management, administrative, or reporting actions? Yes, and given the requirement to view data visually and create custom reports during the meeting, the Azure portal is the best choice. The meeting attendees can quickly find answers to their questions by using a wealth of reporting options.

The next two decision criteria don't apply to this scenario, because the director of cloud operations and the CFO won't be deploying or configuring any resources.

The Azure portal is the correct product option for this scenario.

Use Azure PowerShell for one-off administrative tasks

Tailwind Traders employs technologists with many different skills. A team of developers and administrators builds and maintains a collection of intranet applications that are vital to the business. The team members have strong backgrounds in Windows development and network administration.

The team moved its applications to the cloud, and it now needs a way to perform one-off testing, management, and administrative tasks in its intranet environment. The team quickly realized that managing Azure from the portal takes too much time and is not repeatable. Which tool should the company use for one-off tasks?

Which service should you choose?

As you did in the preceding unit, apply the decision criteria you learned about earlier to find the right option.

First, in this scenario, does the Tailwind Traders team need to perform one-off management, administrative, or reporting tasks? Yes. However, the team already knows that it doesn't want to rely on the Azure portal for these one-off actions. Therefore, both Azure PowerShell and the Azure CLI are good options. We'll hone in on which tool the team should use in a moment.

Second, in this scenario, does Tailwind Traders need a repeatable and reliable means of deploying its entire infrastructure? No, not in this scenario. Therefore, Azure Resource Manager templates (ARM templates) are not the right choice.

When the Tailwind Traders team is doing scripting, does it come from a Windows administration or Linux administration background? This team has a Windows administration background. It would likely be most comfortable using Azure PowerShell, because this tool allows it to use the syntax it's most comfortable with to perform one-off administration tasks.

Azure PowerShell is the best choice for this scenario.

Use the Azure CLI for one-off administrative tasks

As we noted in the preceding unit, Tailwind Traders employs technologists with many different skills. The DevOps team is primarily concerned with keeping external systems, such as the company's e-commerce site, up and running. This team has a Linux administration background. It frequently needs to perform administrative tasks related to the health of the cloud environment. The team quickly realized that managing Azure from the portal takes too much time and isn't repeatable. Which tool should it use for one-off tasks?

Which service should you choose?

Once again, apply the decision criteria you learned about earlier to find the right option.

Because this scenario is almost identical to the one in the preceding unit, you can skip over the first two criteria. In other words, you can quickly eliminate Azure Resource Manager templates (ARM templates) and the Azure portal as viable options for this scenario. So, let's go to the third decision criterion.

Choosing the right option in this scenario should be determined by the team's background. Because this team has a Linux administration background, it would likely be most comfortable using the Azure CLI. The Azure CLI allows the team to use the Bash shell and its syntax to perform one-off administration tasks.

The Azure CLI is the best choice for this scenario.

Use the Azure mobile app to manage Azure on the go

Tailwind Traders experiences surges in e-commerce traffic that coincide with national holidays and weekends. In the company's first few years, managers of critical systems had to convene at the office of the director of cloud operations during these important periods. However, now that Tailwind Traders has successfully operationalized most critical systems, the director wants to relax this requirement and allow employees to spend these dates with their families. Is there a product that can help support this scenario?

Which service should you choose?

Let's run through our decision criteria again.

First, does Tailwind Traders need to perform one-off management, administrative, reporting actions? Yes. The real question is, how? A phone or tablet solution could help key employees keep an eye on the health of the cloud environment when they're out of the office. The Azure mobile app is likely a good compromise, because it lets employees be away from work and still perform essential, one-off management and administrative tasks.

We can skip the rest of the decision criteria in this unique scenario. The Azure mobile app is the right choice.

Use ARM templates to deploy an entire cloud infrastructure

Tailwind Traders wants to operationalize their cloud deployments. The company needs a repeatable, reliable way to scale its operations during peak sales periods. Because you'll be choosing a process for scaling your production environment, you need to ensure that your chosen service:

  • Is efficient and can potentially create many resources in parallel.
  • Creates all dependencies in the correct order.
  • Can be used without worrying that it failed in the middle of provisioning the necessary infrastructure.

Which service should you choose?

Let's run through the decision criteria one more time.

First, in this scenario, does Tailwind Traders need to perform one-off management, administrative, or reporting actions? This time, we're not looking to support one-time or one-off management or administration tasks. We're looking for a technology to automate the deployment of an entire infrastructure, as needed.

Second, does Tailwind Traders need a repeatable and reliable way to deploy its entire infrastructure? Yes, this is exactly what the company needs. Our decision criteria lead us to choose Azure Resource Manager templates (ARM templates) for this scenario.

You could use Azure PowerShell or the Azure CLI, but these scripting technologies have significant limitations when it comes to deploying infrastructure. ARM templates can help overcome these limitations.

The third decision criterion assumes that you need to write a script by using imperative code. However, when you use ARM templates, you define your infrastructure declaratively by using JSON code. In some instances, you still might need imperative code for configuration or clean-up tasks. In these cases, you can trigger the execution of scripts by using either Azure PowerShell or the Azure CLI to perform these tasks.

In this scenario, ARM templates are the correct choice.

Summary

Our goal in this module was to help Tailwind Traders choose the right cloud management tools from Microsoft for its various technical needs.

We identified a variety of product options and their capabilities, including the Azure portal, the Azure mobile app, Azure PowerShell, the Azure CLI, and Azure Resource Manager templates (ARM templates).

We analyzed decision criteria for choosing one option over another in specific scenarios.

We then applied those decision criteria to three different Tailwind Traders initiatives, helping the company find the best service option for each scenario.

Without a full suite of management tools, the company would be severely limited in how it interacts with Azure. Fortunately, Azure provides a powerful mix of visual management tools, imperative scripting tools, and declarative infrastructure-as-code tools.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值