At my new position they are moving to a micro services infrastructure using Azure Functions. I figured I had better get up to speed on all things Azure Functions. I built a few sample projects on my computer, but that doesn’t show me what is looks like in “real life”.
This project started as a simple Azure function to test deployment processes from GitHub Actions and kind took off from there. There are still places in the namespace that refer to AzureFunction and I may go back and refactor that at some point. Since this started as a test, I just jammed all the code in a single project for simplicity’s sake. That said, it seems like Microsoft wants functions to be small instead of big “Clean” multi projects affairs.
The rest of the project just sort of happened like in the book “If you give a Pig a Pancake”. (Once he had a pancake, he wanted syrup and it keeps going from there)
The generator lives on my development account on Azure. You can test it below. Feel free to make some QR codes until my budget for the month runs out.
POST // post to https://joesazurefunction.azurewebsites.net/api/WifiQR
POST // post to https://joesazurefunction.azurewebsites.net/api/UrlQR
Once the VM was installed, I added a rule to the firewall that allows access over port 3389. This setting is located in the Network Security Group; if you let Azure name everything it will be the name of the server with “-nsg” at the end. Look for Inbound Security Rules. I locked this access to the static IP address at my house. I also set it to the highest priority.
Since I only have the MSDN Professional subscription, I installed the Community version of the VM. Using the Visual Studio installer, I installed Pro and uninstalled Community, since I only need one version of Visual Studio.
After everything installed correctly, I connected to my Azure Dev-OPs instance and started getting busy. I have a few ideas for products I want to make.
The entire process took a bit over an hour. Most of that was waiting for installs of servers and software. Now that the machine is set up, I probably won’t need anything new for a while. From an installation time perspective, this was much faster than setting up a Linux server and building Virtual Machines from install media.
Over the next few weeks, I’ll report back on performance and price compared to using a server here at the house.
For years I have maintained my own Linux servers at home running Fedora with KVM. Each server is a pretty beefy AMD machine with as many processor cores and as much memory as I could afford. On each, I set up a few development servers for both .net development and running MS SQL Server. I still have all of them. Only two (the black gaming cases) are currently running, but If I want to go back and do some development on Windows 2003. I can just fire up that pink box and I’m off to the races.
There are tons of advantages to running your own servers. The first is that you know how to set-up servers and you can use all those licenses in your MSDN subscription. The second is that you can say things like KVM, network bridge, QEMU and not sound like a doofus. I can go on about the cool factor of running your own virtual host, but most of it doesn’t really matter. The main reason to have servers is that you are not developing on your desktop.
Your work lives in a protected environment away from your email and video gaming. Windows 10 now likes to reboot quite a bit and I hate being interrupted. You can tell a server to never reboot and it will listen to you. I could leave Visual Studio up for weeks at a time and always come right back to where I was last working.
The downside to all this is the growing junk collection and having to maintain it all. I would love it if I could set up a server on Azure and just do my work there. I already use their source control and production hosting services. Having it all there would be nice as long as it doesn’t cost me an arm and a leg.
Over the course of the next few weeks, I am going to be exploring what it takes to use Visual Studio on Azure, how well it works for web development and how expensive it can be.