Tutorial / Cram Notes

Deploying resources in Azure is a critical task for administrators, who must configure deployment settings to ensure consistency, security, and compliance with organizational standards. The AZ-104 Microsoft Azure Administrator exam tests a wide range of skills, including deployment and infrastructure management in Azure.

When configuring deployment settings, Azure Resource Manager (ARM) templates are commonly used. ARM templates are JSON files that define the resources you need to deploy for your solution. You can parameterize the templates so they can be used in different environments, like development, testing, and production. ARM templates allow for declarative configuration of resources.

1. Resource Groups

Organize your resources into resource groups. A resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group.

2. Resource Locks

Use resource locks to protect critical Azure resources from accidental deletion or modification. There are two levels of locks:

  • Read-only: Users can read a resource, but they can’t delete or update the resource.
  • Delete: Users can’t delete a resource, but they can still update it.

3. ARM Template Deployment

Deploy resources using ARM templates. Here is a common workflow when deploying an ARM template:

  • Edit the Template: Define the infrastructure needed for your application.
  • Parameterize the Template: Include parameters in your template for values that change based on the deployment environment.
  • Validate the Template: Before deployment, use Azure CLI or PowerShell to ensure the template is valid.
  • Deploy the Template: Use Azure CLI, PowerShell, Azure DevOps, or the Azure portal to deploy your template to the desired resource group.

Example: Deploying an Azure Virtual Network

{
“$schema”: “https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#”,
“contentVersion”: “1.0.0.0”,
“parameters”: {
“virtualNetworkName”: {
“type”: “string”,
“defaultValue”: “VNet1”
},
“addressPrefix”: {
“type”: “string”,
“defaultValue”: “10.0.0.0/16”
}
},
“resources”: [
{
“type”: “Microsoft.Network/virtualNetworks”,
“apiVersion”: “2020-06-01”,
“name”: “[parameters(‘virtualNetworkName’)]”,
“location”: “[resourceGroup().location]”,
“properties”: {
“addressSpace”: {
“addressPrefixes”: [
“[parameters(‘addressPrefix’)]”
]
}
}
}
]
}

4. Deployment Modes

Understand the two deployment modes:

  • Incremental: This is the default mode. It leaves unchanged resources that exist in the resource group but are not specified in the ARM template.
  • Complete: This mode deletes all resources that are not in the ARM template but are in the resource group.

5. Azure Policy

Implement Azure Policy to enforce organizational standards and to assess compliance at-scale. Policies are rules that are enforced at deployment. Create and assign policies to control properties such as the types of resources that can be deployed or the locations in which resources can be deployed.

6. Azure Blueprints

For more complex environments, use Azure Blueprints to orchestrate the deployment of various resource templates and other artifacts, such as role assignments and policy assignments.

Comparison: ARM Templates vs. Azure Blueprints

Feature ARM Templates Azure Blueprints
Scope of Action Can deploy resources Can deploy resources, apply policies, and set up RBAC
Reusability Highly reusable with parameters Centralized management for templates, policies, and RBAC
Environment Setup Suitable for single deployments Designed for setting up consistent environments
Policy & Role Assignments Not included Includes policy and role assignments
Sequence of Deployment Single-step deployment Step-by-step deployment with dependency handling

By carefully configuring deployment settings, Azure Administrators can ensure that they effectively manage their Azure environments, which can be dynamic and complex. Using the right mix of Azure resource management tools and techniques is critical to achieving this goal.

Practice Test with Explanation

True or False: Azure Resource Manager templates are JSON files that can be used to define the deployment and configuration of Azure resources.

  • True

Correct Answer: True

Explanation: Azure Resource Manager templates are indeed JSON files that define the deployment and configuration of resources in Azure, allowing for declarative setup of your cloud environment.

What PowerShell cmdlet can you use to deploy an Azure Resource Manager template?

  • A) New-AzResourceGroupDeployment
  • B) Set-AzResourceGroup
  • C) Update-AzResourceGroup
  • D) New-AzResource

Correct Answer: A) New-AzResourceGroupDeployment

Explanation: The New-AzResourceGroupDeployment cmdlet is used to deploy an Azure Resource Manager template to a resource group in Azure.

True or False: When deploying Azure resources, you need to create a storage account to hold the deployment templates.

  • False

Correct Answer: False

Explanation: It is not necessary to create a storage account to hold the deployment templates. They can be deployed directly from your local machine, GitHub, or Azure DevOps, among others.

Which of the following can be used to automate the deployment of Azure resources?

  • A) Azure Portal
  • B) Azure CLI
  • C) Azure PowerShell
  • D) All of the above

Correct Answer: D) All of the above

Explanation: Azure Portal, Azure CLI, and Azure PowerShell are all tools that can be used to automate the deployment of Azure resources.

True or False: Azure Policy can be used to enforce organizational standards and assess compliance at-scale.

  • True

Correct Answer: True

Explanation: Azure Policy is a service in Azure that can be used to create, assign, and manage policies to enforce organizational standards and to assess compliance across all Azure resources.

What feature allows you to manage and track multiple versions of an Azure Resource Manager template?

  • A) Azure Template Spec
  • B) Azure Storage Account
  • C) Azure Policies
  • D) Azure Resource Groups

