Thursday, March 10, 2016
Azure Resource Manager
Azure resource manager is your infrastructure team in the cloud. Resource manager is where you bring your infrastructure to life. It is used to group resources together to create a comprehensive and cohesive group of resources.
These can be virtual machines, databases, web applications and more. Everything you would want to deploy, manage and monitor as a collective. The collective can be created, updated or deleted as a whole. This makes deployments, security, auditing and management of environments a lot simpler and more consistent.
The process is also repeatable, making for consistent deployments throughout the entire lifecycle. Useful templates are provided to define dependencies between resources. This gives you quick and easy control over dependencies. In addition, you can apply access control to all the services in your resource group because Role-based access control (“RBAC”) is integrated directly into the platform. The Tag feature is used to logically organize all of the resources in your subscription.
So what are the best ways to take advantage of all these resources?
Resource groups are logical groupings of resources that share the same lifecycle. Keep in mind however, a resource can only exist in a single resource group. Resources can be added or removed from groups at any time or even moved to different group.
Another way to organize resources is by linking them. This can be done by linking resources together that are in different groups but interact with each other and share different lifecycles. This is useful when you have multiple applications that use the same database.
Templates are a great way to quickly define the infrastructure of your deployment. You can rely on the Azure Resource Manager to analyze the dependencies and ensure the resources are created in the correct order.
Conversely, you can customize them in the template. More information on how to write the JSON to customize dependencies can be found here.
Fortunately, when defining your infrastructure, you are not limited in the number of templates you use. It often makes sense to divide your deployment into separate templates, keeping in mind that you can re-use them. To deploy you create a master template that contains links to all the templates in that group. More information on how to link templates can be found here.
One of the more useful features of templates is the ability to specify parameters in your template. Parameters allow for customization and flexibility in your deployment. This allows you to use the same template for a test or production environment by passing different parameter values. By adding the template to your source code you can check it into your source code repository and edit thru Visual Studio.
Along with Templates to organize your deployment, Azure Resource Manager provides a tagging feature. Tagging allows you to categorize resources based on your requirements. This is a good way to logically visualize resources. One example that Microsoft gives that I think would benefit many organizations moving to the cloud is the ability to tag the resources by billing department, or in my case, client. That way I can easily determine the cost related to each client and manage those resources easily. This also allows you to delete all resources related to a Tag. This can be important when a project, or even a specific phase of a project, ends. Tags are not limited to a singe resource group either. You can use the same tag over resource groups. More information on tags can be found here.
Azure resource manager is truly your infrastructure team in the cloud. It makes deployments, security, auditing and management of environments quicker, simpler and more consistent.
In my next post, I will dive into RBAC.