AWS Partner Network (APN) Blog

Migrating Containerized Applications to Amazon EKS in Minutes Using XebiaLabs Blueprints

By Amy Johnston, Senior Product Marketing Manager at XebiaLabs

Connect with XebiaLabs-1
Rate XebiaLabs-1

When it comes to container management platforms, Kubernetes’ popularity can’t be beat. According to the Cloud Native Computing Foundation’s most recent survey of cloud-native technology use, 83 percent of respondents use Kubernetes. Forty percent of respondents from enterprise companies use it in production environments.

Amazon Elastic Kubernetes Service (Amazon EKS) is an easy way to run containerized applications on Kubernetes on the Amazon Web Services (AWS) Cloud.

Amazon EKS provides a Kubernetes management infrastructure across Availability Zones (AZs), so you don’t have to manage a control plane or replace unhealthy control plane nodes. In addition, Amazon EKS is fully Kubernetes-compliant, so you can easily migrate applications that are running in standard Kubernetes environments.

As an AWS Partner Network (APN) Advanced Technology Partner with the AWS DevOps Competency, XebiaLabs builds release orchestration and deployment automation solutions that help companies move applications to the cloud in a scalable, secure, and compliant way.

XebiaLabs supports infrastructure provisioning and application deployment for many of the most popular AWS services, including Amazon EKS.

We recently introduced a feature called DevOps as Code. This makes it even easier for your teams when they’re getting started with Amazon EKS, or migrating applications to Amazon EKS infrastructure that they’ve already set up.

Going Code-Native with DevOps as Code

The XebiaLabs DevOps as Code approach allows your teams to define all of the components of their DevOps pipeline in code so they can version control and audit with ease.

DevOps as Code lets you create cloud infrastructure, environments, release templates, dashboards, and more in YAML files that you can share across projects, applications, and teams.

DevOps as Code also includes blueprints, which guide your teams through a process that automatically generates YAML files for their applications. A blueprint asks a short series of questions about the application and type of environment it requires. The XebiaLabs command line interface (CLI) uses the answers to generate YAML files that define configuration items and releases, plus special configuration files that manage sensitive data such as passwords.

XebiaLabs provides out-of-the-box blueprints that you can use to experiment with the XL YAML format. Use them to get acquainted with XebiaLabs products, and to see what a typical release to a platform like Amazon EKS looks like.

Using a Blueprint to Deploy a Sample App

Let’s take a look at a sample blueprint that deploys a microservice-based application on Amazon EKS.

Step 1: Prerequisites

To get started, install the XebiaLabs DevOps Platform. The XebiaLabs DevOps Platform is available for purchase on AWS Marketplace, or you can download a trial version from the XebiaLabs website.

The XebiaLabs DevOps Platform offers release orchestration and deployment automation that helps you launch applications to production in minutes. You will also want to install the XebiaLabs CLI.

Make sure to remember the admin passwords you create during the installation process, as you use them later to log in to the GUI.

Step 2: Run the Blueprint

Open a command prompt and navigate to the location where you’d like to save your XL YAML files. Execute the xl blueprint command to access the XebiaLabs blueprints, and then select the aws/microservice-ecommerce blueprint.

Here, you must provide some basic information, such as the name of the application, keys for accessing your AWS account, and the AWS Region where you want to run the app. If you’re new to Amazon EKS, you can choose to have XebiaLabs create a cluster for you. If you already have an Amazon EKS cluster up and running, XebiaLabs can deploy the application there instead.

In the final question, when asked about the XL Deploy URL, accept the default answer.

The XL CLI generates everything required for deploying an application to Amazon EKS, including YAML files and AWS CloudFormation templates.

Step 3: Review the Code

Open the YAML files in a text editor to review the code the XL CLI generated. For example, the screenshot in Figure 1 describes the package that XebiaLabs uses to provision Amazon EKS worker nodes and save the output data (for example, the cluster endpoint).

XebiaLabs Blueprints-1

Figure 1 – YAML file showing code generated by the XebiaLabs CLI to provision Amazon EKS worker nodes and save output data.

The following screenshot shows the portion of the release template you can use to provision the Amazon EKS cluster and deploy the sample application.

XebiaLabs Blueprints-2

Figure 2 – YAML file showing the portion of the release template that can be used to provision the Amazon EKS cluster and sample microservice application.

Step 4: Apply the Code

The XL CLI created a xebialabs.yaml file that points to the other YAML files it requires. You can apply the code by running the following command:

