avatarDazbo (Darren Lester)

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

10802

Abstract

much cheaper to run</b> than equivalent applications in VMs.</li><li>And because containers are just instantiated as a process in the OS, they are <b>super fast to deploy and super fast to scale</b>. Why? Because there’s no OS to start. So you can scale out to thousands of instances in seconds!</li><li>They are completely <b>isolated </b>from other processes on the OS. Meaning each container can have independent and non-conflicting configuration.</li><li>They are typically deployed in a fully declarative way. <b>Automated, repeatable infrastructure-as-code is easy</b> with containers.</li><li>They <b>package all the application dependencies</b>. No more worrying about what needs to be installed to make them run. And no more dependency conflicts.</li><li>They can be <b>layered</b>. Like Lego!</li><li><b>Developers love them!</b></li></ul><h2 id="e742">Google Cloud Container Runtimes</h2><p id="c41c">Once you’ve containerised an application, you have two ideal platforms you can run them on, in Google Cloud: <a href="https://cloud.google.com/kubernetes-engine/docs">Google Kubernetes Engine (GKE)</a> and <a href="https://cloud.google.com/run/docs/overview/what-is-cloud-run">Cloud Run</a>. Which one do you choose? As always… it depends.</p><figure id="b897"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*BO3fhtehRtHI82gV7wqL4g.jpeg"><figcaption>Cloud Run</figcaption></figure><p id="de9e"><b>Cloud Run is Google’s fully-managed, serverless platform for running stateless containers. </b>It is well-suited to simple containerised applications, where the application does not have complex dependencies between different microservices.</p><figure id="d9e3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1Y4R5TEF_TAGXWMYc6hQ3A.png"><figcaption>GKE</figcaption></figure><p id="4631"><b>Google Kubernetes Engine (GKE) is a managed Kubernetes environment that allows you to deploy and orchestrate many containers on Kubernetes clusters.</b> GKE is much more powerful and more configurable than Cloud Run. However, it requires a little more effort to manage, and is not serverless.</p><p id="4d69">In general, use GKE when:</p><ul><li>You have sophisticated applications or <b>need for orchestration</b>. E.g. multiple microservices that interact with each other.</li><li>You want full control over the <b>machine types</b> that underpin different services. Or, maybe you want specialised machine types for certain workloads, e.g. using GPUs.</li><li>You have <b>stateful applications</b>, where you are persisting state of the container (rather than as a separate peristence layer).</li><li>You want to leverage (and have full control over) <b>Kubernetes capabilities</b>, such as Deployments, Ingress, Rolling Updates, DaemonSets, StatefulSets, etc.</li><li>Your application is <b>always on</b> and therefore going to require a minimum amount of resource.</li><li>You have applications that are packaged as <b>Helm charts</b>.</li></ul><p id="5a74">Otherwise: use Cloud Run.</p><h2 id="bb96">Suitable Applications for Containerisation</h2><p id="4f8c">You may be asking: <i>“What sorts of applications can I containerise?” </i>All sorts! Typical candidates include:</p><ul><li>Existing Java web applications, running on (for example) IBM Websphere Application Server, Oracle Weblogic, RedHat JBoss, or Tomcat.</li><li>Spring Boot applications.</li><li>Node.js applications.</li><li>Even .NET applications can be containerised.</li></ul><p id="b9a8">More on all of these later.</p><h2 id="591a">Existing Containers</h2><p id="d8a1">If you’re already running containers on-prem, then these can be easily migrated to run in Google Cloud. And, since containers are inherently portable, the migration is trivial.</p><p id="1f78">You should aim to deploy to the same Google Cloud platforms: i.e. GKE and Cloud Run.</p><h2 id="1438">Coming from OpenShift?</h2><p id="988a">If you are running OpenShift on-prem, you should be looking to <b>migrate these workloads to GKE</b> (or Cloud Run, where appropriate). <b>Don’t try and deploy OpenShift to your Google Cloud environment. </b><i>“Why?”</i></p><p id="f9d3">Because…</p><ul><li>If you choose to run OpenShift on Google Cloud, you have to <b>manage your own servers</b> for the hosting of OpenShift. You’re back to the problem of deploying and managing GCE VM instances, because OpenShift will be running on GCE. (See all the <i>cons </i>for GCE.)</li><li><b>You have to deploy, manage, and patch OpenShift itself</b>. You need engineering expertise to deploy, configure and continually manage OpenShift. GKE is managed by Google. OpenShift must be managed by you. Recall our principle of <b><i>“Use managed services.”</i></b></li><li><b>You have to pay for it!</b> Recall our principle of: <b><i>“Avoid commercially licensed software.”</i></b><i> </i>If you’re running OpenShift in the Cloud, then you’re paying licenses for it. And, as we’ve discussed before, this also limits your elasticity and scalability.</li><li><b>GKE is the market leader</b> (according to the <a href="https://cloud.google.com/blog/products/containers-kubernetes/a-leader-in-2023-gartner-magic-quadrant-for-container-management">Gartner 2023 Magic Quadrant</a>). Whilst OpenShift isn’t far behind, why pay a license for software that Google gives you for free? (Yes, on Google you will be paying for the managed service and the infrastructure it runs on. But this is significantly cheaper than the OpenShift licensing for an equivalent footprint. And you’ll be paying for the physical footprint either way.)</li><li>With the introduction of <b>GKE Autopilot</b> (which is now Google’s default offering when running GKE), Google provides an out-of-the-box configuration that is best-practice, optimised, highly available, secure, and automatically upgrades and repairs. And furthermore, you only pay for the containers (pods) you’ve deployed; you’re not playing for unused GKE cluster infrastructure. This is not so <b>with OpenShift, where you will ALWAYS be paying for your hosting infrastructure</b>.</li><li>With GKE, you have <b>native integration with the Google Cloud ecosystem</b>.</li></ul><p id="5a31">In conclusion: migrate from VMs to containers if you can. Run those containers on Google Cloud Run or GKE, depending on the application. If you already have containers, they will be trivial to migrate. If you’re running a third party commercial Kubernetes environment on-premises, then don’t try to replicate it in Google Cloud. Ditch it in favour of GKE and/or Cloud Run.</p><h1 id="47d8">Middleware and Database</h1><p id="ba0b">The cost-saving opportunities in this category are HUGE! Far bigger than any of the software we’ve looked at so far. As usual, this is possible so long as we adhere to our principles, in particular: <i>“Use managed services”</i> and <i>“Avoid commercially licensed software.”</i></p><h2 id="29f2">Application Servers</h2><p id="4d16">In enterprises of any significant size, one of the most common types of server deployed in the data centre is the application server. There are a handful of application server types that are commonly found in enterprise data centres. These include:</p><ul><li><b>Java application servers</b>, including <a href="https://www.ibm.com/products/websphere-application-server">IBM Websphere Application Server</a> (WAS), <a href="https://www.oracle.com/uk/java/weblogic/">Oracle Weblogic</a>, <a href="https://developers.redhat.com/products/eap/overview">Red Hat JBoss Enterprise Application Platform</a> (EAP), and <a href="https://tomcat.apache.org/">Apache Tomcat</a>. While Tomcat is free and open source, the others are all commercially licensed.</li><li><b>.NET application servers</b> — primarily <a href="https://learn.microsoft.com/en-us/iis/get-started/introduction-to-iis/iis-web-server-overview">Microsoft IIS</a>. It is provided at no extra charge as part of the Windows Server operating system.</li><li><a href="https://nodejs.org/en"><b>Node.js application servers</b></a>, running Node.js applications. This is a free and open source platform.</li></ul><p id="98ed">Of course, these application servers exist simply to <i>run applications</i>. Enterprise organisations would be nothing without these applications. Typically, these applications will be:</p><ul><li><b>Home-grown applications</b>, i.e. software written by the enterprise itself.</li><li><b>3rd party commercial off-the-shelf (COTS) applications</b>. These might include applications providing capabilities such as: accounting, healthcare, E-Commerce, point-of-sale, merchandising, supply chain, warehouse management, transport and logistics, content management, knowledge management… The list goes on.</li></ul><p id="08f1">When migrating your enterprise applications to Google Cloud, there are a number of application-specific questions that need to be asked. But I’ll cover these when I get to application assessment. For now, let’s assume that we’ve confirmed that we can migrate our applications — running on these application servers — to Google Cloud. In which case, here’s what you should do…</p><p id="f0c4"><b>Remove all the commercially licensed application servers, and containerise where possible.</b></p><p id="daae">You knew I was going to say that, right?</p><p id="86a6">So now we’re back to GKE and Cloud Run. And here’s the good news:</p><ul><li><b>Tomcat </b>has an official production-grade <a href="https://hub.docker.com/_/tomcat">container image</a>. It is free and open source.</li><li><b>Node.js</b> has an official production-grade <a href="https://hub.docker.com/_/node">container image</a>. It is free and open source.</li><li><b>Microsoft </b>has official production-grade container images for the <a href="https://hub.docker.com/_/microsoft-dotnet-runtime/"><b>.NET Core</b></a><b> and <a href="https://hub.docker.com/_/microsoft-dotnet-aspnet/">ASP.NET Core</a> runtimes</b>. They are free and open soruce. Important note: they are free to deploy and use, so long as they run in a Linux environment. But if you deploy images that embed Windows Server Nano or Windows Server Core, then you need to pay for it.</li><li><b>Red Hat</b> has an official production-grade container image <a href="https://quay.io/repository/wildfly/wildfly">for <b>JBoss/Wildfly</b></a>. It is free and open source. (Wildfly is the free, open source version of JBoss EAP.)</li><li><a href="https://openliberty.io/docs/latest/container-images.html"><b>Open Liberty</b></a><b> </b>is a free and open source version of IBM’s Websphere Liberty. (Where Websphere Liberty is a lightweight, modular version of IBM Websphere Application Server.) Applications running in IBM WAS can often be ported to Libery with little or no changes.</li></ul><p id="d4ef">So most of the applicatio

