AWS Open Source Blog

Accelerate your Application Modernization to Amazon EKS with Konveyor

Modernization is the process of progressively transforming legacy applications and infrastructure to extend into the higher value of cloud native services. Along with people and process changes, modernization unlocks new business capabilities, accelerates innovation, and reduces technical debt.

Migrating applications to the cloud is a three-phase process, starting with assessment, progressing with mobilization and executing with migration and modernization. During assessment and/or mobilization you select one of 7 migration strategies (also known as 7 Rs: Refactor, Replatform, Repurchase, Rehost, Relocate, Retain, and Retire), for each of your targeted workloads.

Application modernization is the process of building new, or updating existing ones, to a cloud-first approach, to align with modern technology and business requirements. Of the 7 Rs, Refactor and Replatform are the scope of application modernization.

Frequently, companies focus on transferring their workloads to the cloud, adopting rehosting and relocation as their primary strategies, mistakenly believing they are modernizing. However, this assumption is incorrect. The issue lies in the fact that merely relocating an application from a data center to the cloud (often referred to as a “lift and shift”) does not alter the fundamental essence of the codebase which will keep the same inherent drawbacks of the original architecture. True modernization only occurs when legacy applications undergo foundational re-architecting.

Lots of tools exist to assist during the three phases of migration, some provided by AWS, such as AWS Migration Hub, and others provided by third-parties. Today, we will talk about Konveyor, an open source tool, with specific support for modernizing applications running on Kubernetes.

Overview

Konveyor is an open source application modernization platform that helps organizations safely and predictably modernize applications to new technologies, with an initial focus on accelerating the adoption of legacy applications to Kubernetes. Konveyor was accepted by the Cloud Native Computing Foundation (CNCF) as a Sandbox project in July 2022 to help foster a diverse community of contributing organizations.

Konveyor diagram

Konveyor is based on a 5-step methodology:

  1. Assess, in which an analysis of the AS-IS infrastructure, applications and interdependencies is followed by the definition of the possible TO-BE states, identifying gaps and paths to get there
  2. Rationalize, that facilitates the selection of the most suitable migration strategies, amongst the 7 Rs explained earlier
  3. Prepare, ensuring all is ready to start the migration
  4. Pilot, which aims at delivering a first migration of a representative set of applications, focusing on testing feasibility and making the process repeatable
  5. Scale, focusing on producing an accurate project plan for the full migration

This methodology is not required to be used with Konveyor but remains available to help guide others embarking on their own modernization journey.

5 step Konveyor methodology

The platform is structured around the concept of a Unified Experience to aid multiple personas such as enterprise architects who manage modernization engagements as well as the migrators, or developers who carry out the specific refactoring development work.

Konveyor workflow personas diagram

The experience is centered on:

  1. Surfacing information across an entire portfolio, providing the ability to see high-level trends combined with the ability to drill deep into the specific technical issues, and view the impacted source code
  2. Aiding the enterprise architect in making better informed decisions related to the modernization engagement
  3. Planning and managing work through integration with external tools for task creation and customized views of progress
  4. Execution of the modernization efforts by aiding the migrators who will perform the refactoring. Konveyor will not be a magic solution to automatically refactor source code, but it will aid the migrator in carrying out the modernization work by automating tasks such as the generation of Dockerfiles, Kubernetes Manifests, unit tests, and executing refactoring recipes when possible

Application Inventory, Code Analysis, and Assessments

Konveyor’s Application Inventory provides a view of an organization’s application portfolio. The inventory is the central component that all other pieces integrate into. From the application inventory, a user is able to run an Assessment or an Analysis of a given application and obtain reports that provide information about concerns for migrating that specific application.

Konveyor application inventory

An application inventory

Assessment is a questionnaire based tool that assesses the suitability of applications for deployment in containers within an enterprise Kubernetes platform. The reports provide information about the suitability of the applications for containerization, highlighting risks, and producing an adoption plan informed by effort, priority, and dependencies.

Konveyor Assessment Report Screenshot

Example of an Assessment Report

Analysis will examine both binaries and source code to help identify potential concerns or issues to aid in estimating the migration effort for different targets or paths. Konveyor has an extensive support for enterprise Java needs as of today, with additional languages in active development in the community with support for C# being the next language on the roadmap.

