Tag: Azure Cloud Shell

Cloud Shell Configure Port Web Preview

Preview Web Apps with Azure Cloud Shell Web Preview

If you have worked with the Azure Cloud Shell in the last couple of days, you might have seen a new button called Web Preview. The Azure Cloud Shell Web preview feature allows you to run web applications on the Cloud Shell container instance and preview them before you deploy them. You can run web applications that listen to HTTP requests on the Cloud Shell from port 1025-8079 and 8091-49151.

If you are running for example a .NET Core application in Cloud Shell, you can preview this to the Cloud Shell gateway.

I have created a short video tutorial to show you the Azure Cloud Shell Web preview feature.

How to use the Cloud Shell Web Preview

First you need to run your application, in my case I run a simple .NET Core web application. This also works with other applications which can run in Cloud Shell and can map a local port.

Cloud Shell Web Preview dotnet

 
dotnet run

By default, this will use port 5000. Now you can create a simple port mapping by clicking on the Web Preview button in Cloud Shell.

Cloud Shell Configure Web Preview

This will open up the configuration menu to create the port mapping, where you can select port to use from 1025-8079 and 8091-49151.

Cloud Shell Configure Port Web Preview

Now you can access the application running inside your Cloud Shell container through the gateway, to preview your application.

Web Preview

I hope this was helpful and gave you a quick overview about the Web Preview feature in Cloud Shell. If you have any questions, please let me know in the comments.

You can run Azure Cloud Shell from in the Azure Portal or directly from shell.azure.com.

If you want to learn more about Cloud Shell, check out my video about Mastering Azure using Cloud Shell.



Mastering Azure with Cloud Shell

Mastering Azure with Cloud Shell

There are multiple ways to interact and manage resources in Microsoft Azure. You can use the Azure Portal or command line tools like the Azure PowerShell module or the Azure CLI, which you can install on your local machine. However, to set up a cloud management workstation for administrators and developers can be quite a lot of work. Especially if you have multiple computers, keeping consistency between these machines can be challenging. Another challenge is keeping the environment secure and all the tools up to date. The Cloud Shell addresses this any many more things.

Cloud Shell is not brand new, Microsoft announced Cloud Shell at Build 2017. This blog post is about how you can master Azure with Cloud Shell and give you an overview of the possibilities of Cloud Shell.

 

What is Cloud Shell

Cloud Shell Azure Portal

Cloud Shell offers a browser-accessible, pre-configured shell experience for managing Azure resources without the overhead of installing, versioning, and maintaining a machine yourself. Azure Cloud Shell is assigned per unique user account and automatically authenticated with each session. This makes it a private and secure environment.

You get a modern web-based command line experience which can be accessed from several endpoints like the Azure Portal, shell.azure.com and the Azure mobile app, Visual Studio Code or directly in the Azure docs.

In the backend, Azure uses containers and automatically attaches an Azure File Share to the container. You can store the data on it, so your data is persistent. This persists your data across different Cloud Shell sessions.

Cloud Shell Bash and PowerShell

You can choose your preferred shell experience. Cloud Shell supports Bash and PowerShell and included your favorite third-party tools and standard tools and languages. If something like a module is missing, you can add it.



VSCode in Azure Cloud Shell

You can now run a Visual Studio Code based editor in Azure Cloud Shell

Azure Cloud Shell, a browser-accessible shell for managing Azure resources, just got even more powerful. Today Microsoft added a new Visual Studio Code editor to Azure Cloud Shell. Okay, it is not the real Visual Studio Code, it is an editor based on the Visual Studio Code open-source project Monaco. Monaco is the same web-standards based editor that powers Visual Studio Code, and the editor is now integrated directly into Cloud Shell.

Now you not only have editors like vim, emacs or nano, you also able to run code, directly with in the Azure Cloud Shell. This is pretty handy when it comes to quickly edit some files like scripts or ARM templates.

This is not the first time the Azure Cloud Shell team and the Visual Studio Code team collaborated: Azure Cloud Shell in Visual Studio Code



Azure Stack Azure Cloud Shell

Connect to Azure Stack from Azure Cloud Shell

