Tag: Linux

Development

Setup Visual Studio 2019 Development VM in Microsoft Azure Cloud

In the past the only option for writing code and building software using Visual Studio was to install it on your local machine. With technologies like Windows Hyper-V and VMWare things became less invasive by allowing you to develop software inside of a Virtual Machine (VM). With the cloud, things have become even easier. You can now easily, spin up a Virtual Machine in Microsoft Azure, use it for what ever you need, then shut it down or delete it when it’s no longer needed. This can be an extremely valuable tool for any software developer, and has been possible with Visual Studio 2017 for some time now. With the first public release of Visual Studio 2019, you can now run a Visual Studio 2019 VM in Microsoft Azure too!! Read More

Infrastructure

How to Setup an Ubuntu Linux VM in Azure with Remote Desktop (RDP) Access

Some time back I wrote about doing Visual Studio development with an Azure Virtual Machine (VM). In that article, I showed how you can setup a Windows VM for Development purposes to extend your local development machine with the help of the cloud. In this article, I want to share some tips I’ve found in how to setup a Linux VM in Azure that you can use for similar purposes. Read More

DevelopmentOpen Source

Introduction to Git Version Control Workflow

Keeping track of file versions has been a long time issue in the world of software. This remains true if you’re writing source code for an application, command-line scripts, or even authoring a book or documentation. Sure, you could just create .ZIP files with a date/time stamp naming convention, or even adopt some kind of server-based Source Control Management (SCM) system. However, there are a ton of issues that can occur with many of these solutions. These issues are the very reason Linus Torvalds (the creator of the Linux operating system) created the Git version control system. In fact, Linus created Git since all the other solutions available had failed at adequately managing the Linux source code. Read More

Azure CLIInfrastructureportalPowerShell

Introducing the Azure Cloud Shell

The Azure Cloud Shell has been out for some time now, as an embedded Bash and PowerShell command-line shell / terminal within the Azure Portal. It really great to be able to use Azure command-line tools (Azure CLI & Azure PowerShell) from absolutely anywhere; including a smartphone or tablet with the native Azure mobile app. Now, the Azure Cloud Shell has gotten it’s own website so you can use it all by itself! Read More

Azure CLIInfrastructureOpen Source

Azure CLI 1.0 vs 2.0 Compared, Installation and Usage

The Azure CLI is the cross-platform, command-line tool for managing resources in Microsoft Azure. Microsoft recently released the Azure CLI 2.0 and the commands start with “az” instead of “azure” like Azure CLI 1.0. This article runs through the main differences between Azure CLI 1.0 and Azure CLI 2.0 to help you understand how to use each one.

Installation and Platform

When the Azure CLI 1.0 was first released it was call the X-Plat CLI, and offered a new cross-platform command-line tool to use for Azure automation tasks. It offered an alternative to the Azure PowerShell cmdlets that gave a command-line tool for use on macOS and Linux, in addition to Windows. In the early days it was built on top of the Azure Service Management API’s, and has since been migrated over to support the newer Azure Resource Management API’s.

The new Azure CLI 2.0 was built with Azure Resource Management (ARM) from the start. It was also built with the lessons learned from 1.0 in mind to make 2.0 a better cross-platform, command-line tool. The development platform and language used to build the Azure CLI 2.0 was changed, and the commands essentially changed a bit in the process. It’s really not an “in-place” migration, and requires you to understand a little more than to just install the new version.

The Azure CLI 1.0 was written with Node.js to achieve cross-platform capabilities, and the new Azure CLI 2.0 is written in Python to offer better cross-platform capabilities. Both are Open Source and available on Github.

Azure CLI 2.0 is written in Python, Azure CLI was written in JavaScript. Both are Open Source!

Here’s the platform differences between the 2 version of the Azure CLI along with links where you can find the Open Source repository for each:

Azure CLI 1.0

Azure CLI 2.0

Azure CLI Installation

Since the Azure CLI is cross-platform it can be installed on Windows, macOS, and Linux. This is true for both the Azure CLI 1.0 and Azure CLI 2.0. Since the Azure CLI 1.0 is written with Node.js, it will require Node.js to be installed on your machine. While the Azure CLI 2.0 is written in Python, and requires Python.

Azure CLI 1.0 Installation

Here’s commands to install Azure CLI 1.0 at the command-line using Node.js:

sudo npm install -g azure-cli

Use a Docker Container to run the Azure CLI 1.0:

docker run -it microsoft/azure-cli

You can also use an installer with Windows and macOS to install the Azure CLI 1.0 more easily as well. You can find the installers for the Azure CLI 1.0 on the Github repository.

Azure CLI 2.0 Installation

Here’s commands to install Azure CLI 2.0 on different platforms. Keep in mind that it does require Python.

Windows Command-Line

You can download the .MSI installer for Azure CLI 2.0 to install the Windows command-line support for Azure CLI.

Bash on Windows 10

The Ubuntu Bash on Windows 10 can be used to run the Azure CLI 2.0 while utilizing it’s full support for Bash and on a Windows 10 machine at the same time.

  1. First step, if you don’t have Bash on Windows installed (Ubuntu Bash on Windows 10, or the newer (coming soon) support for SUSE and Fedora on Windows 10 too!) then install it!
  2. Using Bash, modify your sources list:
    echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \
    sudo tee /etc/apt/sources.list.d/azure-cli.list
    

Run the following sudo commands to install the Azure CLI 2.0:

sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
sudo apt-get install apt-transport-https
sudo apt-get update && sudo apt-get install azure-cli

macOS and Linux
Here’s the installation command to install the Azure CLI 2.0 on macOS as well as Linux using Curl:


curl -L https://aka.ms/InstallAzureCli | bash

