Maand: maart 2017

Adding new Azure resources to your subscription can be done multiple ways. The most common way, of course, is adding resources by hand in the Azure Portal. But this is error prone and tedious. To manage your azure resources in a professional way, you need ‘better’ tooling.

A viable solution is making use of Azure Resource Manager (ARM) templates. This is very popular but it has a certain learning curve.

And it’s also possible to make use of Azure integration of power shell. Again, there is a certain learning curve.

Let’s look at another solution, the Azure Command Line Interface (CLI). What if you could manipulate resources using the command line in a dos box? What if you could add a resource group like this, in one line:

az group create -n cli-rg -l westeurope

This looks easy, doesn’t it?

The CLI is quite new, and it’s available on multiple platforms (Windows, Linux, MacOS, etc.). It’s built on top of Python so you have to install that tool first.

Let’s make this happen. Let’s install and run the CLI. In this example, I use a Windows machine but there are installation guides for other operating systems available too.

By now the Cloud strategy of Microsoft must be very clear. It’s not about Windows, it’s not about Office, it’s not about Microsoft programming languages even. Microsoft is opening up towards all devices, operating systems, programming platforms, etc. Everybody is welcome in the cloud.

Although this is going on for quite some time, it is still a surprise for quite a few non-Microsoft developers. So today I decided to program against the Azure IoT Hub using another language, just to check out their experience.

When I noticed the arrival of the Web jobs SDK 2.0, I remembered an issue I had with logging traces in Web jobs. But before we come to that, let’s check out trace logging in general in a Web job.

Adding Trace messages to a Web job does not seems to be that hard. Just open the Visual Studio Web job template, create a new Web job and open the Function file.

There is already one function in the Web job template. Here, I just add several kinds of logging. Next to Trace logging, I make use of both the log.writeline() and the console.writeline() (because we are in a ‘kind of’ console app):