A little while ago Microsoft announced the Azure Cloud Shell. The Azure Cloud Shell is a perfect tool to manage your Azure resources using the Azure CLI or Azure PowerShell. Wouldn’t it be great to also manage your resources running on Azure Stack? Thanks to the consistency between Microsoft Azure and Microsoft Azure Stack, you can use the same tools to manage your hybrid cloud.

First of all login to your Azure Cloud Shell on shell.azure.com or in the Azure Portal.

Azure Cloud Shell

After the login you have to register Azure Stack as a new cloud by running the following command:

az cloud register \
-n AzureStack \
--endpoint-resource-manager "https://management.region.url.com" \
--suffix-storage-endpoint "region.url.com" \
--suffix-keyvault-dns ".vault.region.url.com"

Azure Stack Cloud List Azure CLI

Now you can list the new Azure Stack cloud by using:

az cloud list -o table

To switch to the Azure Stack Cloud use the following command:

 
az cloud set -n AzureStack

If you are doing this the first time and you use another account you can use az login to login.

 
az login

One thing you should do is to switch the profile version to an Azure Stack compatible version

 
az cloud update --profile 2017-03-09-profile

Azure Cloud Shell Azure Stack

Now you can start using the Azure CLI in the Azure Cloud Shell to manage your Azure Stack. First of all yes this works also if you just use the Azure CLI. In the case this case, the Azure Stack needs to be accessible from the internet. If your Azure Stack is not accessible from the internet, you can just use the Azure CLI directly from your management machine.

Azure Stack Cloud Shell Visual Studio Code

Azure Cloud Shell is very powerful, you can run Azure CLI as well as Azure PowerShell. Fun Fact, since you an also run the Azure Cloud Shell directly in Visual Studio Code, you can also just open up the shell session and start working from Visual Studio Code.

You can learn more in my blog post: Mastering Azure with Cloud Shell



Azure Cloud Shell

Azure Cloud Shell – shell.azure.com and in Visual Studio Code

Back in May Microsoft made the Azure Cloud Shell available in the Microsoft Azure Portal. Now you can use it even quicker by just go to shell.azure.com. First you login with your Microsoft account or Work and School account, and if your account is in multiple Azure Active Directory tenants, you select the right tenant and you will be automatically logged in. So even if you are on a PC where you can not install the Azure CLI or the Azure PowerShell module, you can still easily fire up a shell where you can run the Azure CLI, Azure PowerShell and other CLI tools like Docker, Kubectl, emacs, vim, nano, git and more.

In addition you can also open up Azure Cloud Shell directly from Visual Studio Code

Azure Cloud Shell Visual Studio Code

With that, enjoy your holidays and I wish you a good start in the new year!



Azure Cloud Shell

Microsoft Azure Cloud Shell

Today at the Microsoft Build Conference, Microsoft announced the Azure Cloud Shell. The Azure Cloud Shell is a browser-based shell experience to manage and develop Azure resources.

Azure Cloud Shell offers a browser-accessible, pre-configured shell experience for managing Azure resources without the overhead of installing, versioning, and maintaining a machine yourself. Today it gives you a variety of different tools directly from your web browser in the Azure Portal.

This gives Azure Administrators an easy admin environment to manage resources as well as third-party applications. In the background Microsoft runs thousands of isolated containers, ready for you to use. Microsoft takes care of keeping this container up to date, so you can focus on your administrator tasks. The usage is free, the only thing you will need to pay, are the storage cost for your container and the things you store on the Azure File Share.

Linux shell interpreter

  • Bash
  • sh

Azure tools

  • Azure CLI 2.0 and 1.0

Text editors

  • vim
  • nano
  • emacs

Source control

  • git

Build tools

  • make
  • maven
  • npm
  • pip

Containers

  • Docker
  • Kubectl
  • DC/OS CLI

Databases

  • MySQL client
  • PostgreSql client
  • sqlcmd Utility

Other

  • iPython Client

It also looks like PowerShell will be available later, hopefully it will arrive soon. Microsoft also announced Azure PowerShell 3.0. If you want to learn, check out my blog post: Mastering Azure with Cloud Shell