Options

n servers I mentioned earlier can be containerised and run in Google Cloud, without needing any commercial license or subscription. Woop!</p><p id="f96a">The only exception is Oracle Weblogic. What to do? For these applications, port them to Wildfly or Tomcat! If your current application is a full Java J2EE application, Wildfly is probably a better choice. If it is a lightweight Java web application, then Tomcat is probably a better choice. Either way, this enables you to run your application in a container with no commercial license or subscription.</p><p id="2714">You might be asking… <i>“How much am I saving by doing this?” </i>Let’s use some approximate costs for IBM Websphere Application Server. I ran these numbers previously when talking about <a href="https://readmedium.com/google-cloud-adoption-for-the-enterprise-part-1b-reducing-software-license-costs-with-open-source-98453162ce8a">the importance of open source as part of your Cloud Adoption Strategy</a>. In this example, we have:</p><ul><li>10 physical servers, each with 20 physical cores. (So, 200 cores total.)</li><li>Let’s assume that I’m overcommitting vCPUs 4-to-1, so each physical server provides 80 vCPUs. And on each physical server, I’m going to run 40 VMs with an average VM size of 2 vCPUs. So in total, I’m running 400 Websphere VMs.</li><li>The upfront IBM license cost is approximately 100 per processor value unit. (PVU is an IBM license cost metric).</li><li>Our servers are rated at 70 PVUs per physical core.</li><li>So this works out to be 1.4m for the license, plus typically 20% per year for support and maintenance. Thus, 2.8m over 5 years. So, if we write-down these costs over 5 years, our annual cost is approximately 560K for WAS.</li><li>And then add another 160K per year, for the physical hardware, VMware, and OS licensing.</li><li>So this brings our approximate total to 720K per year. (And there’s SO MUCH that I’m not including in this cost estimate, like data centre occupancy, facilities, management overhead, etc.)</li></ul><p id="b211">What if I switched to a free container and ran on GKE instead? Let’s deploy a regional GKE cluster with a total of 6 nodes, with each node being an n2–80 (80 vCPU) machine. This would be a 40% reduction on the original on-prem vCPU footprint, which seems reasonable, given that our containers are much more lightweight than the original WAS workloads. Here, the <a href="https://cloud.google.com/products/calculator">Google Pricing Calculator</a> estimates approximately 80K per year.</p><p id="6ff1"><b>Based on these calculations, our 5 year TCO saving is going to be <i>AT LEAST</i> 3.2 million, for just 400 application servers!!</b></p><figure id="6f05"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*TUd1MrPJzXMePcmLk1Il1A.png"><figcaption>Comparing 5 year cost of on-prem IBM WAS to containerised Open Libery on GKE</figcaption></figure><p id="061b">And that, folks, is why you need to get rid of application server commercial licenses, and containerise your workloads in cloud. (And don’t forget all the other good reasons why this is a good idea.)</p><h2 id="db9a">Databases</h2><p id="0623">Of course, all organisations need data; it is the life blood of the business. This data is most often persisted in <b>relational databases</b>. Here I’m talking about databases — both analytical and transactional — where data is organised across related tables, and where the data is created and accessed using SQL.</p><p id="4663">In enterprises of any size and age, relational databases are typically deployed using one of more of the following commercial products:</p><ul><li>Oracle Database</li><li>Microsoft SQL Server</li><li>IBM DB2</li></ul><p id="fa77">Interestingly, all of these databases adhere to the <b>ANSI SQL standard</b>. This means that if your applications are written using standard ANSI SQL (which is good practice), then your applications will work with <i>any of these database, </i>and indeed, with<i> any relational database that supports ANSI SQL</i>.</p><p id="6d30">And this means that it is often relatively trivial to take an existing on-premises database hosted any of these commercial database products, and migrate them to a equivalent in Google Cloud.</p><p id="80b0">All these databases also offer proprietary SQL extensions, i.e. custom SQL commands and capabilities, which are unique to a given database vendor:</p><figure id="a7d1"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*py3I5N0KVnZ7urorDjbwqg.png"><figcaption>Indicative representation of ANSI SQL and overlap with the capabilities and extensions of specific commercial database vendor products</figcaption></figure><p id="1715">When these extensions have been used, the application becomes increasingly locked-in to a specific database product. The good news is that there are tools that can help you migrate proprietary SQL code to portable, generic SQL. (I’ll cover this off in detail, in the migration section of the series.)</p><p id="61f6">Generally, I would recommend the following target databases in Google Cloud:</p><ul><li><a href="https://cloud.google.com/sql/docs/introduction"><b>Google Cloud SQL PostgreSQL</b></a> — for transactional (OLTP) relational databases, up to around 64TB in size, where you need no more than around 10000 transactions per second. <a href="https://www.postgresql.org/">PostgreSQL</a> is an extremely popular <b>free and open source database</b>. And the Google Cloud SQL product is fully-managed and offers a 99.99% availability SLA. Patching and upgrades is taken care of. It’s trivial to implement HA and backups. And, of course, you can deploy using IaC.</li><li><a href="https://cloud.google.com/alloydb/docs"><b>Google AlloyDB</b> <b>for PostgreSQL</b></a>— for low latency transactional (OLTP) databases that will also be used to support analytical workloads (OLAP); or where you need more performance and scale than can be achieved with Cloud SQL PostgreSQL. It costs a little bit more than Cloud SQL PostgreSQL.</li><li><a href="https://cloud.google.com/spanner/docs/"><b>Google Cloud Spanner</b></a><b> </b>— where you need a relational, transactional (OLTP) database that offers multi-regional (global) transaction consistency and availability; or needs a 99.999% availability SLA; or needs to scale up to PB rather than TB.</li><li><a href="https://cloud.google.com/bigquery/docs/introduction"><b>Google BigQuery</b></a> — where you need an analytical (OLAP) relational database with SQL capabilities. BigQuery supports batch and streaming data ingestion, and offers incredible query performance even at PB scale. Newly inserted transactions are typically available in seconds (rather than ms), so it is no good for low-latency requirements.</li></ul><p id="215e">Let’s do another price comparison, to illustrate just how important it is to make the right DB choice. My comparison is as follows:</p><ul><li>100 DB instances, plus 100 DR instances.</li><li>All DB instances are running on 8 vCPU machines. (So, not small.) Thus, the total number of vCPUs is 2 x 100 x 8 = 1600 vCPUs.</li><li>The Oracle DB is Oracle Enterprise DB, running on Oracle Cloud Infastructure (OCI). On-prem prices vary wildly and will depend on the type of license you have, and any Unlimited License Agreement (ULA) you might have in place. But comparing to OCI gives us a pretty good benchmark. The cost is 0.215 per vCPU, per hour (taken from <a href="https://www.oracle.com/database/base-database-service/pricing">Oracle’s official pricing</a>). Which is equivalent to 1884 per vCPU per year.</li><li>Google Cloud SQL is PostgreSQL, running on db-highmem-8 machines. This costs 789 per vCPU per year.</li></ul><figure id="fbf8"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Xm42lXvTiq4EsmrSuNJbOQ.png"><figcaption>5 year projected cost: 100 Oracle DBs vs 100 Cloud SQL DBs</figcaption></figure><p id="3c4b">100 Oracle DBs of this size is not uncommon for moderately sized enterprise. And you can see from this price comparison that <b>this would cost you 15 million for 5 years of Oracle Enterprise DB in Oracle Cloud</b>. <b>The equivalent on Google Cloud SQL would be $6.3m. </b>So the cost difference is huge!</p><h1 id="d4a9">Conclusions</h1><p id="98e9">If you’ve been following my series so far, you’ll be spotting the same themes over and over again:</p><ul><li>Don’t use commercially licensed products when running in cloud.</li><li>Adopting open source in cloud gives the biggest opportunity to reduce costs, but without sacrificing any capability.</li><li>Avoid VMs if you can. Containerise application servers.</li><li>Don’t build and manage infrastructure in cloud the way you used to on-premises. Use managed products instead. This massively offloads infrastructure management overhead on your organisation. It also means that your software is always current, and it eliminates those painful infrastructure upgrade cycles that enterprises are often so bad at executing.</li><li>For example: don’t install databases (even open source ones) onto GCE VMs. If you do this, then you need to manage and patch the VMs, you need to install the database, and you need to manage and patch the database. This creates an unnecessary overhead for OS engineers and DBAs.</li><li>And don’t install your own Kubernetes platforms onto GCE VMs. Let Google do it all for you, with GKE. (And definitely don’t deploy licensed Kubernetes platforms onto GCE VMs. That’s doubly crazy.)</li></ul><h1 id="e46e">Other Stack Components</h1><p id="08b3">There’s a whole bunch of technologies I haven’t covered yet. Including messaging, API management, ETL, CI/CD, and operability. I’ll cover these in separate articles.</p><h1 id="807d">Before You Go</h1><ul><li><b>Please share</b> this with anyone that you think will be interested. It might help them, and it really helps me!</li><li>Feel free to <b>leave a comment</b> 💬.</li><li><b>Follow</b> and <b>subscribe, </b>so you don’t miss my content. Go to my <a href="https://medium.com/@derailed.dash">Profile Page</a>, and click on these icons:</li></ul><figure id="d7a2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*3zQRj5M3yDF2M5gs.png"><figcaption>Follow and Subscribe</figcaption></figure><h1 id="446c">Series Navigation</h1><ul><li><a href="https://readmedium.com/google-cloud-adoption-for-the-enterprise-from-strategy-to-operation-part-0-overview-9091f5a1ddfc">Series overview and structure</a></li><li>Previous: <a href="https://readmedium.com/mapping-your-as-is-to-google-cloud-to-leverage-cloud-value-6609b2368678">Mapping Your As-Is to Google Cloud, To Leverage Cloud Value: Infrastructure</a></li><li>Next: Teams, Skills, Capabilities and Responsibilities</li></ul></article></body>