Additionally, you may need to restart your command-lim in order for some changes to take affect. You can do this with the following command:


exec -l $SHELL

Docker Container

You can also run the Azure CLI 2.0 in a Docker Container fairly easily. Here’s the “docker run” command to do this:


docker run azuresdk/azure-cli-python:<version>

apt-get on Linux

You can also use the following commands to install Azure CLI 2.0 on Linux using apt-get.

On 32-bit systems:


echo "deb https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \
sudo tee /etc/apt/sources.list.d/azure-cli.list

On 64-bit systems:


echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \
sudo tee /etc/apt/sources.list.d/azure-cli.list

After you run the above 32-bit or 64-bit specific command, then you’ll need to run the following sudo commands as well:


sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
sudo apt-get install apt-transport-https
sudo apt-get update && sudo apt-get install azure-cli

There is some further documentation for installing the Azure CLI 2.0 available in the Azure Documentation site.

Getting Started with Azure CLI Commands

Both the Azure CLI 1.0 and 2.0 have very similar commands. However, the command start differently. With the Azure CLI 1.0 commands start with “azure” and with the Azure CLI 2.0 command start with “az”.

Before you can go about running Azure CLI commands, you need to first login to your Azure Subscription. Here are commands to do this in both Azure CLI versions:


# Azure CLI 1.0

azure login

#Azure CLI 2.0

az login

To get a full list of the available commands and full help information you can run the following command:


# Azure CLI 1.0

azure

# Azure CLI 2.0

az

Also, you can find the version of Azure CLI you have installed by using the following command:


# Azure CLI 1.0

azure --version

# Azure CLI 2.0

az --version

Azure CLI Command Examples

Here’s some example commands using both the Azure CLI 1.0 and Azure CLI 2.0. You can see that they aren’t really all that different outside of the trigger command of either “azure” or “az”.

Create New Azure Resource Group


# Azure CLI 1.0

azure group create --name MyGroup1 --location eastus

# Azure CLI 2.0

az group create --name MyGroup1 --location eastus

Create Azure App Service Plan


# Azure CLI 1.0

azure appserviceplan create --name MyPlan --resource-group MyGroup1 --location eastus --sku F1

# Azure CLI 2.0

az appservice plan create --name MyPlan --resource-group MyGroup1 --location eastus --sku F1

List All Azure Virtual Machines


# Azure CLI 1.0

azure vm list

# Azure CLI 2.0

az vm list

More Information

You can find much more information about using the Azure CLI 1.0 and 2.0 in the documentation on the Open Source project sites hosted on Github, and in the Microsoft Azure documentation. Here’s some link to those resources:

Also, don’t forget to try out the new Azure Cloud Shell to use bash with both the Azure CLI 1.0 and Azure CLI 2.0 command directly in the Azure Portal from anywhere!

Happy cross-platform, command-line scripting in the cloud!!

CertificationOpen Source

LFCS: Linux Foundation Certified System Administrator Certification

The Linux Foundation Certified System Administrator (LFCS) certification from The Linux Foundation is a full Linux certification for verifying and validating your Linux Operating System skills. Linux is the #1 operating system for web servers, cloud computing, smartphones and consumer electronics. It’s been growing very rapidly over the years, and even Microsoft has fully embraced Linux for running workloads in the Microsoft Azure cloud.

The IT industry is increasingly seeking out IT Professionals who have Linux Operating System management and administration skills. This certification will help you validate those skills to help advance your career. Read More

DevelopmentVideo

Intro to Azure for Developers FREE Webinar On-Demand from Opsgility

The other day I hosted a FREE Webinar with Opsgility that provides an Introduction to Azure for Developers. In this webinar I went over an introduction to what IaaS, PaaS, and SaaS are. Then I dove into the Azure Portal and showed how to create IaaS (Infrastructure as a Service) VMs with Windows and Linux, as well as how to remote into those VMs with Remote Desktop and SSH; respectively. I also went into deploying a Web Application into an Azure Web App PaaS (Platform as a Service) service directly from within the Visual Studio IDE, and I even showed how you can easily deploy a website directly from Github into an Azure Web App as well! I also discussed Azure SQL Database (“Database as a Service”), as well as a few additional services and features.

I encourage you to watch the entire webinar recording to see the whole demo of everything. There are very little slides, and the webinar was almost entirely demos of real features, real functionality, and real Azure usage! Go watch! Read More

InfrastructureVideo

Create Ubuntu Linux VM in the Azure Portal

This is a short video that shows how to create an Ubuntu Linux Virtual Machine (VM) in the Microsoft Azure Management Portal. It also explains a few details on how VMs are hosted in Azure, along with a demo on how to connect to the Ubuntu Linux VM using ssh and bash.

Please, subscribe to get more videos like this all around Microsoft Azure.

This is one of the first videos I’ve published to the Build Azure YouTube Channel where I’m starting to build out video content to accompany this site. Enjoy!

HardwareInfrastructure

Windows Server running on ARM CPUs, Azure is Next!

So far the servers within Microsoft Azure data centers have been running Intel processors (CPUs). For a long time I’ve wondered if the power efficiency of ARM CPUs could make them more cost effective than Intel x64 CPUs that are more powerful. It’s possible through the use of parallel computing that distributing load across many more ARM CPU cores that consumer lower power could be more cost effective than distributing the same load across fewer more powerful Intel CPUs. Since I first came up with the idea, I’ve assumed that ARM would be more cost effective, however, I haven’t seen anything to back it up. With recent news about Microsoft exploring Windows Server running on ARM, and ARM based cloud server, it looks like they’re dedicating some serious money to this very research effort.

ARM has already revolutionized mobile devices and Internet of Things (IoT). Could the next step for ARM CPUs be to revolutionize the Cloud and server market? Read More