harre.dev

Azure

Web.config domain rewriting

Here’s a quick and easy domain rewriting solution running on an Azure App service.

Some assumptions before you can start though:

To make things even easier, you can set this whole thing up from inside the Azure portal using the Advanced Tools option which opens the Kudu interface for the web server. In the Kudu interface click on Debug Console -> CMD. Next, browse to the wwwroot directory at site/wwwroot. From there you can create new files.

Environment variables in an Azure Web App for Containers

Here’s a little gotcha I ran into. A .net core app I wrote needs to run inside a container and the target was a Web App for Containers on the Azure platform. No big deal so far.

The app also needs a few settings for it to do its work. We provide these via environment variables for maximum flexibility. After setting up some CI/CD stuff and deploying the app it wouldn’t start because it wasn’t loading the settings.

Setting up an Azure Storage static website

Not very long ago, Microsoft made the static website feature generally available on the Azure platform. What this means is that you can now publicly host content with Azure (blob) storage.

So in a few easy steps you can create a host for your angular/react/vue/(insert-client-side-web-thing-here)/static app. The docs are great but we’ll have a look at what’s what.

Please remember that there is no server-side processing for this hosting option! If you want to do server-side stuff, use an App Service instead.

Multiple listeners for your Service Fabric service

Service Fabric is a great piece of technology on the Azure platform and I’ve been using it quite a lot in recent projects. It takes away a lot of the setup and orchestration when dealing with microservices.

There comes a point where services need to talk to each other and this is easily achieved using the Remoting bits you can get from NuGet. The general way of doing this is creating an Interfaces project next to the service that contains the service interface and classes used in transport. The interface is implemented on the service entrypoint and a listener is exposed to the Fabric runtime so that it can communicate with the rest of the platform. We’re going to take it one step further and put the service implementations in their own class instead of on the service entrypoint (keeps things nice and clean) and also enable dependency injection from that point forward.

Openhack Amsterdam 2017

So this hackathon/training thing popped up on my twitter feed a week before it actually started.

Openhack

It caught my attention because it mentioned Azure Service Fabric as one of the tech stacks (the other being Kubernetes) that would be the focus of the event. The event is Openhack that took place in Amsterdam from 9 to 11 october 2017.

So Azure Service Fabric caught my attention because it’s a big part of the job I’m currently working on. We run a bunch of services and actors with great satisfaction, but there’s always more to know and learn.