Google Cloud Adoption: Mapping As-Is to Leverage Cloud Value: OS, Application Servers and DBs

Welcome to the continuation of the Google Cloud Adoption and Migration: From Strategy to Operation series.

In the previous part, we looked at how to map the as-is infrastructure components. In this part we’ll cover operating systems, application servers and, and databases.

A quick refresh of the HoaP:

White tiers are in scope for this article

As with the previous part, the goal is to recommend some target states you could and should move to, as part of your adoption of Google Cloud. I won’t be covering “How” in this part; that’s coming later in the series. The recommended target (and elimination of as-is platforms) will align to my set of Cloud Adoption and Cloud Consumptions principles:

  1. Host in public cloud
  2. Use managed services
  3. Use cloud-native services
  4. Avoid commercially licensed software
  5. Automate deployments and installs
  6. Immutable infrastructure (“cattle, not kittens”)
  7. Document everything
  8. Manage lock-in
  9. Systemic FinOps

Operating Systems and Containers

Existing VMs

It is common for existing enterprises to have applications, databases and infrastructure components running on the following server operating systems, on-premises:

  • Windows Server — on x86/VMware.
  • Linux — most typically Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server (SLES), Oracle Linux, and CentOS — on x86/VMware (and sometimes z/VM).
  • IBM AIX — running on IBM Power.