Correct Answer: A) Azure Template Spec

Explanation: Azure Template Spec is a feature that allows you to manage and track multiple versions of ARM templates and their parameters.

True or False: You can use Azure DevOps to build continuous integration and continuous deployment (CI/CD) workflows for Azure resource deployments.

  • True

Correct Answer: True

Explanation: Azure DevOps provides services for continuous integration and continuous deployment (CI/CD) that can automate the process of deploying resources to Azure.

To rollback a deployment operation, which of the following command is used?

  • A) az deployment group cancel
  • B) az deployment group wait
  • C) az deployment group rollback
  • D) az deployment group delete

Correct Answer: A) az deployment group cancel

Explanation: The `az deployment group cancel` command is used to cancel a currently running deployment, which is effectively rolling back the in-progress changes.

True or False: You can enable automatic redeployment of successful deployments in Azure Resource Manager (ARM) deployments for when a deployment fails.

  • False

Correct Answer: False

Explanation: Azure Resource Manager does not support automatic redeployment of successful deployments when a deployment fails. Redeployment has to be explicitly initiated by the user.

Which service aids in deploying complex applications across multiple Azure services and lifecycle environments?

  • A) Azure Blueprint
  • B) Azure Application Gateway
  • C) Azure Resource Manager templates
  • D) Azure Logic Apps

Correct Answer: A) Azure Blueprint

Explanation: Azure Blueprint enables the creation of a repeatable set of Azure resources that implements and adheres to an organization’s standards, patterns, and requirements.

True or False: You can use Azure Tags to logically organize Azure resources across different resource groups and subscriptions.

  • True

Correct Answer: True

Explanation: Azure Tags allow you to annotate resources with name/value pairs for organizational purposes across different resource groups and subscriptions.

Which of the following deployment scopes are available for Azure Resource Manager templates?

  • A) Resource group
  • B) Subscription
  • C) Management group
  • D) All of the above

Correct Answer: D) All of the above

Explanation: Azure Resource Manager templates can be deployed at the resource group, subscription, and management group scope, allowing for flexible deployment strategies across your Azure environment.

Interview Questions

What is the importance of configuring deployment settings in Azure App Service?

Configuring deployment settings in Azure App Service is important to ensure that your application is deployed smoothly and with minimal downtime.

What are the two main deployment methods for Azure App Service?

The two main deployment methods for Azure App Service are Code-based and Container-based.

How does continuous deployment help in deploying updates to an application in Azure App Service?

Continuous deployment enables you to automatically deploy updates to your application, ensuring that your application is always up-to-date.

What are deployment slots in Azure App Service?

Deployment slots are a best practice that enables you to deploy updates to a staging environment before deploying to the production environment.

How can source control help in tracking changes to an application’s code in Azure App Service?

Source control enables you to track changes to your application’s code and collaborate with other developers.

What are the benefits of using deployment slots in Azure App Service?

The benefits of using deployment slots in Azure App Service include the ability to test updates before deploying to the production environment, minimizing the risk of errors and downtime.

Can you have multiple deployment slots in Azure App Service?

Yes, you can have multiple deployment slots in Azure App Service.

What is the difference between production and non-production deployment slots in Azure App Service?

Production deployment slots are used for the live production environment, while non-production deployment slots are used for testing and development.

How can you monitor your deployment in Azure App Service?

You can monitor your deployment by reviewing the App Service logs and performance metrics in the Azure portal.

How can you automate your deployment in Azure App Service?

You can automate your deployment in Azure App Service by using continuous deployment, source control, and deployment slots.

What is the purpose of a deployment center in Azure App Service?

The purpose of a deployment center in Azure App Service is to provide a centralized location for managing deployments.

Can you customize the deployment settings in Azure App Service?

Yes, you can customize the deployment settings in Azure App Service to meet the specific needs of your application.

What is a deployment script in Azure App Service?

A deployment script is a script that enables you to automate the deployment process in Azure App Service.

How can you rollback a deployment in Azure App Service?

You can rollback a deployment in Azure App Service by using the deployment slots and rolling back to a previous version.

What is the benefit of using a rolling deployment strategy in Azure App Service?

The benefit of using a rolling deployment strategy in Azure App Service is that it allows you to deploy updates without downtime or impact on users.

0 0 votes
Article Rating
Subscribe
Notify of
guest
18 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jarik Loos
11 months ago

How do you configure the deployment credentials in Azure?

Jacob Andersen
1 year ago

Can you use Azure CLI to set deployment settings?

Ronnie Washington
1 year ago

Is there a difference between ARM templates and Bicep for deployment?

کوروش موسوی

What should be considered when setting up CI/CD pipelines for Azure?

Sara Moya
1 year ago

How does Azure DevOps fit into configuring deployment settings?

Elmer Brooks
1 year ago

Thanks! This blog post has been very helpful!

Gislinde Kloth
2 years ago

Can I use Terraform with Azure for deployment?

Gregorio Diez
1 year ago

Anyone has issues with continuous deployment from GitHub?

18
0
Would love your thoughts, please comment.x
()
x