@claranet-ch/konveyor-eks-blueprint-addon
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Konveyor Add-On for Amazon EKS Blueprints

Streamline the modernization of your application portfolio to Kubernetes. The Konveyor tool gives you insight throughout the migration process - whether you're making decisions at the portfolio or application level.

Feature set

  • Konveyor Hub: Central interface from where you manage your application portfolio and integrate with other Konveyor tools.

  • Categorize and group applications by different dimensions (pre-packaged or custom) aligned with technical criteria or your organization structure.

  • Assess applications containerization suitablity and risks assessment.

  • Assign priority, assess estimated migration effort, and define optimal migration strategy for individual applications.

  • Evaluate required changes for Java applications containerization through automated analysis (pre-packaged or custom rules).

  • Fully integrated Konveyor Data Intensive Validity Advisor (DiVA): Analyzes the data layer of applications and detect dependencies to different data stores and distributed transactions. Import target Java application source files to generate analysis results.

Konveyor is an Open Source software developed by the Konveyor Community, and is a CNCF Sandbox project.

This Open Source solution is packaged by Claranet Switzerland GmbH.

Prerequisites

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

Let’s 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)

Deployment

Clone the repository:

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

Install the addon

npm install @claranet-ch/konveyor-eks-blueprint-addon

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

(Optional) The full list of parameters you can set in the context is:

    "context": {
        "konveyor.namespace.name": ...,
        "konveyor.parent.domain.name": ...,
        "konveyor.subdomain.label": ...,
        "konveyor.hosted.zone.id": ...,
        "konveyor.certificate.resource.name": ...,
      }

You can assign values to the above keys according to the following criteria (values are required where you don't see default mentioned):

  • "konveyor.namespace.name": Konveyor's namespace, the default is "konveyor"
  • "konveyor.parent.domain.name": the parent domain in your Hosted Zone
  • "konveyor.subdomain.label": to be used as {"subdomain.label"}.{"parent.domain.name"}, the default is "backstage"
  • "konveyor.hosted.zone.id": the Hosted zone ID (format: 20x chars/numbers)
  • "konveyor.certificate.resource.name": resource name of the certificate, registered by the resource provider, the default is "konveyor-certificate"

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, the output will be similar to the following:

Example configuration

import { StackProps } from "aws-cdk-lib";
import { Construct } from "constructs";
import * as blueprints from "@aws-quickstart/eks-blueprints";
import {
  KonveyorAddOn,
  OlmAddOn,
} from "@claranet-ch/konveyor-eks-blueprint-addon";

export interface KonveyorConstructProps extends StackProps {
  account: string;
  region: string;
  parentDomain: string;
  konveyorLabel: string;
  hostedZoneId: string;
  certificateResourceName: string;
}

export class KonveyorConstruct extends Construct {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    const props = {
      account: process.env.CDK_DEFAULT_ACCOUNT,
      region: process.env.CDK_DEFAULT_REGION,
      namespace: blueprints.utils.valueFromContext(
        scope,
        "konveyor.namespace.name",
        "konveyor"
      ),
      parentDomain: blueprints.utils.valueFromContext(
        scope,
        "konveyor.parent.domain.name",
        "example.com"
      ),
      konveyorLabel: blueprints.utils.valueFromContext(
        scope,
        "konveyor.subdomain.label",
        "konveyor"
      ),
      hostedZoneId: blueprints.utils.valueFromContext(
        scope,
        "konveyor.hosted.zone.id",
        "1234567890"
      ),
      certificateResourceName: blueprints.utils.valueFromContext(
        scope,
        "konveyor.certificate.resource.name",
        "konveyor-certificate"
      ),
    };

    const subdomain = props.konveyorLabel + "." + props.parentDomain;

    const addOns: Array<blueprints.ClusterAddOn> = [
      new blueprints.AwsLoadBalancerControllerAddOn(),
      new blueprints.VpcCniAddOn(),
      new blueprints.CoreDnsAddOn(),
      new blueprints.KubeProxyAddOn(),
      new blueprints.ExternalDnsAddOn({
        hostedZoneResources: [blueprints.GlobalResources.HostedZone],
      }),
      new blueprints.EbsCsiDriverAddOn(),
      new OlmAddOn(),
      new KonveyorAddOn({
        certificateResourceName: props.certificateResourceName,
        subdomain,
        featureAuthRequired: "true",
      }),
    ];

    const blueprint = blueprints.EksBlueprint.builder()
      .account(props.account)
      .region(props.region)
      .resourceProvider(
        blueprints.GlobalResources.HostedZone,
        new blueprints.ImportHostedZoneProvider(
          props.hostedZoneId,
          props.parentDomain
        )
      )
      .resourceProvider(
        props.certificateResourceName,
        new blueprints.CreateCertificateProvider(
          "elb-certificate",
          subdomain,
          blueprints.GlobalResources.HostedZone
        )
      )
      .addOns(...addOns)
      .build(scope, props.konveyorLabel + "-cluster");
  }
}

Log in

Once the deployment ends navigate to

https://<subdomain>.<parent-domain>

And enter the default admin credentials:

  • Username: admin
  • Password: Passw0rd!

Enhancements/Bugs

Feel free to use issues to report bugs or request enhacements.

Readme

Keywords

none

Package Sidebar

Install

npm i @claranet-ch/konveyor-eks-blueprint-addon

Weekly Downloads

11

Version

1.0.2

License

Apache-2.0

Unpacked Size

50.8 kB

Total Files

10

Last publish

Collaborators

  • claranet-ch