Lift-and-Shift: Pros and Cons

Generally, your goal when moving to Cloud should be to eliminate your use of VMs. I’ve covered this in some detail here. Sure, there are a bunch of advantages to performing a lift-and-shift of existing OS-based workloads to VMs in Cloud. E.g.

  • Much faster VM deployments in cloud.
  • Easier to deploy in an automated, consistent, repeatable way — with Terraform.
  • Easier to rightsize.
  • Ability to leverage Cloud scale, and elastic auto-scaling through the Google Cloud Load Balancer.
  • No need to procure physical tin, or deal with the associated lead times.
  • Pay for what you have deployed, not for the tin you buy.
  • Elimination of your existing data centre footprint.

But it’s also not ideal because:

  • VMs in the Cloud are not a fully-managed service. You still have VMs that need to be managed, patched and updated. You still need a process to do this.
  • You still have legacy applications.
  • Your legacy applications may not scale. In many cases, it may not even be possible to run more than one instance at one time.
  • Your legacy applications may not be certified to run in Cloud. (But you may not care.)
  • Your legacy applications may have a commercial license that is simply not viable for you in Cloud.
  • You are not leveraging cloud-native or fully-managed services that are available to you in Cloud.

Operating System Considerations

In addition, most enterprises are paying for their existing server operating systems. Usually, they are paying for some or all of the following:

  1. Entitlement to use the operating system.
  2. Support.
  3. Security patches.
  4. Entitlement to upgrades.

