Do you have applications in your portfolio that have been running for five, ten, or twenty years?Â
Congratulations, that means people use them and they add value! However, those existing applications are often built on older technologies and platforms, which can make them difficult to maintain and upgrade. Modernizing these applications into containers or serverless applications can help provide a plethora of benefits, including:Â
Increased agility: Containers can be easily deployed and scaled, which gives businesses greater agility to respond to changes in demand.
Improved performance: Containers can be more efficient than traditional virtual machines, which can lead to improved performance.
Enhanced security: Moving to container-based architecture makes it easier to introduce automated DevSecOps, enable secure supply chain and image security scans.
Reduced costs: Containers can help businesses to reduce their IT costs, as they can be deployed on a pay-as-you-go basis and offer efficient resource utilization compared with virtual machines.
Enable new technologies: By using uniform infrastructure which legacy applications run as containers makes it easier to extend existing applications to new technologies ‘born in cloud’ like AI/ML and Analytics that can be natively integrated in a container based environment.
Benefit from modern operations: Having existing applications run in containers can help businesses benefit from declarative infrastructure, automated CI/CD which reduce operations cost of existing applications.Â
Modernization rewards require an investment, but the ROI is worth it
There are a number of different ways to modernize legacy applications. One option is to rewrite the application from scratch. However, this can be a time-consuming and expensive process. A more cost-effective option is to modernize the application using a modern technology stack. This can be done by using a cloud-based platform, such as Google Cloud containerization platform, such as Google Kubernetes Engine, or a serverless platform like Google Cloud Run.
Enterprises run existing workloads which are essential part of their core business and play key roles in business processes which are either revenue contributing or supporting revenue generating activities. When enterprises create transformation cloud programs, they must decide how to handle existing applications. Due to effort and cost related with code rewrite, enterprises look for alternative approaches such as refactoring applications to run in containers. The approach offered by Migrate to Containers will reuse software binaries running on middleware frameworks like Windows IIS, Tomcat, IBM WebSphere or JBoss, and transform them to run on top of the image container of the framework. By transforming the application binary the application layer remains unchanged. The underlying services which are used by the application and provided by the framework and OS layers, are now provided through the Kubernetes ecosystem.Â
Here, you’re modernizing the runtime and compute host, not the code or architecture itself.
Where does refactoring make the most sense?Â
The promise of modernizing containers sounds appealing to IT Architects and CIOs, but is it a viable path for software built using the frameworks mentioned here? The answer to this question depends on the software architecture and its design, which sometimes is not known to the modernization practitioners tasked with containerizing heritage software. Limitations on containerization can come, for example, from code which includes access to other resources using IP addresses coded in the application, or logic which includes information about the physical deployment of the software. For this reason, the technical assessment plays a critical role in eliminating risks of modernization by inspecting the existing software architecture and indicating potential obstacles.Google Cloud offers multiple assessment options including our Fit Assessment Tool (mFit) – which inspects inspects the software binaries, configuration files and services running on the candidate applications and provides you with detailed technical fit analysis for containerization. In some cases, there is the need to go one step further and apply code scanning methods which require access to the software code, and use tools like the one offered by Google Cloud partners such as CASTor vFunction.
Can you make your modernization to containers simpler?
Containerization is a process of packaging an application component and its dependencies into a single unit that can be easily deployed and managed. This makes it much easier to move applications between different environments, and it can also improve performance and security. We are introducing a new tool called Migrate to Containers CLI that allows you to modernize existing software to containers running on GKE, GKE Autopilot, Cloud Run or Anthos clusters. The Migrate to Containers CLI is based on the existing Migrate to Containers, and introduces containerization functionality using a standalone, easy to operate CLI tool that can help you containerize legacy applications. The new command-line tool automates the process of converting your applications to containers. The CLI tool can be used to containerize a wide variety of software based on frameworks such as Tomcat, WebSphere, Apache, JBoss and WordPress. Additional frameworks are in the works, like Windows IIS applications and Linux-based software modernization to containers running on Linux system containers.Â
How to modernize existing software with Migrate to Container’s new CLI
To containerize legacy applications, you typically follow these steps: Assess, Copy, Analyze, Generate and Deploy.
In this example we are going to follow modernization of Tomcat application binaries from the source machine to Google Kubernetes Engine using tools installed on the developer local machine as illustrated in the diagram below.
1. Download and install Google modernization tools binaries of mFit and M2C CLI to your local environmentÂ
To download and install mFit run the following command:
To download and install M2C CLI run the following command:
2. Assess application – By running the fit assessment of your existing application use the command below to perform discovery on the source machine. The tool will run collection scripts on the assessed machine while it runs, no need to stop any running processes on the assessed machine. To learn more about the collection through SSH see here
Then generate an HTML report.
Finally, view the technical fit report by opening the generated HTML file in your local machine browser .
3. Copy the application folders to your local machine from the source machine by running the following command.
4. Analyze the application files by running the following command using the parameters relevant to your application.
In this example we used the command for the Tomcat application containerization. At this stage you can edit the generated migration file YAML files to configure parameters like the server name, ports to expose, deployment files to use, or sensitive data that you want to remove from the generated container image.Â
5. Generate the required artifacts as container image, artifacts.yaml and skaffold.yaml files by running the following command:
6. Deploy the generated artifacts on your target cluster using the generated Skaffold configuration file. You can build and deploy to your GKE cluster with a single command. Select an image repository that can host your images and is available from the target cluster. Then, in the generated artifacts directory, run the following command:
You can now use kubectl port-forward to test access to your deployed Tomcat application component. See kubectl documentation for more information.
For more information on how to modernize application using Migrate to Containers CLI, see the technical documentation
Cloud BlogRead More