CloudBees CI add-on for Amazon EKS blueprints
Tags: aws, eks, cicd, kubernetes
Published: 2024-04-04 07:00:00

Hey there! If you've dabbled with Amazon Elastic Kubernetes Service (Amazon EKS), you know it's a breeze to run add-ons developed by the Kubernetes open-source community. But, with so many tools and designs out there, crafting a custom Amazon EKS cluster to fit your app's needs might seem like a marathon.

Enter Amazon EKS blueprints – your new best friend for easily setting up EKS clusters packed with everything your software delivery team dreams of. These blueprints are like your recipe for success, using Infrastructure as Code (IaC) modules to serve up a ready-to-go Amazon EKS cluster for CloudBees CI, complete with all the essential tools to get those workloads running. And the cherry on top? You can deploy it across different accounts and regions in Amazon Web Services (AWS) without breaking a sweat.

Now, you might wonder, "Where does CloudBees CI fit into this picture?" 

Well….._(puts on marketing hat)_

1: CloudBees is thrilled to announce its integration into the expansive Amazon EKS blueprints community as an [AWS partner add-on](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/aws-partner-addons/). This collaboration simplifies the adoption and exploration of CloudBees CI’s enterprise features through two key components:

- The deployment of CloudBees CI on modern platforms 
         in AWS EKS is streamlined into a singular Terraform 
         module, making the onboarding process seamless and 
         efficient.
- A suite of [blueprints](https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon/tree/main/blueprints) for the CloudBees CI add-on 
        module, designed for compatibility with [Amazon EKS 
        blueprints for Terraform](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) that adhere to the [EKS Best 
        Practices Guides](https://aws.github.io/aws-eks-best-practices/), ensuring optimized performance.

2: [CloudBees CI](https://www.cloudbees.com/capabilities/continuous-integration) is a super robust continuous integration (CI) tool built on Jenkins—you know, the go-to CI/CD orchestrator. It's perfect for big enterprises that love Jenkins but need more oomph in managing and scaling it. While there's a bunch to highlight, we're zeroing in on how CloudBees CI and Amazon EKS blueprints team up.

3: If you have played around with the new [CloudBees platform](https://www.cloudbees.com/products/saas-platform), the Terraform module and its companion blueprints leverage the CloudBees platform for the blueprint CI builds.  CloudBees platform [actions](https://docs.cloudbees.com/docs/cloudbees-platform/latest/actions) orchestrated by [workflows](https://docs.cloudbees.com/docs/cloudbees-platform/latest/workflows/?_gl=1*1alsm34*_ga*MTE2NDM3Njk3NS4xNzExOTgyNzQx*_ga_37TX6SE1FC*MTcxMjE2NjQ2Ny4zLjEuMTcxMjE3OTc5NS4wLjAuMA..) allow us to perform automated testing for each new release (refer to the [.cloudbees folder]( https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon/tree/main/.cloudbees)) for more info.

_(pause while i take off my marketing hat and put on my “make it so” hat)_

Setting up your Amazon EKS cluster with CloudBees CI is now as easy as pie (mmmm pie), letting you focus on what really matters – delivering awesome software.

## Let's get to the good stuff:

**Blueprint 01:** [Getting Started](https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon/tree/main/blueprints/01-getting-started) 
Get started with the [CI on modern platforms in Amazon EKS](https://docs.cloudbees.com/docs/cloudbees-ci/latest/eks-install-guide/?_gl=1*1kn55hs*_ga*MTE2NDM3Njk3NS4xNzExOTgyNzQx*_ga_37TX6SE1FC*MTcxMjE2NjQ2Ny4zLjEuMTcxMjE2ODAyOC4wLjAuMA..) by running this blueprint, which installs CloudBees CI on modern platforms and its prerequisites, to help you understand the minimum setup which includes:

- AWS Certificate Manager (ACM)
- Amazon EKS blueprints add-ons:
       AWS Load Balancer Controller
       ExternalDNS
       Amazon Elastic Block Store (Amazon EBS) Container 
       Storage Interface (CSI) driver, to allocate Amazon EBS 
       volumes for hosting $JENKINS_HOME.

**Blueprint 02:** [Deployment at Scale]( https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon/tree/main/blueprints/02-at-scale)
Once you are familiar with CloudBees CI blueprint add-on: Getting started(Blueprint 01 from above), this blueprint presents a scalable architecture and configuration by adding:

  - An Amazon Elastic File System (Amazon EFS) drive that is required by CloudBees CI High Availability/Horizontal Scalability (HA/HS) controllers and is optional for non-HA/HS controllers.

  - An Amazon Simple Storage Service (Amazon S3) bucket to store assets from applications like CloudBees CI, Velero, and Fluent Bit.

  - Amazon EKS managed node groups for different workloads: CI applications, CI on-demand agents, CI spot agents, and Kubernetes applications.

  - Amazon CloudWatch Logs to explode control plane logs and Fluent Bit logs.

  - The following Amazon EKS blueprints add-ons:

       1. AWS EFS CSI Driver: Connects the Amazon EFS drive 
          to the Amazon EKS cluster
       2. AWS for Fluent Bit: Acts as an applications log 
          router for log observability in CloudWatch.
       3. Cluster Autoscaler: Watches Amazon EKS managed node 
          groups, to accomplish CloudBees CI auto-scaling 
          nodes on Amazon EKS.
       4. Kube Prometheus Stack: Used for metrics 
          observability.
       5. Metrics Server: This is a requirement for CloudBees 
          CI High Availability controllers for horizontal pod 
          autoscaling.
       6. Velero: Backs up and restores Kubernetes resources 
          and volume snapshots, which is only compatible with 
          Amazon EBS.


  - Cloudbees CI uses [Configuration as Code](https://docs.cloudbees.com/docs/cloudbees-ci/latest/casc-controller/) (CasC)to enable exciting new features for streamlined DevOps and other enterprise features, such as CloudBees CI [Hibernation](https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/managing-controllers#_hibernation_in_managed_masters)
- The CI operations center is using the CasC Bundle Retriever.
- Managed controller configurations are managed from the operations center using source control management (SCM).
- The managed controllers are using CasC bundle inheritance (refer to the parent folder). This "parent" bundle is inherited by two types of "child" controller bundles: [high availability](https://docs.cloudbees.com/docs/cloudbees-ci/latest/ha/ha-fundamentals) (HA) and none-HA, to accommodate considerations about HA controllers.

## Conclusion
There you have it! With Amazon EKS blueprints and CloudBees, you're essentially fast-tracking your projects. So, why not give it a shot and see how it can boost your projects? Trust me, it's worth exploring.


This is a summary repost from the blog: [CloudBees CI add-on for Amazon EKS blueprints](https://www.cloudbees.com/blog/deploy-cloudbees-ci-to-amazon-web-services-aws-elastic-kubernetes-service), which contains even more links and architectural diagrams of the infrastructure for your viewing enjoyment.