Ask yourself: how much is this worth? Can I get these features without a commercial license? The following operating systems are common in enterprise data centres:

  • Windows Server — requires a commercial license.
  • AIX, IBM’s proprietary OS. This requires a license, which is usually bundled as part of the Power hardware purchase and support.
  • Red Hat Enterprise Linux (RHEL). Despite being Linux, this requires a commercial license.
  • SUSE Linux Enterprise Server (SLES). Despite being Linux, this requires a commercial license.
  • CentOS, which used to be a completely free and open-source alternative to RHEL. (It is badged as 100% compatible to RHEL.) However, since the introduction of CentOS Stream, CentOS is no longer viable as a stable, production-ready RHEL equivalent.
  • Oracle Linux. Also badged as 100% compatible with RHEL, this can be run with a commercial license, or without one! But anyone familiar with Oracle’s history and practices will be extremely cautious about adopting any Oracle-badged products that claim to be FOSS. Just take a look at some of these headlines…
Some headlines relating to Oracle and open source over the last couple of years

Let me give you an indicative view of how much your OS choice might cost you. I ran the Google Cloud Pricing Calculator, and compared the cost of three identical GCE VMs: n2-standard-2 (2 vCPUs, 8GB) with 40GB standard persistent disk, always-on, in the London (europe-west2) region. The only difference between the VMs was the OS choice:

  • One had a truly free OS (e.g. Linux flavours like Debian and Ubuntu),.
  • Another had Red Hat Enterprise Linux (commercial)
  • The other was Windows Server (also commercial).

I took the yearly cost, and then multiplied it by 5000, to represent what would happen if a medium-sized organisation with 5000 VMs tried to lift-and-shift to GCE.

Yearly cost of 5000 VMs in Google GCE, with different OS types

You can see that your OS choice can nearly double your cost! And therefore: if you must lift-and-shift to VMs in the Cloud, you should avoid commercial operating systems wherever possible. Simply choosing a commercial Linux (like RHEL) over a free Linux (like Debian, Ubuntu, Alma, Rocky, etc) would cost such an organisation in the region of $13m over 5 years!

Oops.

In some cases, you may be able to bring-your-own licenses when migrating your commercial operating systems. But — as I mentioned in this series before — if you do this, you’re also elimating the elastic and pay-as-you-go benefits of Cloud. You’ll end up paying for a fixed amount of operating system licenses, and if you scale down, it won’t save you any money.

So, in conclusion: lift-and-shift your VMs to GCE only if you have no other choice. For example, if you have a legacy application that can’t be containerised. And if you do have to run GCE, avoid commercially licensed operating systems, if you can.

Alternatives: Containerisation

You may be asking, “What’s my alternative?” Well, it depends. Google offers a range of compute platforms to meet different needs and use cases. But generally, if you’re migrating existing workloads, my recommendation would be: containerise if you can.

