{"id":60202,"date":"2020-11-23T07:01:24","date_gmt":"2020-11-23T15:01:24","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=60202"},"modified":"2020-11-23T09:20:48","modified_gmt":"2020-11-23T17:20:48","slug":"azurefunbytes-short-cloud-shell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/azurefunbytes-short-cloud-shell\/","title":{"rendered":"AzureFunBytes Short &#8211; Cloud Shell"},"content":{"rendered":"<p>The <a href=\"https:\/\/azure.microsoft.com\/features\/cloud-shell\/?WT.mc_id=devops-11005-jagord\">Azure Cloud Shell<\/a> is one of my favorite things about using Azure. Many of the administrative tasks that I may have had to run from a local computer can now be done from a browser anywhere I can authenticate into my Azure account. I used to always worry about needing a computer that had a shell or a terminal program with my ssh key on it all the time. Now, I keep much of this on my Azure Cloud Shell on my local computer so I can work pretty much anywhere.<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/azure\/cloud-shell\/overview?WT.mc_id=devops-11005-jagord\">Azure Cloud Shell<\/a> is an interactive, authenticated, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell.<\/p>\n<p>With <a href=\"https:\/\/docs.microsoft.com\/azure\/cloud-shell\/overview?WT.mc_id=devops-11005-jagord\">Azure Cloud Shell<\/a>, you&#8217;ll have full access to create, modify, manage, and destroy your Azure resources [right from your browser or your local <a href=\"https:\/\/docs.microsoft.com\/azure\/cloud-shell\/quickstart?WT.mc_id=devops-11005-jagord\">terminal.<\/a>.<\/p>\n<p><iframe title=\"AzureFunBytes Short - Azure Cloud Shell\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/ca7kY43EYJw?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>Azure Cloud Shell includes an integrated file editor built from the open-source <a href=\"https:\/\/github.com\/Microsoft\/monaco-editor\">Monaco Editor<\/a>. The Cloud Shell editor supports features such as language highlighting, the command palette, and a file explorer.<\/p>\n<p>The Azure Cloud Shell can run either <a href=\"https:\/\/docs.microsoft.com\/azure\/cloud-shell\/quickstart?WT.mc_id=devops-11005-jagord\">bash<\/a> or <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cloud-shell\/quickstart-powershel?WT.mc_id=devops-11005-jagord\">Powershell<\/a>.<\/p>\n<p><strong>FYI:<\/strong> Creating storage is only required the first time!<\/p>\n<ol>\n<li>\n<p>Launch Cloud Shell from the top navigation of the Azure portal.<\/p>\n<\/li>\n<li>\n<p>Select a subscription to create a storage account and Microsoft Azure Files share.<\/p>\n<\/li>\n<li>\n<p>Select &#8220;Create storage&#8221;<\/p>\n<\/li>\n<li>\n<p>Select the Bash environment.<\/p>\n<\/li>\n<\/ol>\n<p>Great. Now let&#8217;s open a new tab from the Cloud Shell and get a full-size shell, or you can just navigate your browser to <a href=\"https:\/\/shell.azure.com\">https:\/\/shell.aure.com<\/a> to access full view:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/thepracticaldev.s3.amazonaws.com\/i\/v556tb9l4swzfi6043v6.png\" alt=\"\" \/><\/p>\n<p>There are a number of tools that as a SysAdmin moving to the Cloud you may find helpful.<\/p>\n<h2>Cool Tools!<\/h2>\n<p>Let&#8217;s look at some of the CLI tools available to make your life much easier when you&#8217;re getting started with Azure.<\/p>\n<h3>code<\/h3>\n<p>There&#8217;s a simple version of VS Code that&#8217;s part of your Azure Cloud Shell Envrionment that will allow you to create or edit files right in your shell. Need a scratch pad while running a demo? That&#8217;s another really cool feature. To access it, just type <code>code<\/code> in your shell:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/thepracticaldev.s3.amazonaws.com\/i\/c3iuocr1h066gedg6s8h.gif\" alt=\"\" \/><\/p>\n<h3>Ansible<\/h3>\n<p>Ansible is a tool for automating apps and infrastructure by utilizing YAML based playbooks that have become part of many SysAdmin&#8217;s daily tasks.<\/p>\n<p>Ansible is ready to use in the Azure Cloud Shell permitting you to begin immediately with existing playbooks you may have written elsewhere. No agents are required, just prep your ssh key and get working.<\/p>\n<p>You can watch my full video on using Ansible with Azure here:<\/p>\n<p><iframe title=\"Getting Started with Ansible on Azure\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/dBvLrjrB82Y?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<h3>kubectl<\/h3>\n<p>If you plan on using the <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/kubernetes-service\/?WT.mc_id=devops-11005-jagord\">Azure Kubernetes Service<\/a>, you&#8217;re going to need to familiarize yourself with <a href=\"https:\/\/kubernetes.io\/docs\/reference\/kubectl\/overview\/\">kubectl<\/a> which is available right in your Cloud Shell with no additional installation required. <code>Kubectl<\/code> is the command line interface you&#8217;ll use to work with your AKS clusters.<\/p>\n<p>Here&#8217;s an example of using <code>kubectl<\/code> to get credentials of an AKS cluster I built along with the status of the cluster nodes:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/thepracticaldev.s3.amazonaws.com\/i\/s6z03seb2tjia7k28bki.png\" alt=\"\" \/><\/p>\n<h3>Hashicorp Terraform<\/h3>\n<p>Another really popular method of deploying your infrastructure to Azure is by using <a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/overview?WT.mc_id=devops-11005-jagord\">Terraform<\/a> by Hashicorp. <a href=\"https:\/\/www.terraform.io\/\">Hashicorp Terraform<\/a> is an open-source tool for provisioning and managing cloud infrastructure. It codifies infrastructure in configuration files that describe the topology of cloud resources. These resources include virtual machines, storage accounts, and networking interfaces. The <a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/get-started-cloud-shell?WT.mc_id=devops-11005-jagord\">Terraform CLI<\/a> provides a simple mechanism to deploy and version the <a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/store-state-in-azure-storage?WT.mc_id=devops-11005-jagord\">configuration files to Azure<\/a>.<\/p>\n<p>Terraform is adept at deploying an infrastructure across multiple cloud providers. It enables developers to use consistent tooling to manage each infrastructure definition.<\/p>\n<p>You can read more information on Terraform on Azure at the following links:<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/overview?WT.mc_id=devops-11005-jagord\">Terraform with Azure<\/a><br \/>\n<a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/get-started-cloud-shell?WT.mc_id=devops-11005-jagord\">Quickstart: Configure Terraform using Azure Cloud Shell<\/a><br \/>\n<a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/create-k8s-cluster-with-tf-and-aks?WT.mc_id=devops-11005-jagord\">Create a Kubernetes cluster with Azure Kubernetes Service using Terraform<\/a><br \/>\n<a href=\"https:\/\/docs.microsoft.com\/azure\/developer\/terraform\/best-practices-testing-overview?WT.mc_id=devops-11005-jagord\">Tutorial: Terraform testing overview<\/a><\/p>\n<h3>az<\/h3>\n<p>Of course Azure is going to have CLI tools for you to manage your resources! The <code>az<\/code> tool is everything you need right from the same browser-based shell! <a href=\"https:\/\/docs.microsoft.com\/en-us\/cli\/azure\/?view=azure-cli-latest?WT.mc_id=devops-11005-jagord\">The Azure command-line interface (CLI)<\/a> is Microsoft&#8217;s cross-platform command-line experience for managing Azure resources. The Azure CLI is easy to learn and the perfect tool for building custom automation that works with Azure resources.<\/p>\n<p>I really recommend checking out the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/aks\/kubernetes-walkthrough?toc=%2fcli%2fazure%2ftoc.json\/?WT.mc_id=devops-11005-jagord\">Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using the Azure CLI<\/a> tutorial to get a great walk-through of using AKS along with the Azure CLI.<\/p>\n<h3>ssh<\/h3>\n<p>Having a place you can always ssh into the production environment that you trust is important. Cloud Shell allows you to provide your ssh keys as you would in almost any other &#8220;Linux&#8221; environment to log into systems when you need to.<\/p>\n<h2>AzureFunBytes!<\/h2>\n<p>Byte-sized content with a live Twitch show!<\/p>\n<p>Learn about Azure fundamentals with me!<\/p>\n<p>Live stream is available on Twitch at 2 pm EST Thursday.<\/p>\n<p>Join me, ask questions, and learn about Azure!<\/p>\n<p>You can also find the recordings:<\/p>\n<p><a href=\"https:\/\/twitch.tv\/azurefunbytes\">AzureFunBytes on Twitch<\/a><br \/>\n<a href=\"https:\/\/twitter.com\/azurefunbytes\">AureFunBytes on Twitter<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/jaygordononyoutube\">AzureFunBytes on YouTube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Azure Cloud Shell is one of my favorite things about using Azure. Many of the administrative tasks that I may have had to run from a local computer can now be done from a browser anywhere I can authenticate into my Azure account. I used to always worry about needing a computer that had [&hellip;]<\/p>\n","protected":false},"author":39313,"featured_media":60228,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224,226,1,225,249,223],"tags":[],"class_list":["post-60202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-ci","category-devops","category-git","category-open-source","category-package-management"],"acf":[],"blog_post_summary":"<p>The Azure Cloud Shell is one of my favorite things about using Azure. Many of the administrative tasks that I may have had to run from a local computer can now be done from a browser anywhere I can authenticate into my Azure account. I used to always worry about needing a computer that had [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/60202","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=60202"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/60202\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/60228"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=60202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=60202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=60202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}