I’m taking a break from coding to explain about a little known feature of the Azure App Service – Kudu. You can consider Kudu to be a backend system that alows you to get down to the very basics of what is happening behind the scenes of the portal. For instance, all web sites in Azure App Service are stored in a git repository. Want to know about that git repository? Kudu is your friend.
Getting to Kudu is straight forward. Firstly, log into the Azure Portal and enter your web app. Go to the Tools area, then Kudu, then click on Go:
You will get a rather simple site with no polish. I’m pretty sure that is deliberate. You don’t come to Kudu unless you want low level information, so the Kudu design reflects that.
Today I had a basic question – what branch is my continuous deployment hooked up to? Back on the portal, I know the project that it is linked up to, but it was set up so long ago that I’d forgotten what branch I needed to merge into. That information is not available in the portal directly. I could, of course, create a new branch in my GitHub project and then publish it, but that would mean disconnecting the SCM connection and re-establishing it.
Fortunately, that information is in the App Settings, available through Kudu, but it’s displayed in JSON. Also fortunately, I’m using JSONView for Chrome. This extension will pretty print any JSON document for you. From the Kudu site, go to App Settings, and you will get something similar to this:
As you can see, the branch that my continuous deployment is listed as the last item in this case.
There are a bunch of other things I absolutely love about Kudu. In the Debug Console menu drop-down is a “PowerShell” option – this opens a PowerShell prompt on your web app and allows you to explore the filesystem and the environment with all the power of PowerShell. Under the Environment menu, you get to see all the environmental information that your web site sees. Previously, I had written a small NodeJS application to view this information, not realizing that Azure had provided a tool already. A warning about this – the SQL passwords are shown in plain text here, so don’t just cut and paste this information. Want to stream the logs from your website? That’s available under the Tools menu option.
Short version: If you are developing for Azure App Service, you owe it to yourself to understand what Kudu offers and spend some time learning this powerful system.