What is a Container?

I could easily go down a rabbit hole on the topic of containerisation. But for now, let me give you a really quick intro…

Containers are lightweight, isolated environments, containing everything needed to run an application. You can think of them as independent, scalable, delivery vehicles for application code.

A container is an instance of an image. You can think of an image as the blueprint for a container. (For developers with some OO familiarity: the relationship between container and image is similar to the relationship between instance and class.)

Containers are abstracted from the host hardware and the host OS. Every container shares the same OS kernel. So containers run within an OS. They are simply OS processes. And once containerised, each deployed application exists as its own own container, rather than its own OS.

Why are containers a good thing? There are so many reasons! Here’s just a few…

  • Containers are abstracted from both hardware and operating system. This makes platform independent and highly portable. Much more portable than a VM. This helps you avoid lock-in.
  • So they can be run anywhere. And the container you run on a developer laptop, or a server in the data centre, or on a fully-managed Cloud Kubernetes environment — always the same!
  • They are extremely lightweight — much smaller than equivalent VMs. Since each container does not need to replicate the operating system, their footprint is tiny. And so, they consume fewer resources.
  • Because they consume fewer resources, containerised applications are generally much cheaper to run than equivalent applications in VMs.
  • And because containers are just instantiated as a process in the OS, they are super fast to deploy and super fast to scale. Why? Because there’s no OS to start. So you can scale out to thousands of instances in seconds!
  • They are completely isolated from other processes on the OS. Meaning each container can have independent and non-conflicting configuration.
  • They are typically deployed in a fully declarative way. Automated, repeatable infrastructure-as-code is easy with containers.
  • They package all the application dependencies. No more worrying about what needs to be installed to make them run. And no more dependency conflicts.
  • They can be layered. Like Lego!
  • Developers love them!

Google Cloud Container Runtimes

Once you’ve containerised an application, you have two ideal platforms you can run them on, in Google Cloud: Google Kubernetes Engine (GKE) and Cloud Run. Which one do you choose? As always… it depends.

Cloud Run

Cloud Run is Google’s fully-managed, serverless platform for running stateless containers. It is well-suited to simple containerised applications, where the application does not have complex dependencies between different microservices.

GKE

Google Kubernetes Engine (GKE) is a managed Kubernetes environment that allows you to deploy and orchestrate many containers on Kubernetes clusters. GKE is much more powerful and more configurable than Cloud Run. However, it requires a little more effort to manage, and is not serverless.

In general, use GKE when:

  • You have sophisticated applications or need for orchestration. E.g. multiple microservices that interact with each other.
  • You want full control over the machine types that underpin different services. Or, maybe you want specialised machine types for certain workloads, e.g. using GPUs.
  • You have stateful applications, where you are persisting state of the container (rather than as a separate peristence layer).
  • You want to leverage (and have full control over) Kubernetes capabilities, such as Deployments, Ingress, Rolling Updates, DaemonSets, StatefulSets, etc.
  • Your application is always on and therefore going to require a minimum amount of resource.
  • You have applications that are packaged as Helm charts.

Otherwise: use Cloud Run.

Suitable Applications for Containerisation

You may be asking: “What sorts of applications can I containerise?” All sorts! Typical candidates include:

  • Existing Java web applications, running on (for example) IBM Websphere Application Server, Oracle Weblogic, RedHat JBoss, or Tomcat.
  • Spring Boot applications.
  • Node.js applications.
  • Even .NET applications can be containerised.

More on all of these later.

Existing Containers

If you’re already running containers on-prem, then these can be easily migrated to run in Google Cloud. And, since containers are inherently portable, the migration is trivial.

You should aim to deploy to the same Google Cloud platforms: i.e. GKE and Cloud Run.

Coming from OpenShift?

If you are running OpenShift on-prem, you should be looking to migrate these workloads to GKE (or Cloud Run, where appropriate). Don’t try and deploy OpenShift to your Google Cloud environment. “Why?”

Because…

  • If you choose to run OpenShift on Google Cloud, you have to manage your own servers for the hosting of OpenShift. You’re back to the problem of deploying and managing GCE VM instances, because OpenShift will be running on GCE. (See all the cons for GCE.)
  • You have to deploy, manage, and patch OpenShift itself. You need engineering expertise to deploy, configure and continually manage OpenShift. GKE is managed by Google. OpenShift must be managed by you. Recall our principle of “Use managed services.”
  • You have to pay for it! Recall our principle of: “Avoid commercially licensed software.” If you’re running OpenShift in the Cloud, then you’re paying licenses for it. And, as we’ve discussed before, this also limits your elasticity and scalability.
  • GKE is the market leader (according to the Gartner 2023 Magic Quadrant). Whilst OpenShift isn’t far behind, why pay a license for software that Google gives you for free? (Yes, on Google you will be paying for the managed service and the infrastructure it runs on. But this is significantly cheaper than the OpenShift licensing for an equivalent footprint. And you’ll be paying for the physical footprint either way.)
  • With the introduction of GKE Autopilot (which is now Google’s default offering when running GKE), Google provides an out-of-the-box configuration that is best-practice, optimised, highly available, secure, and automatically upgrades and repairs. And furthermore, you only pay for the containers (pods) you’ve deployed; you’re not playing for unused GKE cluster infrastructure. This is not so with OpenShift, where you will ALWAYS be paying for your hosting infrastructure.
  • With GKE, you have native integration with the Google Cloud ecosystem.