xl apply -f xebialabs.yaml

When you apply the code, XebiaLabs creates infrastructure and environment configuration items, deployment packages, and release templates based on the information in the YAML files.

After applying the YAML files, log in to the XebiaLabs DevOps Platform.

In the XL Deploy GUI of the XebiaLabs DevOps Platform, you see the following items in the tree on the left side:

  • AWS Cloud and AWS CloudFormation infrastructure items.
  • An environment that contains those infrastructure items.
  • Packages for provisioning:

In the XL Release GUI of the XebiaLabs DevOps Platform, you see the following items under Templates:

  • CI/CD template that provisions the infrastructure, builds the microservice artifacts, and deploys them to the infrastructure.
  • A Destroy template you can use to remove the microservices and tear down the infrastructure.

Step 5: Provision the Cluster and Deploy the App

Open the CI/CD release template in the XL Release GUI.

XebiaLabs Blueprints-3

Figure 3 – Release template in the XebiaLabs DevOps Platform XL Release GUI showing release tasks for sample microservice application.

To get started, choose New Release, give the release a name, and choose Create.

Choose Start Release and watch the magic happen. The XebiaLabs DevOps Platform starts automatically executing the release tasks that provision the Amazon EKS infrastructure, builds the microservice artifacts, and deploys them to the infrastructure. You can watch the progress of the release tasks as they run. Select a completed task to review the execution log.

XebiaLabs Blueprints-4

Figure 4 – Release template in the XebiaLabs DevOps Platform XL Release GUI showing the automatic execution of the release tasks that provision the Amazon EKS infrastructure, build the microservice artifacts, and deploy them to the infrastructure.

How it Works

XebiaLabs starts by creating an Amazon S3 bucket to store the Lambda functions that are required for the application. It then provisions the VPC and creates AWS Identity and Access Management (IAM) resources, which are necessary for the Amazon EKS worker nodes and for running the Lambda functions.

Next, XebiaLabs provisions the Amazon EKS control plane instance and worker instances and deploys the ConfigMap that connects the workers to the master. XebiaLabs then uses Jenkins to build the sample microservice artifacts.

To deploy the microservices, XebiaLabs creates a Kubernetes namespace called xl-demo, and then deploys stateful and stateless services onto the namespace. Finally, after the deployment is complete, XebiaLabs gets the URL of the deployed application and provides it in the final Verify Application task so you can easily navigate to the running application.

Monitoring Deployment Progress

XebiaLabs makes it easy to monitor infrastructure provisioning and application deployment activities in real-time, no matter which platform you’re targeting.

XebiaLabs offers real-time logging, making troubleshooting cloud deployments a breeze. All that information is captured and provided in reports for later review.

Clean Up

To clean up, open the Destroy template, create a release from that template, and run it. XebiaLabs undeploys the microservices, de-provisions the Amazon EKS cluster, and removes the Lambda functions, VPC, and IAM resources.

Adapt the Code for Your Apps

Now that you’ve seen how a typical deployment to Amazon EKS works, you can adapt the YAML files for your own applications. All you have to do is edit the files and re-run the xl apply command.

The XL CLI updates the deployment and release components accordingly and creates new items if necessary.

Benefits of XebiaLabs

At XebiaLabs, we want to make it easy for companies to move applications to the cloud and adopt container technologies like Kubernetes. The XebiaLabs DevOps Platform:

  • Orchestrates build, test, provisioning, and deployment tasks for the end-to-end software delivery pipeline, including tasks that aren’t yet automated.
  • Offers smart out-of-the-box integration functionality, so you can launch applications on Amazon EKS without writing custom deployment scripts.
  • Provides a high-level view of the release process, as well as granular visibility into exactly what’s running on AWS.
  • Allows DevOps teams to define the complete delivery pipeline in code. Teams can easily version control the code and share it across the organization.
The content and opinions in this blog are those of the third party author and AWS is not responsible for the content or accuracy of this post.


Connect with XebiaLabs-1

XebiaLabs – APN Partner Spotlight

XebiaLabs is an AWS Competency Partner. They create a unified, holistic view across all software delivery pipelines while automating and executing crucial governance, compliance, and security processes.

Contact XebiaLabs | Solution Overview | AWS Marketplace

*Already worked with XebiaLabs? Rate this Partner

*To review an APN Partner, you must be an AWS customer that has worked with them directly on a project.