Part 0.1 - 1000 foot overview

Part 1 - Things to consider when containerizing an app

Part 2 - Running MySQL in a container

Part 3 - Updating legacy code

Part 4 - Further legacy site work

Part 5 - Site Analysis

What is this

From last post, I discovered you get no time what so ever to do anything when you move interstate. I also mentioned a PHP review site I have, which I crafted in a “pair-programming” group at uni.

I’m going to do a technical migration from this “legacy” PHP/MySQL 2-tier design into a microservices/serverless/react architecture.

Given my role, I talk to customers nearly daily about a form of app modernization in multiple flavours. While I’ve gone through this excercise professionally in a particular manner previously, I’m interested in taking those lessons learned in combination with “best practice” to actually do this start-to-finish in a practical manner, on a running site.

Let’s put those best practice to the test; is what the largest cloud providers recommend or documented way to achieve things? Is there a cookie-cutter approach any organization can take when undertaking these more cutting-edge modernization tasks? Or can we develop a rough guide which gives an organization confidence, perhaps exposing the unknown, when facing this type of situation?

How will this be achieved?

I’m going to do this “by the book” -> which means I’m going to plan this from a architecture standpoint, documenting requirements etc, current state, issues, constraints etc. and make a plan to ‘innovate’ (rewrite) from scratch, while keeping the site running. Given the site isn’t actually running (fully), I’ve a bit to do before our fake company/review site is ready to go.

In rough order:

  • ‘Containerize’ stock PHP/MySQL site as-is
  • Deploy into an existing kubernetes cluster
  • Publish externally, with domain, proxied via cloudflare etc.

(By this point, the site will be live serving traffic)

  • Implement some new features:
    • Localization support
    • OIDC/OAuth2 via Azure B2C
    • Lets Encrypt (Ideally, or SSL of some form for CDN services later on)
  • As above, create a ‘SoW’ to migrate platform to a microservices/serverless architecture where possible. This excludes the front-end, as that’s a huge piece of (learning) work which will take some time
    • Azure storage for site content (table/blob), static content, accessed via Azure CDN where it makes sense
    • Azure functions and logic apps for microservices
    • APIs and services exposed via Azure API-Management
    • Production front-end accessed via Azure Front Door CDN
  • Lastly, rewrite the front-end in react and host on static Azure storage for 0 cost

Current design

Looks like this:

Which is great and all but we can do something better. We will move to something like this:

Next up: Site overview and strategies to containerize your web application with our review site.