In conclusion: migrate from VMs to containers if you can. Run those containers on Google Cloud Run or GKE, depending on the application. If you already have containers, they will be trivial to migrate. If you’re running a third party commercial Kubernetes environment on-premises, then don’t try to replicate it in Google Cloud. Ditch it in favour of GKE and/or Cloud Run.

Middleware and Database

The cost-saving opportunities in this category are HUGE! Far bigger than any of the software we’ve looked at so far. As usual, this is possible so long as we adhere to our principles, in particular: “Use managed services” and “Avoid commercially licensed software.”

Application Servers

In enterprises of any significant size, one of the most common types of server deployed in the data centre is the application server. There are a handful of application server types that are commonly found in enterprise data centres. These include:

Of course, these application servers exist simply to run applications. Enterprise organisations would be nothing without these applications. Typically, these applications will be:

  • Home-grown applications, i.e. software written by the enterprise itself.
  • 3rd party commercial off-the-shelf (COTS) applications. These might include applications providing capabilities such as: accounting, healthcare, E-Commerce, point-of-sale, merchandising, supply chain, warehouse management, transport and logistics, content management, knowledge management… The list goes on.

When migrating your enterprise applications to Google Cloud, there are a number of application-specific questions that need to be asked. But I’ll cover these when I get to application assessment. For now, let’s assume that we’ve confirmed that we can migrate our applications — running on these application servers — to Google Cloud. In which case, here’s what you should do…

Remove all the commercially licensed application servers, and containerise where possible.

You knew I was going to say that, right?

So now we’re back to GKE and Cloud Run. And here’s the good news:

  • Tomcat has an official production-grade container image. It is free and open source.
  • Node.js has an official production-grade container image. It is free and open source.
  • Microsoft has official production-grade container images for the .NET Core and ASP.NET Core runtimes. They are free and open soruce. Important note: they are free to deploy and use, so long as they run in a Linux environment. But if you deploy images that embed Windows Server Nano or Windows Server Core, then you need to pay for it.
  • Red Hat has an official production-grade container image for JBoss/Wildfly. It is free and open source. (Wildfly is the free, open source version of JBoss EAP.)
  • Open Liberty is a free and open source version of IBM’s Websphere Liberty. (Where Websphere Liberty is a lightweight, modular version of IBM Websphere Application Server.) Applications running in IBM WAS can often be ported to Libery with little or no changes.

So most of the application servers I mentioned earlier can be containerised and run in Google Cloud, without needing any commercial license or subscription. Woop!

The only exception is Oracle Weblogic. What to do? For these applications, port them to Wildfly or Tomcat! If your current application is a full Java J2EE application, Wildfly is probably a better choice. If it is a lightweight Java web application, then Tomcat is probably a better choice. Either way, this enables you to run your application in a container with no commercial license or subscription.

You might be asking… “How much am I saving by doing this?” Let’s use some approximate costs for IBM Websphere Application Server. I ran these numbers previously when talking about the importance of open source as part of your Cloud Adoption Strategy. In this example, we have:

  • 10 physical servers, each with 20 physical cores. (So, 200 cores total.)
  • Let’s assume that I’m overcommitting vCPUs 4-to-1, so each physical server provides 80 vCPUs. And on each physical server, I’m going to run 40 VMs with an average VM size of 2 vCPUs. So in total, I’m running 400 Websphere VMs.
  • The upfront IBM license cost is approximately $100 per processor value unit. (PVU is an IBM license cost metric).
  • Our servers are rated at 70 PVUs per physical core.
  • So this works out to be $1.4m for the license, plus typically 20% per year for support and maintenance. Thus, $2.8m over 5 years. So, if we write-down these costs over 5 years, our annual cost is approximately $560K for WAS.
  • And then add another $160K per year, for the physical hardware, VMware, and OS licensing.
  • So this brings our approximate total to $720K per year. (And there’s SO MUCH that I’m not including in this cost estimate, like data centre occupancy, facilities, management overhead, etc.)

What if I switched to a free container and ran on GKE instead? Let’s deploy a regional GKE cluster with a total of 6 nodes, with each node being an n2–80 (80 vCPU) machine. This would be a 40% reduction on the original on-prem vCPU footprint, which seems reasonable, given that our containers are much more lightweight than the original WAS workloads. Here, the Google Pricing Calculator estimates approximately $80K per year.

Based on these calculations, our 5 year TCO saving is going to be AT LEAST $3.2 million, for just 400 application servers!!

Comparing 5 year cost of on-prem IBM WAS to containerised Open Libery on GKE

And that, folks, is why you need to get rid of application server commercial licenses, and containerise your workloads in cloud. (And don’t forget all the other good reasons why this is a good idea.)

Databases

