Migrating this blog to Azure. It's done. Now the work begins.
I have been running this https://hanselman.com/blog for almost 20 years. Like coming up on 19 I believe.
Recently it moved from being:
- a 13(?) year old .NET Framework app called DasBlog running on ASP.NET and a Windows Server on real metal hardware
- a fresh and new .NET Core app app forked and improved by Mark Downie https://github.com/poppastring/dasblog-core and running under Linux on Azure!
Finally. This blog, the main site, and the podcast site are all running on Azure Web Apps, built in Azure DevOps, and managed by Azure Front Door and watched by Application Insights. Yes I pay for it with cash, I have no unlimited free Azure credits other than my $100 MSDN account.
Mark and I have been pairing on this for months and having a wonderful time. In fact, it's been about a year since this started.
Moving this blog is a significant achievement for a number of reasons, IMHO.
- If we did it right:
- you didn't notice anything
- The URLs look cooler.
- We broke nothing in SEO.
- Perf is better.
- Before I could deploy the site a few times a year, and was afraid of it. Yesterday I deployed 11 times.
- It was .NET 1.1, then 2.0, then 3.5, then 4.0, then stuck for 8 years.
- It ran on a real Windows Server 2008 machine (no VM) at Sherweb who has been a great partner for years. Extremely reliable hosting!
- Now it's on Azure under Linux
- We upgraded the ASP.NET WebForms app to ASP.NET Core with Mark's genius idea of splitting the app responsibilities such that the original DasBlog blog templating language could be converted to simple Razor pages and we could use ASP.NET TagHelpers to replace WebForms controls.
- This allowed me to port my template over in a day with minimal changes.
- Once it compiled under .NET Core it was easy to move it from Windows to Linux and testing in WSL first.
- We then just moved the other dependent projects to .NET Standard 2 and compiled the while thing as a .NET Core 3.1 LTS (Long Term Support) app. In fact, scroll down to the VERY bottom of this page and you can see what version we're on.
- I set up CI/CD for the main site hanselman.com, this blog, and hanselminutes.com.
There are 3 sites now, all behind a reverse proxy from Azure Front Door to handle SSL, Firewalls, and more.
I'm going spend the next month or so blogging about the process and experience in as much detail as I can.
Here's some articles I've already written on the subject:
- Real World Cloud Migrations: Moving a 17 year old series of sites from bare metal to Azure
- Dealing with Application Base URLs and Razor link generation while hosting ASP.NET web apps behind Reverse Proxies
- Updating an ASP.NET Core 2.2 Web Site to .NET Core 3.1 LTS
- Moving an ASP.NET Core from Azure App Service on Windows to Linux by testing in WSL and Docker first
If you find any issues with this blog like
- Broken links and 404s where you wouldn't expect them
- Broken images, zero byte images, giant images
- General oddness
Please file them here https://github.com/shanselman/hanselman.com-bugs and let me know!
Oh, and please subscribe to my YouTube and tell your friends. It's lovely.
Sponsor: Never miss a beat with Seq. Live application logs and health checks. Download the Windows installer or pull the Docker image now.