Azure Cloud Shell Overview: Manage and develop your Azure Resources on the Browser
You're not all that new to Microsoft Azure. You've used different services, deployed servers, and created some cool applications. Maybe you've even automated some stuff using the Azure portal.
Have you found it quite challenging to use the Azure Portal GUI?
You're not alone, and getting lost is simple. The azure overview blades might be awkward because so many changes and updates are made daily. Instead of navigating a graphical user interface, we may control Azure resources using PowerShell or Bash, thanks to Azure Cloud Shell.
What precisely is Azure Cloud Shell? Let's dive in to know more!
Here's everything we'll cover:
- What is Azure Cloud Shell?
- How to access Azure Cloud Shell?
- Azure Cloud Shell Features and Tools
- Advantages of Azure Cloud Shell
- Azure Cloud Shell Pricing
- Learn Azure Cloud Shell
What is Azure Cloud Shell?
Azure PowerShell is essentially a Windows PowerShell extension. It enables users of Windows PowerShell to manage Azure's extensive capability. Azure PowerShell programmers utilize pre-written scripts called cmdlets from the command line to carry out challenging operations like deploying virtual machines (VMs) or building cloud services. APS can also automate tasks by using programming. While some users say that the terminal feels "unfinished" and that assistance is inadequate, supporters point out that the ease of use helps with tasks that are generally difficult.
With Azure Cloud Shell, you can:
- Run commands and scripts against your Azure resources in a single command-line interface that supports tab completion, history, and more.
- Manage your Azure subscription with a rich command set that lets you create, list, and delete subscriptions and manage user access keys.
- Get started with interactive tutorials on using the most common features, such as creating VMs or Virtual Networks.
How to access Azure Cloud Shell?
An integrated, interactive, browser-based shell for building and administering Azure infrastructure is called the Azure Cloud Shell. You can browse https://shell.azure.com or use the Azure Web Portal to access the cloud shell directly. It lets you use either the PowerShell or Bash environment.
Direct link
The Cloud Shell can be accessed directly via its browser tab by visiting https://shell.azure.com. When the Azure Portal Cloud Shell is opened, you can open a new tab by clicking "Open new session".
Using Azure Web Portal
Go to the Azure Portal and click the Cloud Shell icon at the top right.
Code Snippets (Bash and Powershell)
The Azure Account extension can be installed if you have Visual Studio Code. For installing the extension, you can add two new commands which can run from within VS Code. For this, open Bash in Cloud Shell and Open PowerShell in Cloud Shell.
Azure Cloud Shell Features and Tools
This browser-based shell experience enables you to manage Azure resources without installing, versioning and maintaining a virtual machine. It runs on Common Base Linux Delridge. Below are the Cloud Shell features.
$HOME Persistence Across Sessions
Cloud Shell enables $HOME persistence across various sessions. Cloud Shell allows you to attach Azure file share on its first launch to keep your files across multiple sessions. After it is completed, Azure Cloud Shell will attach your storage file ( $HOME\clouddrive) for all further sessions automatically. In addition, it keeps your $HOME directory as a .img in Azure File share.
Secure Automatic Authentication
This amazing feature of the Cloud Shell helps authenticate account access for the Azure PowerShell and Azure CLI securely and automatically.
Azure Drive (Azure:)
Azure drive (Azure:) is provided by PowerShell in Azure Cloud Shell. Switching to and from the Azure drive is quite easy. You can use cd Azure: to switch to the Azure drive and cd ~ to switch back to your directory. The Azure drive enables easy navigation and discovery of Azure resources, including Network, Compute, etc. To refresh your Azure resources, run dir -Force.
Manage Exchange Online
There is a private build of the Exchange Online Module in the PowerShell of the Cloud Shell. Getting your Exchange cmdlets is also easy and can be done by running Connect-EXOPSSession.
Now run Get-Command -Module tmp_*.
Integration with Open-Source Tools
Azure Cloud Shell enables deep integration with open-source tools. It includes a pre-configured authentication for open-source tools, including Ansible, Terraform, and Chef InSpec.
Additional Azure Cloud Shell Features include:
- Executes on a temporary host based on per user, per session.
- Session times out after 20 minutes of interactive inactivity.
- Uses Azure file share for PowerShell and Bash.
- Assigns one machine per user account.
- $HOME is persisted using a 5-GB image in your file share.
- Sets permissions in Bash as a regular Linux user.
Azure Cloud Shell Tools
Azure Cloud Shell consists of several tools below.
- Linux Tools: Several Linux tools are present in the Azure Cloud shell, including bash, sh, zsh, tmux, and dig.
- Azure Tools: Azure CLI, AzCopy, Azure Functions CLI, blobxfer, Service Fabric CLI, Azure Classic CLI, and Batch Shipyard.
- Text Editors: Text Editors in Cloud Shell include code, nano, vim, and emacs.
- Containers: Docker Machine, kubectl, Helm, and DC/OS CLI are included in containers.
- Databases: Cloud Shell databases consist of MySQL client, sqlcmd Utility, PostgreSql client, and mssql-scripter.
Some new tools are also added to the Azure Cloud Shell that include:
- Azure Functions CLI: Azure Functions CLI allows you to create, run, test, and debug Azure functions.
- Bolt: Puppet Bolt, an open-source application that helps you in automating the management of your virtual environment.
- Packer: HashiCorp Packer allows you to automate the process of creating a machine image.
Moreover, updated tools include Java Development Kit, Azure PowerShell, and Azure CLI.
Advantages of Azure Cloud Shell
Azure management tools, including the PowerShell module and the Azure command-line interface enable admins to control their cloud shell resources. However, these may have downsides, such as potential configuration challenges, software dependencies, etc. A browser-based command-line tool, Azure Cloud Shell, can help reduce these burdens. Let's have a look at some of its advantages.
Browser-Based Shell Experience
Azure Cloud Shell is built with Azure management tasks in mind. It provides a browser-based command-line experience and enables unrestricted work from a local machine.
Choice of desired Shell Experience
Choice of preferred shell experience is a great advantage of the Azure Cloud Shell. It enables users to choose between PowerShell or Bash, whichever they like.
Configured & Authenticated Azure Workstation
Being managed by Microsoft, Azure Cloud Shell consists of popular command-line tools and enhanced language support. Also, Cloud Shell automatically authenticates for instant access through Azure PowerShell cmdlets or Azure CLI to your resources.
Integrated Shell Editor
An integrated graphical text editor is present in Cloud Shell based on the Monaco Editor. You can seamlessly create and edit configuration files by running the code and enabling deployment through Azure PowerShell or Azure CLI.
Various Points of Access
Azure Cloud Shell is a flexible tool with multiple access points. It can be used from shell.azure.com, Azure CLI documentation, portal.azure.com, Azure mobile app, and Visual Studio Code Azure Account extension.
Connectivity with your Microsoft Azure Files Storage
While the Cloud Shell machines are temporary, your files can be persisted in two ways, either through a mounted file share (cloud drive) or a disk image. You can map a single file share, which both PowerShell and Bash will use in Azure Cloud Shell.
Azure Cloud Shell Pricing
Ideally, there is no upfront and termination cost for Cloud Shell and you’ll only pay for what you use. Only the Azure Files share used to store your data for Cloud Shell billing is considered. Storage transactions, data transfers, and redundancy options will all affect your total cost. Cloud Shell makes locally-redundant storage (formally LRS) account with an Azure Files share on your behalf and this Azure File share also offers a 5 GB disk image for Bash.
There are four tiers of pricing models for Cloud Shell that you can select from according to your need and requirements. These are given in the table below.
Tier | Description |
---|---|
Premium | Enables highly I/O-intensive workloads with low latency & high throughput. |
Transaction Optimized | Enables transaction-heavy workloads that don't require latency offered by premium file shares. Great for apps requiring file storage. |
Hot | Storage optimized for general-purpose file-sharing situations, including Azure File Sync, team shares, etc. |
Cool | Offers cost-effective storage for online archive storage situations. |
Learn Azure Cloud Shell
Now, you can easily streamline Azure administration with a browser-based shell and get authenticated shell access to Azure from anywhere in the world virtually. However, if you desire to use advanced Azure Files share features, you may select your preferred pricing plan.
If you’re looking to learn more about Azure Cloud Shell, Azure PowerShell and CLI Overview and Azure Cloud Shell Playground are very good choices for you to start. In Azure PowerShell and CLI Overview course, you’ll learn about the basic concepts of Azure Cloud Shell and the syntax of Bash and PowerShell.
Azure Cloud Shell Playground offers you a lab environment to learn about Azure resources. QA also offers several Microsoft Azure Courses, labs, and learning paths to gain practical experience.
If you have thoughts or questions, feel free to leave a comment or contact QA.