Node.js with App Service on Linux

This is a follow up to my first post on running Node.js in Azure App Service, this time I want to cover the newly GA’ed App Service on Linux.
In most regards App Service on Linux works the same way as the regular (Windows) App Service, is has the same core features and operate mostly the same.

The main difference (aside from the blindingly obvious; the host OS is Linux!) is App Service on Linux uses Docker containers to host & run your webapp. This provides a heap of advantages when it comes to deploying your app, and IMO containers also make an ideal way to run Node based apps. There’s many lightweight and robust Docker images you can use, the Alpine Linux image notably weighing in at a tiny 23MB.

You have two fundamental ways of working with App Service on Linux:

  • Use one of the provided application stack images
    Referred to as “App Service on Linux” or “Linux Web Apps”
  • Run a custom image, either one of your own Docker images or one pulled from Dockerhub.
    Referred to as “Web App for Containers”

We’ll cover using both approaches to host and run Node apps

Read More

  Azure Resource Manager - Tech Primer

I’ve decided to put a few of my technical guides online, I’ve called these guides “technical primers”, created with technical folks in mind, that might be new to a particular topic or domain. I wanted to solve several things with these primers, combining both introductory overview content, but also technical reference material and deeper dives into various key areas.
These can be used for presentations, used in labs & exercises but also given as handout/reading material.

The first of these guides is on Azure Resource Manager - View & Download

  Running Node.js in Azure App Service

I’ve been using Node.js quite a lot lately as I find it a nice quick way to get web projects started easily, and one of the things I’ve been doing is deploying and running my Node.js apps in Azure. Azure provides a number of ways of to run Node.js code within the platform, but I’ll be focusing on the PaaS Azure App Services or Web Apps (more info), rather than VMs or anything strange.

Why write a blog about this? Isn’t using Node.js with Azure Web Apps all easy and already documented? Well… kinda, there is documentation but there’s also a lot of gotchas, semi-hidden features and things I stumbled across which made me feel like gathering all these nuggets of info into one place

Read More

  Azure DevOps - Hands On Labs

I’ve recently put together a couple of training labs / hackathon exercises. One is based on the .NET Core series of posts but updated slightly and made into more of a single logical flow, it also adds CI/CD to the process using Visual Studio Team Services (VSTS).
The basic premise behind both is the same; starting from scratch writing a web application and getting it deployed into Azure via VSTS. The second lab uses Node.js as the application stack instead of .NET Core, and deploys into Azure Linux Web Apps (rather than Docker Machine) via Docker containers.

These guides can be used a number of ways; run as a demo, given to people to run through at a hackathon or as a training exercise

Both guides are on GitHub

End to end DevOps exercise with .NET Core, Docker, VSTS in Azure

Hands on lab exercise for DevOps in Azure with OpenSource

  Securing Wordpress in Azure App Service

Since I moving my blog into Azure (as detailed in a previous post), I had started to see a series of odd alerts being fired out, with lots of random 500 errors at odd times of the day & night. When I checked the website was fine. At first thought this was related to the Azure App Service I was hosting my site in, but it occurred to me that it could have been happening before, but I just didn’t know - Azure & the App Service was alerting me to stuff I previously had no visibility into

Read More

  Migrating & Running Wordpress in Azure

Recently I decided to move my Wordpress blog from where it is hosted in a virtual shared Linux environment (TSO Host) into Azure. The current hosting is fine and has served me well over the years, but seeing as my current job is working with Azure I wanted to experiment. In particular my role is focused on the PaaS web & app hosting services in Azure, so I wanted to see first hand what the experience was like, particularly for a non enterprise user.

The migration has been successful (hopefully this page loaded without errors!), so I’ve decided to capture my thoughts on the process and some of the challenges I encountered along the way

Read More

  Running your ASP.NET Core app in Docker

Final part of a series covering some of the fundamentals of ASP.NET Core, Docker and Azure. This part is fairly dependent on what we covered in part 1 and part 2. However if you want to skip ahead you can use my pre-created ASP.NET Core demo app on Github; https://github.com/benc-uk/dotnet-demoapp which you can clone and use to skip what was covered in part 1.
However we’re going to need a running machine with Docker engine on so skipping part 2 isn’t really an option

Read More

  Build your first ASP.NET Core web app

This is a very simple tutorial and 101 guide on getting an ASP.NET Core web application up and running. We’re starting from first principles, and we won’t get very deep into the vast world of ASP.NET, so you won’t find any details on topics like MVC, Routing or Entity Frameworks here. Our goal is to get a very simple web app & server running on your Windows/Linux/OSX machine

Note. This is a re-write of a older post, as the .NET SDK and tooling have changed significantly upon final release in March 2017, making the old post more or less obsolete

Read More