{"id":62081,"date":"2021-08-17T06:00:08","date_gmt":"2021-08-17T14:00:08","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=62081"},"modified":"2021-07-29T07:22:24","modified_gmt":"2021-07-29T15:22:24","slug":"azurefunbytes-episode-51-deploy-with-arm-templates-with-shankuehn","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/azurefunbytes-episode-51-deploy-with-arm-templates-with-shankuehn\/","title":{"rendered":"AzureFunBytes Episode 51 &#8211; Deploy With ARM Templates with @shankuehn"},"content":{"rendered":"<p>AzureFunBytes is a weekly opportunity to learn more about the fundamentals and foundations that make up Azure. It&#8217;s a chance for me to understand more about what people across the Azure organization do and how they do it. Every week we get together at 11 AM Pacific on <a href=\"https:\/\/cda.ms\/226\">Microsoft LearnTV<\/a> and learn more about Azure.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--Z7BxBMz1--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/j2xzw2g664tj31jij13t.gif\" alt=\"AzureFunBytes animation\" \/><\/p>\n<p>ARM templates are a JSON file that helps you define what exactly you need to do in your Azure deployment.  You do not need to know a specific programming language in order to use this declarative syntax. Specify your needs in this template and send it to ARM using native tools such az Azure CLI or the portal.<\/p>\n<p>To help me share the beauty of ARM templates, I welcomed Microsoft Senior Cloud Advocate <a href=\"https:\/\/twitter.com\/shankuehn\">Shannon Kuehn<\/a> to the show.  Shannon comes with years of experience in deploying using a variety of IaC tools.  A self-described tinkerer, Shannon has worked with technical mentors and colleagues who have helped her develop proficiencies in infrastructure.<\/p>\n<p><iframe title=\"AzureFunBytes Episode 51 - Deploy With ARM Templates with @shankuehn\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/B1pc1Fs82fY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=213\">00:03:33 &#8211; Let&#8217;s meet Shannon<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=746\">00:12:26 &#8211; Introducing ARM Templates<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=1128\">00:18:48 &#8211; Understanding structure and syntax<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=1359\">00:22:39 &#8211; Quickstart templates<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=1614\">00:26:54 &#8211; Deploy to Azure button<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=1729\">0:28:49 &#8211; Authoring templates with Visual Studio 2019<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=2028\">00:33:48 &#8211; Templates in Visual Studio Code<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=2303\">00:38:23- Exporting your template in the portal<\/a><br>\n<a href=\"https:\/\/youtu.be\/4N174v3YnjE?t=2597\">00:43:17 &#8211; Deploying a Virtual Machine<\/a><br><\/p>\n<p>Our Agenda:<\/p>\n<ol>\n<li>\n<p>Intro\/background<\/p>\n<\/li>\n<li>\n<p>Declarative code vs. imperative.<\/p>\n<ol>\n<li>Talk terms and stress the importance of idempotency with cloud scale deployments of infrastructure.<\/li>\n<li>ARM is based upon JSON, which is the response you get from calling an Azure REST API directly.<\/li>\n<li>Highlight the difference between ARM Templates and Bicep (i.e. ARM came first.)<\/li>\n<li>ARM Templates encompass the full gambit of deployments: simple (single storage account, 1 VM), intermediate (2 VMs in the same VNet in an Availability Set), advanced (VM deployment using DSC\/Custom Script Extension, nested templates)<\/li>\n<\/ol>\n<\/li>\n<li>How to get started? Where to go? \n<ol>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-quickstart-templates\">Azure Quickstart GitHub Repo<\/a><\/li>\n<li><a href=\"https:\/\/cda.ms\/2f5\">Azure ARM Template Reference<\/a><\/li>\n<li><a href=\"https:\/\/cda.ms\/2f7\">Microsoft Learn Path<\/a><\/li>\n<li><a href=\"https:\/\/cda.ms\/2f8\">ARM Template best practices<\/a><\/li>\n<li>A few books, courses, and publications also have helped me out in making sense of things<\/li>\n<li>PLUS \u2013 Maybe even finding a dev who can help you understand concepts if you get a lot of errors when deploying and how to make sense of something if you\u2019re stuck. <\/li>\n<\/ol>\n<\/li>\n<li><a href=\"https:\/\/cda.ms\/2ff\">What makes up an ARM template?<\/a> (move to my local machine to demonstrate this with real live code)\n<ol>\n<li>Start with a basic template format in <a href=\"https:\/\/cda.ms\/2fb\">Visual Studio Code<\/a>.<\/li>\n<li>Highlight what are <a href=\"https:\/\/cda.ms\/2fg\">parameters<\/a>, <a href=\"https:\/\/cda.ms\/2fh\">variables<\/a>, <a href=\"https:\/\/cda.ms\/2fj\">functions<\/a>, <a href=\"https:\/\/cda.ms\/2fm\">resources<\/a>, and <a href=\"https:\/\/cda.ms\/2fn\">outputs<\/a>.<\/li>\n<li>Go over <a href=\"https:\/\/cda.ms\/2fp\">metadata<\/a> and comments to help ARM templates make sense to someone brand new.<\/li>\n<li>Go over the reasoning behind using all of these components, indicating the only required component is the resource section (but every section has a function).<\/li>\n<li>Talk about API versions\/schema and why that\u2019s relevant (i.e. Private Link is a newer resource, so you\u2019d pick a newer API when building out your ARM templates)<\/li>\n<\/ol>\n<\/li>\n<li>Start with a vNet. Deploy the vNet with a PowerShell script that I\u2019ll highlight.\n<ol>\n<li>Move to the portal and showcase where it lives.<\/li>\n<li>Add a VM to the same vNet. Deploy with the same PowerShell script. Highlight that the template didn\u2019t deploy 2 vNets\u2026only 1\u2026and that really showcases the idempotency of declarative syntax vs. imperative syntax.<\/li>\n<li>Add a storage account and configure it as a file share that you can mount from within the VM. Part of this exercise will be to RDP into the VM and showing how to mount the file share.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<hr \/>\n<p>Learn about Azure fundamentals with me!<\/p>\n<p>Live stream is normally found on Twitch, YouTube, and <a href=\"https:\/\/cda.ms\/226\">LearnTV<\/a> at 11 AM PT \/ 2 PM ET Thursday. You can also find the recordings here as well:<\/p>\n<p><a href=\"https:\/\/twitch.tv\/azurefunbytes\">AzureFunBytes on Twitch<\/a><br>\n<a href=\"https:\/\/aka.ms\/jaygordononyoutube\">AzureFunBytes on YouTube<\/a><br>\n<a href=\"https:\/\/www.youtube.com\/channel\/UC-ikyViYMM69joIAv7dlMsA\">Azure DevOps YouTube Channel<\/a><br>\n<a href=\"https:\/\/twitter.com\/azurefunbytes\">Follow AzureFunBytes on Twitter<\/a><br><\/p>\n<p>Useful Docs:<\/p>\n<p><a href=\"https:\/\/cda.ms\/219\">Get $200 in free Azure Credit<\/a><br>\n<a href=\"https:\/\/cda.ms\/243\">Microsoft Learn: Introduction to Azure fundamentals<\/a><br>\n<a href=\"https:\/\/cda.ms\/2f6\">What are ARM templates?<\/a> <br>\n<a href=\"https:\/\/cda.ms\/2f5\">Define resources in ARM templates<\/a> <br>\n<a href=\"https:\/\/cda.ms\/2f7\">Microsoft Learn: Deploy and manage resources in Azure using JSON ARM templates<\/a> <br>\n<a href=\"https:\/\/cda.ms\/2f8\">ARM template best practices<\/a><br>\n<a href=\"https:\/\/cda.ms\/2fb\">Quickstart: Create ARM templates with Visual Studio Code<\/a><br>\n<a href=\"https:\/\/cda.ms\/2fM\">Tutorial: Create and deploy your first ARM template<\/a><br>\n<a href=\"https:\/\/cda.ms\/2fc\">Quickstart: Create and deploy template spec<\/a><br>\n<a href=\"https:\/\/cda.ms\/2fd\">Tutorial: Utilize the ARM template reference<\/a><br>\n<a href=\"https:\/\/www.shankuehn.io\/post\/how-to-use-keyvault-for-arm-template-deployments\">How to use Key Vault for ARM Template Deployments<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ARM templates are a JSON file that helps you define what exactly you need to do in your Azure deployment.  You do not need to know a specific programming language in order to use this declarative syntax.<\/p>\n","protected":false},"author":39313,"featured_media":62082,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224,1],"tags":[],"class_list":["post-62081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-devops"],"acf":[],"blog_post_summary":"<p>ARM templates are a JSON file that helps you define what exactly you need to do in your Azure deployment.  You do not need to know a specific programming language in order to use this declarative syntax.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/62081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/39313"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=62081"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/62081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/62082"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=62081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=62081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=62081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}