Skip to content
Permalink
Browse files

deploy

  • Loading branch information...
mbcrump committed Jul 28, 2019
1 parent dcdb263 commit 58df4f3406d3941857c8255a129690749e79b0ea
BIN +0 Bytes (100%) .DS_Store
Binary file not shown.
@@ -31,8 +31,8 @@ module.exports = {
},
{
title: 'Recently Added',
collapsable: true,
children: ['/blog/tip209','/blog/tip208','/blog/tip207', '/blog/tip206','/blog/tip205','/blog/tip204','/blog/tip203','/blog/tip202','/blog/tip201', '/blog/tip200', '/blog/tip199', '/blog/tip198', '/blog/tip197', '/blog/tip196', '/blog/tip195','/blog/tip194','/blog/tip193', '/blog/tip192', '/blog/tip191', '/blog/tip190']
collapsable: false,
children: ['/blog/tip211','/blog/tip210','/blog/tip209','/blog/tip208','/blog/tip207', '/blog/tip206','/blog/tip205','/blog/tip204','/blog/tip203','/blog/tip202','/blog/tip201', '/blog/tip200', '/blog/tip199', '/blog/tip198', '/blog/tip197', '/blog/tip196', '/blog/tip195','/blog/tip194','/blog/tip193', '/blog/tip192', '/blog/tip191', '/blog/tip190']
},
{
title: 'App Service',
@@ -58,6 +58,11 @@ module.exports = {
children: ['/blog/tip81',
'/blog/tip139']
},
{
title: 'Blueprints',
collapsable: true,
children: ['/blog/tip210']
},
{
title: 'CDN',
collapsable: true,
@@ -101,7 +106,7 @@ module.exports = {
{
title: 'Functions',
collapsable: true,
children: ['/blog/tip196','/blog/tip35', '/blog/tip36', '/blog/tip50', '/blog/tip51', '/blog/tip52', '/blog/tip61', '/blog/tip62', '/blog/tip63', '/blog/tip64', '/blog/tip94', '/blog/tip97', '/blog/tip98', '/blog/tip99', '/blog/tip100', '/blog/tip130', '/blog/tip133', '/blog/tip134', '/blog/tip135', '/blog/tip136', '/blog/tip147', '/blog/tip148', '/blog/tip157', '/blog/tip158', '/blog/tip161']
children: ['/blog/tip211','/blog/tip196','/blog/tip35', '/blog/tip36', '/blog/tip50', '/blog/tip51', '/blog/tip52', '/blog/tip61', '/blog/tip62', '/blog/tip63', '/blog/tip64', '/blog/tip94', '/blog/tip97', '/blog/tip98', '/blog/tip99', '/blog/tip100', '/blog/tip130', '/blog/tip133', '/blog/tip134', '/blog/tip135', '/blog/tip136', '/blog/tip147', '/blog/tip148', '/blog/tip157', '/blog/tip158', '/blog/tip161']
},
{
title: 'HD Insight',
@@ -152,7 +157,7 @@ module.exports = {
{
title: 'PowerShell',
collapsable: true,
children: ['/blog/tip198', '/blog/tip194', '/blog/tip24', '/blog/tip120', '/blog/tip137']
children: ['/blog/tip211','/blog/tip198', '/blog/tip194', '/blog/tip24', '/blog/tip120', '/blog/tip137']
},
{
title: 'Productivity',
BIN +0 Bytes (100%) .vuepress/public/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@ type: post

# Welcome

Welcome to Azure Tips and Tricks, this site is a special collection of over 180+ tips, videos, conference talks, and 2 eBooks that span the entire universe of the Azure platform. The tips you'll find here are based on real-world scenarios that the community has encountered while using Azure. Feel free to jump in and come back weekly for new tips! - Michael Crump ([@mbcrump](https://twitter.com/mbcrump))
Welcome to Azure Tips and Tricks, this site is a special collection of over 210+ tips, videos, conference talks, and eBooks that span the entire universe of the Azure platform. The tips you'll find here are based on real-world scenarios that I've encountered (along with the community) while using Azure. Feel free to jump in and come back weekly for new tips! - Michael Crump ([@mbcrump](https://twitter.com/mbcrump))

::: tip What's New?
:calendar: Check out the **Recently Added** item on the left sidebar :point_left:for the latest tips and tricks!
@@ -20,7 +20,7 @@ Welcome to Azure Tips and Tricks, this site is a special collection of over 180+
| Resouce | Description |
|--- |---
| [Home](http://azuredev.tips) | This site can always be found at [http://azuredev.tips](http://azuredev.tips) |
| [Videos](http://videos.azuredev.tips) | Our growing playlist of 50+ videos based on the series |
| [Videos](http://videos.azuredev.tips) | Our growing playlist of 65+ videos based on the series |
| [eBook Vol 1](http://ebook.azuredev.tips) and [eBook Vol 2](http://ebookvol2.azuredev.tips) | We have two volumes of Azure Tips and Tricks in an eBook format based on the best tips of all time |
| [Questions](https://github.com/Microsoft/AzureTipsAndTricks/issues/new?assignees=&labels=&template=questions.md&title=) | Add to the GitHub issue tracker and tag it as a question |
| [RSS Feed](https://microsoft.github.io/AzureTipsAndTricks/rss.xml) | Keep up to date with all the newest tips posted by subscribing to the RSS feed |
@@ -0,0 +1,101 @@
---
type: post
title: "Tip 210 - Working with Azure Blueprints"
excerpt: "Learn how to work with Azure Blueprints"
tags: [azure, blueprints]
share: true
date: 2019-07-28 02:00:00
---

::: tip

:fire: If you'd like to learn more Azure Tips and Tricks, then follow me on [twitter](http://twitter.com/mbcrump) or stay tuned to this blog!.

:tv: Watch the video : [How to work with Azure Blueprints ](https://www.youtube.com/watch?v=MeLf-cg_8nc&list=PLLasX02E8BPCNCK8Thcxu-Y-XcBUbhFWC&index=64&t=0s?WT.mc_id=youtube-azuredevtips-micrum).

:bulb: Learn more : [Azure Blueprints](https://docs.microsoft.com/en-us/azure/governance/blueprints/overview?WT.mc_id=docs-azuredevtips-micrum)
:::

#### Working with Azure Blueprints

It is important to have a repeatable process to create and update your Azure resources. For instance, you should create code, like Azure resource Manager (ARM) Templates, to create and update your environment with. When you have this, you can easily create and destroy an environment, like a development environment, that has all sorts of resources in it, like a Cosmos DB and a couple of Web Apps. Using templates like these, you ensure that your environments are always the same and that they can be created and destroyed quickly, because they don't require manual work. In addition to ARM templates, you should also automate the granting and revoking of access rights and applying compliance policies on resources.

All of this can be managed with [Azure Blueprints](https://azure.microsoft.com/services/blueprints?WT.mc_id=azure-azuredevtips-micrum). Azure Blueprints provides a mechanism that allows you to create and update artifacts (like policies and ARM templates) and assign them to environments and version them. Using this, you can store these artifacts and manage their versions and relate them to environments. For instance, you can see that version 1.1 of the dev environment blueprint is deployed to the xyz-subscription.

Let's take a look at how to create and assign an Azure Blueprint.

#### 1. Create a new Azure Blueprint

We'll create a new Azure Blueprint and its artifacts in the Azure portal.

1. You can find Azure Blueprint under the Policy service. In the Azure portal, go to **All resources** and search for **Blueprint**. You should find the **Blueprint** service. Click on it
2. In the Azure Blueprint blade, the **Getting started** blade opens automatically. Click on the **Create** button

<img :src="$withBase('/files/CreateABlueprint.png')">

(Create a Blueprint in the Azure portal)

4. Fill in a **Name** for the Blueprint
5. Select the Blueprint **definition location**. This is where the Blueprint wll be stored. The location is an **Azure Management Group**. If you don't have one yet, you need to create one. You can do that by searching for **Management Group** in the **All Resources** tab in the Azure portal and creating one from there. You should make sure to move the Management group under a subscription, so that the subscription is its parent. You can also create different hierarchies, which determine the scope of your Blueprint. You can learn more about that [here](https://docs.microsoft.com/azure/governance/blueprints/overview?WT.mc_id=docs-azuredevtips-micrum)

<img :src="$withBase('/files/FoldSubscriptionIntoManagementGroup.png')">

(Make sure that the Management Group has a parent subscription)

6. Once you've filled in all of the Blueprint definition details, click on **Next: Artifacts**
7. You can now create the contents of the Blueprint. You can add things like **Role assignments**, **ARM templates** and **Policies**

<img :src="$withBase('/files/AddBlueprintArtifacts.png')">

(Add Blueprint artifacts)

8. Add some artifacts and add at least one that creates a resource group

<img :src="$withBase('/files/CreateResourceGroupArtifact.png')">

(Add Blueprint a Resource Group artifact)

9. Click **Save draft** to save the Blueprint. It will now be saved but it won't be deployed yet

#### 2. Publish and assign the Azure Blueprint

The Blueprint is now saved as a draft. You can now publish it and assign it to a subscription to deploy it.

1. First, we need to publish the blueprint. This takes it out of the **draft status**, which means that you can't make any changes to this version of the blueprint anymore. In the **Blueprints Definitions** menu, find and navigate to your blueprint
2. Now click **Publish Blueprint** and assign a **version number** to it
3. Click Publish to mark the Blueprint as published and ready to assign

<img :src="$withBase('/files/PublishBlueprint.png')">

(Publish Blueprint in the Azure portal)

4. We can now assign the published blueprint to a subscription. Again, navigate to the blueprint from the **Blueprint Definitions** menu
5. Right-click on the blueprint (or left-click on the ellipsis) and select **Assign Blueprint**
6. Pick the **subscription** that you want to assign the blueprint to (all of the artifacts in the blueprint will be deployed to this subscription)
7. Fill in a **Name** for the assignment
8. Select a **location** that will be used to deploy the managed identity in that will be used to deploy your blueprint
9. Select the publication **version** of the blueprint that you want to assign
10. Leave the **Lock** setting to **Don't Lock**
11. Now fill in the **parameter values** for the artifacts. Some of them need values from you, like the identity of a user assignment or a name for a resource group
12. Click **Assign** to assign the blueprint and make it start deploying the artifacts to the subscription

<img :src="$withBase('/files/PublishBlueprint.png')">

(Assign Blueprint in the Azure portal)

Now that the blueprint has been assigned, you can see its status in the **Assigned Blueprints** menu. From there, you can view details about the assignment (like how the deployment is doing) and update or un-assign the blueprint.

<img :src="$withBase('/files/BlueprintAssignment.png')">

(Assigned Blueprints in the Azure portal)

Finally, the deployment will be finished and the resources will be deployed. In my case, I've deployed a Web App, that gets a simple website from a Git repository. All of which, is described in the ARM template in the blueprint. This results in a fully deployed and running application.

<img :src="$withBase('/files/RunTheAppblue.png')">

(Simple website running in a Web App deployed by the Azure Blueprint)

#### Conclusion

Azure Blueprints is a great way to link deployments to deployment artifacts. This way, you can keep track of what is deployed, what version of the deployment scripts (artifacts) was used and manage the deployment and artifact lifecycle effectively. In the example above, we did all of that manually. You can also automate this process using tools like Azure DevOps. Go and check it out!

0 comments on commit 58df4f3

Please sign in to comment.
You can’t perform that action at this time.