Konveyor analysis

Example of running an Analysis

Konveyor issues found report screenshot

Example of an Analysis Report looking at Issues found

Konveyor analysis technologies found screenshot

Example of an Analysis Report looking at technologies found

Further capabilities are in active development in the community but not yet integrated such as:

  • Kubernetes resource generation via move2kube
  • Monolith codebase analysis with Data Gravity Insights to gain insights to better refactor into a domain driven microservice by triangulating between code, data, and transactional boundaries
  • Test generation via test-generator
  • Standardize natural language descriptions of technology stack components with container-advisor to aid matching with an appropriate container image
  • Analyze data-centric applications to explore database and transaction elements via Data-intensive Validity Analyzer

You can watch a demo of Konveyor in action.

A guided example of running an analysis on a Java application is also available.

Deployment

You have various options to deploy Konveyor:

Amazon EKS Blueprints Konveyor Pattern

Konveyor architecture diagram

To deploy Konveyor with the Konveyor Pattern for Amazon EKS Blueprints, please follow the steps below (see Konveyor Pattern documentation for a complete description).

Ensure that you have installed the following tools on your machine:

Start by setting the account and region environment variables:

ACCOUNT_ID=$(aws sts get-caller-identity —query 'Account' —output text)
AWS_REGION=$(aws configure get region)

Clone the repository:

git clone https://github.com/aws-samples/cdk-eks-blueprints-patterns.git
cd cdk-eks-blueprints-patterns

Set the pattern’s parameters in the CDK context by overriding the cdk.json file (edit PARENT_DOMAIN_NAME as it fits):

PARENT_DOMAIN_NAME=example.com
HOSTED_ZONE_ID=$(aws route53 list-hosted-zones-by-name --dns-name $PARENT_DOMAIN_NAME --query "HostedZones[].Id" --output text | xargs basename)
cat << EOF > cdk.json
{
    "app": "npx ts-node dist/lib/common/default-main.js",
    "context": {
        "konveyor.parent.domain.name":"${PARENT_DOMAIN_NAME}",
        "konveyor.hosted.zone.id": "${HOSTED_ZONE_ID}"
      }
}
EOF

If you haven’t done it before, bootstrap your cdk account and region.

Run the following commands:

make deps
make build
make pattern konveyor deploy

When deployment completes, you will be able to access Konveyor at https://<subdomain>.<parent-domain>, with credentials:

  • Username: admin
  • Password: Passw0rd!

Conclusion

In this blog post, we provided an introduction to Konveyor, an open source tool that you can use in your modernization projects on Kubernetes. We looked at the five phases of its modernization methodology (Assess, Rationalize, Prepare, Pilot, Scale) and at how Konveyor is structured around the concept of a unified experience, to address perspectives of multiple personas. After diving into the Application Inventory, Code Analysis and Assessments functionalities, we explained ways for you to deploy Konveyor in different environments.

Please consider joining the user group of subject matter experts, should you want to share use cases and learnings around Modernization engagements, to improve Konveyor and its Rules. You can also join the Konveyor’s community meetings and subscribe to this mailing list, to learn more about upcoming features and share your insights.

Riccardo Freschi

Riccardo Freschi

Riccardo Freschi is a Sr. Solutions Architect at AWS, focusing on Application Modernization. He works closely with partners and customers, to help them transform their IT landscapes in their journey to the AWS Cloud, by refactoring existing applications and building new ones, cloud natively.

Celestino Bellone

Celestino Bellone

Celestino Bellone is a Cloud Native Software Engineer at Claranet Switzerland. Within his role, he engages with clients to orchestrate the modernization of their software portfolios. His focus is on facilitating the transition of traditional applications to refined cloud-native solutions, leveraging his expertise to enhance operational efficiency and performance.

John Matthews

John Matthews

John Matthews is a Sr. Principal Software Engineer & Engineering Manager at Red Hat where he works on solutions related to Migration and Modernization to Kubernetes. In 2019 he focused his efforts on the formation of Konveyor, which has become a CNCF Sandbox project. In Konveyor, John serves as a Maintainer with an emphasis on leading the future vision for the project.