Of course, all organisations need data; it is the life blood of the business. This data is most often persisted in relational databases. Here I’m talking about databases — both analytical and transactional — where data is organised across related tables, and where the data is created and accessed using SQL.

In enterprises of any size and age, relational databases are typically deployed using one of more of the following commercial products:

  • Oracle Database
  • Microsoft SQL Server
  • IBM DB2

Interestingly, all of these databases adhere to the ANSI SQL standard. This means that if your applications are written using standard ANSI SQL (which is good practice), then your applications will work with any of these database, and indeed, with any relational database that supports ANSI SQL.

And this means that it is often relatively trivial to take an existing on-premises database hosted any of these commercial database products, and migrate them to a equivalent in Google Cloud.

All these databases also offer proprietary SQL extensions, i.e. custom SQL commands and capabilities, which are unique to a given database vendor:

Indicative representation of ANSI SQL and overlap with the capabilities and extensions of specific commercial database vendor products

When these extensions have been used, the application becomes increasingly locked-in to a specific database product. The good news is that there are tools that can help you migrate proprietary SQL code to portable, generic SQL. (I’ll cover this off in detail, in the migration section of the series.)

Generally, I would recommend the following target databases in Google Cloud:

  • Google Cloud SQL PostgreSQL — for transactional (OLTP) relational databases, up to around 64TB in size, where you need no more than around 10000 transactions per second. PostgreSQL is an extremely popular free and open source database. And the Google Cloud SQL product is fully-managed and offers a 99.99% availability SLA. Patching and upgrades is taken care of. It’s trivial to implement HA and backups. And, of course, you can deploy using IaC.
  • Google AlloyDB for PostgreSQL— for low latency transactional (OLTP) databases that will also be used to support analytical workloads (OLAP); or where you need more performance and scale than can be achieved with Cloud SQL PostgreSQL. It costs a little bit more than Cloud SQL PostgreSQL.
  • Google Cloud Spanner — where you need a relational, transactional (OLTP) database that offers multi-regional (global) transaction consistency and availability; or needs a 99.999% availability SLA; or needs to scale up to PB rather than TB.
  • Google BigQuery — where you need an analytical (OLAP) relational database with SQL capabilities. BigQuery supports batch and streaming data ingestion, and offers incredible query performance even at PB scale. Newly inserted transactions are typically available in seconds (rather than ms), so it is no good for low-latency requirements.

Let’s do another price comparison, to illustrate just how important it is to make the right DB choice. My comparison is as follows:

  • 100 DB instances, plus 100 DR instances.
  • All DB instances are running on 8 vCPU machines. (So, not small.) Thus, the total number of vCPUs is 2 x 100 x 8 = 1600 vCPUs.
  • The Oracle DB is Oracle Enterprise DB, running on Oracle Cloud Infastructure (OCI). On-prem prices vary wildly and will depend on the type of license you have, and any Unlimited License Agreement (ULA) you might have in place. But comparing to OCI gives us a pretty good benchmark. The cost is $0.215 per vCPU, per hour (taken from Oracle’s official pricing). Which is equivalent to $1884 per vCPU per year.
  • Google Cloud SQL is PostgreSQL, running on db-highmem-8 machines. This costs $789 per vCPU per year.
5 year projected cost: 100 Oracle DBs vs 100 Cloud SQL DBs

100 Oracle DBs of this size is not uncommon for moderately sized enterprise. And you can see from this price comparison that this would cost you $15 million for 5 years of Oracle Enterprise DB in Oracle Cloud. The equivalent on Google Cloud SQL would be $6.3m. So the cost difference is huge!

Conclusions

If you’ve been following my series so far, you’ll be spotting the same themes over and over again:

  • Don’t use commercially licensed products when running in cloud.
  • Adopting open source in cloud gives the biggest opportunity to reduce costs, but without sacrificing any capability.
  • Avoid VMs if you can. Containerise application servers.
  • Don’t build and manage infrastructure in cloud the way you used to on-premises. Use managed products instead. This massively offloads infrastructure management overhead on your organisation. It also means that your software is always current, and it eliminates those painful infrastructure upgrade cycles that enterprises are often so bad at executing.
  • For example: don’t install databases (even open source ones) onto GCE VMs. If you do this, then you need to manage and patch the VMs, you need to install the database, and you need to manage and patch the database. This creates an unnecessary overhead for OS engineers and DBAs.
  • And don’t install your own Kubernetes platforms onto GCE VMs. Let Google do it all for you, with GKE. (And definitely don’t deploy licensed Kubernetes platforms onto GCE VMs. That’s doubly crazy.)

Other Stack Components

There’s a whole bunch of technologies I haven’t covered yet. Including messaging, API management, ETL, CI/CD, and operability. I’ll cover these in separate articles.

Before You Go

  • Please share this with anyone that you think will be interested. It might help them, and it really helps me!
  • Feel free to leave a comment 💬.
  • Follow and subscribe, so you don’t miss my content. Go to my Profile Page, and click on these icons:
Follow and Subscribe

Series Navigation

Google Cloud
Cloud Migration
Application Server
Database
Google Kubernetes Engine
Recommended from ReadMedium