move2kube.gif

Platform Modernization with Move2Kub

Overview

Kubernetes is emerging the dominant container orchestration platforms which offers auto-scaling, resilience and high degree of automation in continuous integration and continuous deployment. However, significant effort is involved in transforming applications so as to enable their deployment in Kubernetes clusters. This gap needs to be bridged to ensure effective use of the features that Kubernetes provides.

Challenges of the replatforming process

Following are the challenges a typical platform modernization effort would have to factor in, while planning to replatform an enterprise application to Kubernetes:

  1. Scale: Enterprise applications could have thousands of components (e.g. micro-services). Manually replatforming them is tedious as well as error-prone. Significant effort and cost will be incurred just to debug the human errors.

  2. Need for diverse expertise: Replatforming requires skilled resources who are well-versed in source as well as target platform. Finding skilled human resources is expensive. The cost would increase further if the application is engineered to run across multiple source platforms and uses diverse language stacks.

  3. Effective asset discovery: Application artifacts could distributed across many repositories and platforms. Discovering and identifying relevant artifacts for each of the application components is a tedious error-prone task if done manually.

  4. Effective containerization of workloads: Container configurations in terms of layering and security should be optimally chose to ensure high performance and security for applications. This requires deep understanding of internals of container runtimes, image architecture and application configuration.

  5. Mapping the features of the source platform effectively to the target platform: Mapping a source platform feature to corresponding target platform feature could be challenging. E.g. Suppose an multi-service application requires the services to be networked. The right network configuration would have to chosen from a spectrum of options from a K8s service to more advanced service mesh like Istio.

  6. Applying best practices: There are best practices to be adopted when deploying an application in a Kubernetes cluster. There are also best practices which are organization specific. The challenge is to codify these best practices while replatforming the application and repeatably apply it on a catalogue of applications for a given organization.

  7. Customization and day 2 operations: Customizing the application configuration to match the features of the target platform, and also ensure high-level of automation of Day 2 operations like CI/CD even in cases where the application originally did not have a automated CI/CD pipeline or adopted a legacy CI/CD mechanism, is a challenge which is encountered very often in enterprise setting.

Overview of Konveyor Move2Kube

Konveyor Move2Kube is an open-source tool which offers an out-of-box solution to the above challenges as well as a framework for customization wherever the out-of-box solution needs to be adapted to specific variations of the above challenges. Move2Kube allows the user to create all your Infrastructure as Code artifacts as per your organizational requirements. As shown in the below figure, it allows integrated discovery, containerization, transformation, parameterization and customization.

m2k1.png

Phase of use

Move2Kube has three phases of usage: collect, plan and transform, as shown in the figure below. While move2kube collect, allows for collecting source application artifacts spread across repositories and runtimes, move2kube plan discovers and formulates a plan containing various transformation options as a proposal. Once the user decides on the plan, move2kube transform could be used to transform the application so as to generate the necessary target platform artifacts.

m2k2.png

Usage Mode And Flow

Move2Kube is available in two usage modes: CLI and a Web interface. Both of them could be easily installed on a user workstation without the need for an elaborate environment setup. The figure provides the commands and references to install either mode.

m2k3.png

Move2Kube Repositories: https://github.com/konveyor/move2kube

Typically, a Move2Kube user would start by discovering all the relevant artifacts in an application catalogue and decide on a representative set of apps, use Move2Kube and its customization framework to perform platform migration on these apps as per the enterprise requirement and finally use the customizations learnt from the previous step to perform platform migration for the entire catalogue at scale.

Platform Support

Move2Kube provides support (as shown in the below figure) for various source platforms like Cloud Foundry, Docker Swarm and language stacks like Java SpringBoot, Golang, Microsoft .NET, Python. Move2Kube has out-of-the-box support for Kubernetes, Knative and OpenShift, but can also be used to generate artifacts for specific target platforms using its transformer architecture. A tutorial of sample applications for various platforms and language stacks could be found in the caption of the below figure.

m2k5.png

Move2Kube Tutorials: https://move2kube.konveyor.io/tutorials

Transformer Architecture

Move2Kube could achieve high degree of generality and customization by means of its Transformer Architecture. This architecture allows for a pipeline of independent modules called Transformers which interact with each other through exchange of artifacts and persisted state to achieve a larger transformation task. These transformers could be either built-in to Move2Kube, or externally supplied (no change to Move2Kube code-base is required) either as containerized modules, or native executable and/or scripts. Move2Kube allows for rapid prototyping of transformers within an a sandbox environment through Starlark scripts. Sample transformer scripts and projects are available in the repository mentioned in the caption.

m2k6.png

Samples of Move2Kube Transformers: https://github.com/konveyor/move2kube-transformers

Summary

Move2Kube is open-sourced and also available as part of CNCF sandbox project Konveyor. The tool could be easily adopted for use by enterprises, academics or public with little effort. There is also support for the tool in terms of documentation, tutorials and sample code. The potential for this tool as a generalized templating engine is not restricted to the current support for language platforms or target platforms like Kubernetes, but go far beyond in code-generation. It falls up the user’s creativity to unlock its potential for hitherto unsupported domains.

Open Source Contributions

Konveyor Move2Kube - An application replatforming tool to move applications to Kubernetes