From 5ac75aa76765ad618c017f4a1018208184c5d546 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Tue, 10 Sep 2024 13:17:24 -0400 Subject: [PATCH 01/20] First pass at copy editing the CD/RO blueprint add-on --- CONTRIBUTING.md | 29 ++++-- LICENSE | 2 +- README.md | 69 +++++++------- blueprints/01-getting-started/README.md | 57 +++++++----- blueprints/01-getting-started/outputs.tf | 18 ++-- blueprints/01-getting-started/variables.tf | 10 +- blueprints/02-at-scale/README.md | 101 +++++++++++++-------- blueprints/02-at-scale/outputs.tf | 44 ++++----- blueprints/02-at-scale/variables.tf | 6 +- outputs.tf | 16 ++-- variables.tf | 10 +- 11 files changed, 199 insertions(+), 163 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 188bca6..a1bd22f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,23 +1,34 @@ # Contributing -This document provides guidelines for contributing to the module. +This document provides guidelines for contributing to the CloudBees CD/RO add-on for Amazon EKS blueprints. ## Dependencies Validate your changes inside the blueprint-agent described in [.Dockerfile](blueprints/Dockerfile). It can be run `make dBuildAndRun`. -## Pre-commits: Linting, Formatting and Secrets Scanning +## Report bugs and feature requests + +CloudBees welcomes you to use the GitHub issue tracker to report bugs or suggest features. -Many of the files in the repository can be linted or formatted to -maintain a standard of quality. +When filing an issue: -Additionally, secret leaks are watched via gitleaks and git-secrets. +1. Check existing open and recently closed [issues](https://github.com/cloudbees/terraform-aws-cloudbees-cd-eks-addon/issues) to ensure the issue has not already been reported. +2. Review the upstream repositories: + - [aws-ia/terraform-aws-eks-blueprints](https://github.com/aws-ia/terraform-aws-eks-blueprints/issues) + - [aws-ia/terraform-aws-eks-blueprints-addons](https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/issues) +3. Try to include as much information as you can. Details like the following are incredibly useful: + - A reproducible test case or series of steps + - The version of code being used + - Any modifications you have made relevant to the bug + - Anything unusual about your environment or deployment + +## Pre-commits: Linting, Formatting and Secrets Scanning -When working with the repository for the first time run pre-commit +Many of the files in the repository can be linted or formatted to maintain a standard of quality. Additionally, secret leaks are watched via [gitleaks](https://github.com/zricethezav/gitleaks#pre-commit) and [git-secrets](https://github.com/awslabs/git-secrets). -Run `pre-commit install` -Run `pre-commit run --all-files` +1. When working with the repository for the first time, you must install `pre-commit`. For more information, refer to [pre-commit installation](https://pre-commit.com/#installation). +2. Run `pre-commit run --all-files`. Run this command again if the automated checks fail when you create a pull request. ## Release Drafter -This repository uses [Release Drafter](https://github.com/release-drafter/release-drafter) thus it is recommended to use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) to ease labelling your Pull Request accordingly. \ No newline at end of file +This repository uses [Release Drafter](https://github.com/release-drafter/release-drafter) thus it is recommended to use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) to ease labelling your pull request accordingly. \ No newline at end of file diff --git a/LICENSE b/LICENSE index d895ee9..2de6137 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 CloudBees +Copyright (c) 2024 CloudBees Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3f46f6a..90f6b8c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# CloudBees CD Add-on for AWS EKS +# CloudBees CD/RO add-on for Amazon EKS blueprints

cloudbees-icon -

Deploy CloudBees CD to AWS EKS Clusters with this add-on.

+

Deploy CloudBees CD/RO to Amazon Web Services (AWS) Elastic Kubernetes Service (EKS) clusters

--- @@ -11,17 +11,17 @@ ## Motivation -This [AWS Partner Addon](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/aws-partner-addons/) aims to ease the adoption and experimentation of CloudBees CD enterprise features by: +The CloudBees CD/RO AWS add-on streamlines the adoption and experimentation of CloudBees CD/RO enterprise features by: -- Encapsulating the Deployment of [CloudBees CD Modern in AWS EKS](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/) into a Terraform module. -- Providing a series of [Blueprints](blueprints) implementing the mentioned CloudBees CD Addon module on top of [AWS Terraform EKS Addons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) which are aligned with [EKS Best Practices Guides](https://aws.github.io/aws-eks-best-practices/). +- Encapsulating the deployment of [CloudBees CD/RO in AWS EKS](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/) into a Terraform module. +- Providing a series of opinionated [blueprints](blueprints) that implement the CloudBees CD/RO add-on module for use with [Amazon EKS blueprints for Terraform](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) which are aligned with the [EKS Best Practices Guides](https://aws.github.io/aws-eks-best-practices/). -## CD License -You'll need a valid license to operate the Cloudbees CD server. By default the product use the Server License type. Please visit the [CloudBees CD Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses) for more information. +## CloudBees CD/RO license +You must have a valid license to operate the CloudBees CD/RO server. By default the product use the Server License type. For more information, refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses). ## Usage -There are examples of implementation included in the [blueprint](blueprints) folder but the simplest example of usage is as follows: +Implementation examples are included in the [blueprint](blueprints) folder, however this is the simplest example of usage: ```terraform module "eks_blueprints_addon_cbcd" { @@ -33,46 +33,42 @@ module "eks_blueprints_addon_cbcd" { } ``` -By default, it uses a minimum required configuration described in [values.yml](values.yml). - -If you would like to override any defaults with the chart, you can do so by passing the `helm_config` variable. +By default, it uses a minimum required configuration described in the Helm chart [values.yml](values.yml). If you need to override any default settings with the chart, you can do so by passing the `helm_config` variable. > [!TIP] -> Blueprints lifecycle (`deploy` > `validate` > `destroy`) can be orchestrated via the companion [Makefile](Makefile). +> The blueprints lifecycle (`deploy` > `validate` > `destroy`) can be orchestrated via the companion [Makefile](Makefile). ## Prerequisites ### Tooling -Blueprint `deploy` and `destroy` phases use the same tooling requirement per [AWS EKS Blueprints - Getting Started Guide - Prerequisites](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#prerequisites). - -Nevertheless, the Blueprint `validate` phase might require additional toolings like `jq` and `velero`. +The blueprint `deploy` and `destroy` phases use the same requirements provided in the [AWS EKS Blueprints for Terraform - Prerequisites](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#prerequisites). However, the blueprint `validate` phase may require additional tooling, such as `jq` and `velero`. > [!NOTE] -> There is a companion [Dockerfile](blueprints/Dockerfile) to run the blueprints in a containerized Dev environment ensuring dependecies are met. It can be built by using the [Makefile](Makefile) target `make dRun`. +> There is a companion [Dockerfile](blueprints/Dockerfile) to run the blueprints in a containerized development environment, ensuring all dependencies are met. It can be built locally using the [Makefile](Makefile) target `make dRun`. -### AWS Authentication +### AWS authentication -Make sure to export your required [AWS Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) to your CLI before getting started (eg. `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` or `AWS_PROFILE`). +Before getting started, you must export your required [AWS Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) to your CLI before getting started (for example, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_PROFILE`). -### Existing AWS Hosted Zone +### Existing AWS 53 hosted zone -These blueprints rely on an existing Hosted Zone in AWS Route53. If you don't have one, you can create one by following the [AWS Route53 documentation](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html). +These blueprints rely on an existing hosted zone in AWS Route 53. If you do not have a hosted zone, you can create one by following the [AWS Rout 53 documentation](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html). -## Data Storage Options +## Data storage options -The main components of CloudBees CD, use a file system to persist data. Data is stored in a couple of [places](https://docs.cloudbees.com/docs/cloudbees-cd/latest/requirements/k8s-requirements#persist) that can be configured to be stored in Amazon EBS or EFS: +CloudBees CD/RO uses a file system to persist data. Data is stored in several [locations](https://docs.cloudbees.com/docs/cloudbees-cd/latest/requirements/k8s-requirements#persist) and configured to be stored in Amazon Elastic Block Store (Amazon EBS) or Amazon Elastic File System (Amazon EFS) -- Amazon EBS volumes are scoped to a particular Availability Zone to offer high-speed, low-latency access to the EC2 instances they are connected to. If an Availability Zone fails, an EBS volume becomes inaccessible due to file corruption, or there is a service outage, the data on these volumes will become inaccessible. Operations Center and Managed Controller pods require this persistent data and have no mechanism to replicate the data, so we recommend frequent backups for Amazon EBS. -- Amazon EFS file systems are scoped to an AWS Region and can be accessed from any Availability Zone in the Region the file system was created in. Using Amazon EFS as a storage class for the Operations Center and Managed Controller allows pods to be rescheduled successfully onto healthy nodes in the event of an Availability Zone outage. Amazon EFS file systems may increase the cost of the deployment compared to the Amazon EBS option, but provide greater fault tolerance. +- Amazon EBS volumes are scoped to a particular availability zone to offer high-speed, low-latency access to the Amazon Elastic Compute Cloud (Amazon EC2) instances they are connected to. If an availability zone fails, an Amazon EBS volume becomes inaccessible due to file corruption, or there is a service outage, the data on these volumes becomes inaccessible. The pods require this persistent data and have no mechanism to replicate the data, so CloudBees recommends frequent backups for Amazon EBS. +- Amazon EFS file systems are scoped to an AWS region and can be accessed from any availability zone in the region that the file system was created in. Using Amazon EFS as a storage class allows pods to be rescheduled successfully onto healthy nodes in the event of an availability zone outage. Amazon EFS is more expensive than Amazon EBS, but provides greater fault tolerance. > [!IMPORTANT] -> CloudBees CD clustered mode requires Amazon EFS. See [CloudBees CD EKS Storage Requirements](https://docs.cloudbees.com/docs/cloudbees-cd/latest/requirements/k8s-requirements#persist). +> CloudBees CD/RO clustered mode requires Amazon EFS. For more information, refer to [CloudBees CD/RO EKS Storage Requirements](https://docs.cloudbees.com/docs/cloudbees-cd/latest/requirements/k8s-requirements#persist). > [!NOTE] -> For more information on pricing, see the [Amazon EBS pricing page](https://aws.amazon.com/ebs/pricing/) and the [Amazon EFS pricing page](https://aws.amazon.com/efs/pricing/). +> For more information on pricing and cost analysis, refer to [Amazon EBS pricing](https://aws.amazon.com/ebs/pricing/) and [Amazon EFS pricing](https://aws.amazon.com/efs/pricing/). -## Terraform Docs +## Terraform documentation ### Inputs @@ -82,7 +78,7 @@ The main components of CloudBees CD, use a file system to persist data. Data is | cert_arn | Certificate ARN from AWS ACM | `string` | n/a | yes | | host_name | Route53 Host name | `string` | n/a | yes | | flow_db_secrets_file | Secrets file yml path containing the secrets names:values to create the Kubernetes secret flow_db_secret. | `string` | `"flow_db_secrets-values.yml"` | no | -| helm_config | CloudBees CD Helm chart configuration | `any` |
{
"values": [
""
]
}
| no | +| helm_config | CloudBees CD/RO Helm chart configuration | `any` |
{
"values": [
""
]
}
| no | ### Outputs @@ -98,15 +94,12 @@ The main components of CloudBees CD, use a file system to persist data. Data is | merged_helm_config | (merged) Helm Config for CloudBees CD | -## Communications - -Cloudbees' slack channel [#cbcd-eks-blueprints](https://cloudbees.slack.com/archives/C05NACAEM5H) - -## References +## Additional resources -- [CloudBees CD Docs](https://docs.cloudbees.com/docs/cloudbees-cd/latest/) -- [CloudBees CD release notes](https://docs.cloudbees.com/docs/release-notes/latest/cloudbees-cd/) -- [Architecture for CloudBees CD on modern cloud platforms](https://docs.cloudbees.com/docs/cloudbees-cd/latest/architecture/cd-cloud) +- [CloudBees CD/RO documentation](https://docs.cloudbees.com/docs/cloudbees-cd/latest/) +- [CloudBees CD/RO release notes](https://docs.cloudbees.com/docs/release-notes/latest/cloudbees-cd/) +- [Architecture for CloudBees CD/RO](https://docs.cloudbees.com/docs/cloudbees-cd/latest/architecture/) - [Amazon EKS Blueprints Addons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) -- [Amazon EKS Blueprints Patterns](https://aws-ia.github.io/terraform-aws-eks-blueprints/) -- [Bootstrapping clusters with EKS Blueprints | Containers](https://aws.amazon.com/blogs/containers/bootstrapping-clusters-with-eks-blueprints/) +- [Amazon EKS Blueprints for Terraform](https://aws-ia.github.io/terraform-aws-eks-blueprints/) +- [Containers: Bootstrapping clusters with EKS Blueprints](https://aws.amazon.com/blogs/containers/bootstrapping-clusters-with-eks-blueprints/) +- [EKS Workshop](https://www.eksworkshop.com/) diff --git a/blueprints/01-getting-started/README.md b/blueprints/01-getting-started/README.md index c9f76de..7cf0419 100644 --- a/blueprints/01-getting-started/README.md +++ b/blueprints/01-getting-started/README.md @@ -1,21 +1,22 @@ -# CloudBees CD Add-on getting started Blueprint +# CloudBees CD/RO blueprint add-on: Get started -Get started with the [CloudBees CD on Modern in EKS](https://docs.cloudbees.com/docs/cloudbees-ci/latest/eks-install-guide/) by running this blueprint which just installs the product and its [prerequisites](https://docs.cloudbees.com/docs/cloudbees-ci/latest/eks-install-guide/installing-eks-using-helm#_prerequisites) to help you understand the minimum requirements. +Get started with the [CloudBees CD/RO on Kubernetes +](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/) by running this blueprint, which only installs the product and its [prerequisites](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/installation, to help you understand the minimum setup: -- AWS Certificate Manager -- **[Amazon EKS Addons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/)**: +- Amazon Web Services (AWS) certificate manager +- The following [Amazon EKS blueprints add-ons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/): - [AWS Load Balancer Controller](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/aws-load-balancer-controller/) - [External DNS](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/external-dns/) - - [EBS CSI Driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) to allocate EBS volumes for hosting Cloudbees CD. + - [Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) to allocate Amazon EBS volumes for hosting Cloudbees CD/RO. > [!TIP] -> A [Resource Group](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html) is added to get a full list with all resources created by this blueprint. +> A [resource group](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html) is added, to get a full list with all resources created by this blueprint. ## Architecture ![Architecture](img/getting-started.architect.drawio.svg) -### Kubernetes Cluster +### Kubernetes cluster ![Architecture](img/getting-started.k8s.drawio.svg) @@ -48,37 +49,47 @@ Get started with the [CloudBees CD on Modern in EKS](https://docs.cloudbees.com/ ## Deploy -First of all, customize your terraform values by copying `.auto.tfvars.example` to `.auto.tfvars`. +When preparing to deploy, you must complete the following steps: -Initialize the root module and any associated configuration for providers and finally create the resources and deploy CloudBees CD to an EKS Cluster. Please refer to [Getting Started - Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy) +1. Customize your Terraform values by copying `.auto.tfvars.example` to `.auto.tfvars`. +1. Initialize the root module and any associated configuration for providers. +1. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). -For more detailed information, see the documentation for the [Terraform Core workflow](https://www.terraform.io/intro/core-workflow). +For more information, refer to [The Core Terraform Workflow](https://www.terraform.io/intro/core-workflow) documentation. ## Validate -Once the resources have been created, note that a `kubeconfig` file has been created inside the respective `blueprint/k8s` folder. Start defining the Environment Variable [KUBECONFIG](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable) to point to the generated file. +Once the blueprint has been deployed, you can validate it. + +### Kubeconfig + +Once the resources have been created, a `kubeconfig` file is created in the [/k8s](k8s) folder. Issue the following command to define the [KUBECONFIG](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable) environment variable to point to the newly generated file: ```sh eval $(terraform output --raw kubeconfig_export) ``` -Once you get access to K8s API from your terminal, validate that: +If the command is successful, no output is returned. -> [!NOTE] -> DNS propagation can take a few minutes +### CloudBees CD/RO -- Once propagation is ready, it is possible to access the CloudBees CD by copying the outcome of the below command in your browser. +Once you can access the Kubernetes API from your terminal, complete the following steps. - ```sh - terraform output cbcd_url - ``` +1. DNS propagation may take several minutes. Once propagation is complete, issue the following command: -Now that you’ve installed CloudBees CD, you’ll want to see your system in action. You will need the initial admin password to log in by run the following command in your terminal: + ```sh + terraform output cbcd_url + ``` +1. To access CloudBees CD/RO, paste the output of the previous command into a web browser. +1. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: - ```sh - eval $(terraform output --raw cbcd_password) - ``` + ```sh + eval $(terraform output --raw cbcd_password) + ``` ## Destroy -To teardown and remove the resources created in the blueprint, the typical steps of execution are as explained in [Getting Started - Amazon EKS Blueprints for Terraform - Destroy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#destroy) +To tear down and remove the resources created in the blueprint, complete the steps for [Amazon EKS Blueprints for Terraform - Destroy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#destroy). + +> [!TIP] +> The `destroy` phase can be orchestrated via the companion [Makefile](../../Makefile). diff --git a/blueprints/01-getting-started/outputs.tf b/blueprints/01-getting-started/outputs.tf index 2821708..30620eb 100644 --- a/blueprints/01-getting-started/outputs.tf +++ b/blueprints/01-getting-started/outputs.tf @@ -1,46 +1,46 @@ output "kubeconfig_export" { - description = "Export KUBECONFIG environment variable to access to access the K8s API." + description = "Export the KUBECONFIG environment variable to access the Kubernetes API." value = "export KUBECONFIG=${local.kubeconfig_file_path}" } output "kubeconfig_add" { - description = "Add Kubeconfig to local configuration to access the K8s API." + description = "Add Kubeconfig to your local configuration to access the Kubernetes API." value = "aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name}" } output "cbcd_helm" { - description = "Helm configuration for CloudBees CD Add-on. It is accesible only via state files." + description = "Helm configuration for the CloudBees CD/RO add-on. It is accessible via state files only." value = module.eks_blueprints_addon_cbcd.merged_helm_config sensitive = true } output "cbcd_namespace" { - description = "Namespace for CloudBees CD Add-on." + description = "Namespace for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_namespace } output "cbcd_url" { - description = "URL of the CloudBees CD Operations Center for CloudBees CD Add-on." + description = "URL of the CloudBees CD/RO server for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_url } output "cbcd_password" { - description = "Command to get the admin password of Cloudbees CD" + description = "Command to get the admin password for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_password } output "acm_certificate_arn" { - description = "ACM certificate ARN" + description = "AWS Certificate Manager (ACM) certificate for Amazon Resource Names (ARN)." value = module.acm.acm_certificate_arn } output "vpc_arn" { - description = "VPC ID" + description = "VPC ID." value = module.vpc.vpc_arn } output "eks_cluster_arn" { - description = "EKS cluster ARN" + description = "Amazon EKS cluster ARN." value = module.eks.cluster_arn } diff --git a/blueprints/01-getting-started/variables.tf b/blueprints/01-getting-started/variables.tf index 00f3458..b97eabb 100644 --- a/blueprints/01-getting-started/variables.tf +++ b/blueprints/01-getting-started/variables.tf @@ -1,26 +1,26 @@ variable "tags" { - description = "Tags to apply to resources" + description = "Tags to apply to resources." default = {} type = map(string) } variable "host_name" { - description = "Host name. CloudBees CD Apps is configured to use this host name." + description = "Host name. CloudBees CD/RO applications are configured to use this host name." type = string } variable "hosted_zone" { - description = "Route 53 Hosted Zone. CloudBees CD Apps is configured to use this hosted zone." + description = "Amazon Route 53 hosted zone. CloudBees CD/RO applications are configured to use subdomains in this hosted zone." type = string } variable "suffix" { - description = "Unique suffix to be assigned to all resources" + description = "Unique suffix to assign to all resources" default = "" type = string validation { condition = length(var.suffix) <= 10 - error_message = "The suffix cannot have more than 10 characters." + error_message = "The suffix cannot contain more than 10 characters." } } diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index d78ad4b..62056d9 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -1,32 +1,35 @@ -# CloudBees CD Add-on at scale Blueprint +# CloudBees CD/RO blueprint add-on: At scale -Once you have familiarized yourself with the [Getting Started blueprint](../01-getting-started/README.md), this one presents a scalable architecture and configuration by adding: +Once you have familiarized yourself with the [CloudBees CD/RO blueprint: Get started](../01-getting-started/README.md), this blueprint presents a scalable architecture and configuration by adding: -- An [RDS](https://aws.amazon.com/rds/) that can be used by Cloudbees CD as database server. -- An [EFS Drive](https://aws.amazon.com/efs/) that can be used by Cloudbees CD for cluster setup. It is managed by [AWS Backup](https://aws.amazon.com/backup/) for Backup and Restore. -- An [s3 Bucket](https://aws.amazon.com/s3/) to store assets from applications like Velero. -- [EKS Managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) for Cloudbees CD application. -- The following **[Amazon EKS Addons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/)**: - - EKS Managed node groups are watched by [Cluster Autoscaler](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/cluster-autoscaler/) to accomplish [CloudBees auto-scaling nodes on EKS](https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/eks-auto-scaling-nodes) on defined EKS Managed node groups. - - [EFS CSI Driver](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/aws-efs-csi-driver/) to connect EFS Drive to the EKS Cluster. - - The [Metrics Server](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/metrics-server/) is required by CBCD for Horizontal Pod Autoscaling. - - [Velero](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/velero/) for Backup and Restore of Kubernetes Resources and Volumen snapshot (EBS compatible only). +- An [RDS](https://aws.amazon.com/rds/) that can be used by CloudBees CD/RO as database server. +- An [Amazon Elastic File System (Amazon EFS) drive](https://aws.amazon.com/efs/) that can be used by CloudBees CD/RO for cluster setup. It is managed by [Amazon Web Services (AWS) Backup](https://aws.amazon.com/backup/) for backup and restore. +- An [Amazon S3 bucket](https://aws.amazon.com/s3/) to store assets from applications, such as Velero. +- [Amazon Elastic Kubernetes Service (Amazon EKS) managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) for CloudBees CD/RO applications. +- The following [Amazon EKS blueprints add-ons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/): + + | Amazon EKS blueprints add-ons | Description | + |-------------------------------|-------------| + | [AWS EFS CSI Driver](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/aws-efs-csi-driver/)| Connects the Amazon EFS drive to the Amazon EKS cluster. | + | [Cluster Autoscaler](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/cluster-autoscaler/) | Watches Amazon EKS managed node groups to accomplish CloudBees CD/RO auto-scaling nodes on EKS. | + | [Metrics Server](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/metrics-server/) | This is required by CloudBees CD/RO for horizontal pod autoscaling.| + | [Velero](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/addons/velero/)| Backs up and restores Kubernetes resources and volume snapshots. It is only compatible with Amazon Elastic Block Store (Amazon EBS).| > [!TIP] -> A [Resource Group](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html) is added to get a full list with all resources created by this blueprint. +> A [resource group](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html) is also included, to get a full list of all resources created by this blueprint. -## CD License -A initial license is required to use CloudBees CD. Please refer to the [CloudBees CD Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses) for more information. +## CloudBees CD/RO license +A license is required to use CloudBees CD/RO. Please refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses) for more information. ## Architecture ![Architecture](img/at-scale.architect.drawio.svg) -### Kubernetes Cluster +### Kubernetes cluster ![Architecture](img/at-scale.k8s.drawio.svg) -## Terraform Docs +## Terraform documentation ### Inputs @@ -66,64 +69,82 @@ A initial license is required to use CloudBees CD. Please refer to the [CloudBee | vpc_arn | VPC ID | -## Deploy +~~## Deploy -Refer to the [Getting Started Blueprint - Deploy](../01-getting-started/README.md#deploy) section. +When preparing to deploy, you must complete the following steps: -Additionally, the following is required: +1. Customize your Terraform values by copying `.auto.tfvars.example` to `.auto.tfvars`. +1. Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. +1. If using the Terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` must be updated. +1. Initialize the root module and any associated configuration for providers. +1. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). -- Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. -- In the case of using the terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` requires to be updated +For more information, refer to [The Core Terraform Workflow](https://www.terraform.io/intro/core-workflow) documentation. ## Validate -### CBCD -- Once propagation is ready, it is possible to access the CloudBees CD by copying the outcome of the below command in your browser. +Once the blueprint has been deployed, you can validate it. - ```sh - terraform output cbcd_url - ``` - - Now that you’ve installed CloudBees CD, you’ll want to see your system in action. You will need the initial admin password to log in by run the following command in your terminal: +### Kubeconfig + +Once the resources have been created, a `kubeconfig` file is created in the [/k8s](k8s) folder. Issue the following command to define the [KUBECONFIG](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable) environment variable to point to the newly generated file: ```sh - eval $(terraform output --raw cbcd_password) + eval $(terraform output --raw kubeconfig_export) ``` -### Backups and Restores +If the command is successful, no output is returned. + +### CloudBees CD/RO + +Once you can access the Kubernetes API from your terminal, complete the following steps. -- For Database Storage is based on RDS. +1. DNS propagation may take several minutes. Once propagation is complete, issue the following command: - - Create a snapshot of the RDS instance. + ```sh + terraform output cbcd_url + ``` +1. To access CloudBees CD/RO, paste the output of the previous command into a web browser. +1. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: + + ```sh + eval $(terraform output --raw cbcd_password) + ``` +### Back up and restore + +#### Back up and restore Database storage using Amazon Relational Database Service (Amazon RDS) + +1. Issue the following command to create a snapshot of the Amazon RDS instance: ```sh eval $(terraform output -raw rds_backup_cmd) ``` - - Restore the RDS instance from the snapshot. +1. Issue the following command to restore the RDS instance from the snapshot: + ```sh eval $(terraform output -raw rds_restore_cmd) ``` -- For EBS Storage is based on Velero. +#### Back up and restore using Velero - - Create a Velero Backup schedule for Team CD to take regular backups. +1. Issue the following command to create a Velero backup schedule for `Team CD`: ```sh eval $(terraform output --raw velero_backup_schedule_team_cd) ``` - - - Velero Backup on a specific point in time for Team CD. Note also there is a scheduled backup process in place. +1. Issue the following command to take an on-demand Velero backup for a specific point in time for `Team CD` based on the schedule definition: ```sh eval $(terraform output --raw velero_backup_on_demand_team_cd) ``` - - - Velero Restore process: Make any update on `team-cd` (e.g.: adding some jobs), take a backup including the update, remove the latest update (e.g.: removing the jobs) and then restore it from the last backup as follows + +1. Issue the following command to restore from the last backup: ```sh eval $(terraform output --raw velero_restore_team_cd) ``` - - EFS Access point (they match with CloudBees CI `pvc`) +1. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC): ```sh eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path @@ -131,4 +152,4 @@ Additionally, the following is required: ## Destroy -Refer to the [Getting Started Blueprint - Destroy](../01-getting-started/README.md#destroy) section. +To tear down and remove the resources created in the blueprint, complete the steps for [Amazon EKS Blueprints for Terraform - Destroy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#destroy). \ No newline at end of file diff --git a/blueprints/02-at-scale/outputs.tf b/blueprints/02-at-scale/outputs.tf index dcdc915..0452e98 100644 --- a/blueprints/02-at-scale/outputs.tf +++ b/blueprints/02-at-scale/outputs.tf @@ -1,110 +1,110 @@ output "kubeconfig_export" { - description = "Export KUBECONFIG environment variable to access to access the K8s API." + description = "Export the KUBECONFIG environment variable to access the Kubernetes API." value = "export KUBECONFIG=${local.kubeconfig_file_path}" } output "kubeconfig_add" { - description = "Add Kubeconfig to local configuration to access the K8s API." + description = "Add kubeconfig to your local configuration to access the Kubernetes API." value = "aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name}" } output "cbcd_helm" { - description = "Helm configuration for CloudBees CD Add-on. It is accesible only via state files." + description = "Helm configuration for the CloudBees CD/RO add-on. It is accessible via state files only." value = module.eks_blueprints_addon_cbcd.merged_helm_config sensitive = true } output "cbcd_namespace" { - description = "Namespace for CloudBees CD Add-on." + description = "Namespace for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_namespace } output "cbcd_url" { - description = "URL of the CloudBees CD Operations Center for CloudBees CD Add-on." + description = "URL of the CloudBees CD/RO server for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_url } output "cbcd_password" { - description = "command to get the admin password of Cloudbees CD" + description = "Retrieve the administrator password for CloudBees CD/RO." value = module.eks_blueprints_addon_cbcd.cbcd_password } output "rds_instance_id" { - description = "DB identifier for CloudBees CD Add-on." + description = "Database identifier for the CloudBees CD/RO add-on." value = local.rds_instance_id } output "rds_snapshot_id" { - description = "DB snapshot identifier for CloudBees CD Add-on." + description = "Database snapshot identifier for the CloudBees CD/RO add-on." value = local.rds_snapshot_id } output "rds_arn" { - description = "DB ARN for CloudBees CD Add-on." + description = "Database Amazon Resource Names (ARN) for the CloudBees CD/RO add-on." value = module.db.db_instance_arn } output "rds_backup_cmd" { - description = "command to do DB backup." + description = "Perform a database backup." value = "aws rds create-db-snapshot --db-instance-identifier ${local.rds_instance_id} --db-snapshot-identifier ${local.rds_snapshot_id}" } output "rds_restore_cmd" { - description = "command to do DB restore from snapshot." + description = "Perform a database restore from a snapshot." value = "aws rds restore-db-instance-from-db-snapshot --db-instance-identifier ${local.rds_instance_id} --db-snapshot-identifier ${local.rds_snapshot_id}" } output "acm_certificate_arn" { - description = "ACM certificate ARN" + description = "AWS Certificate Manager (ACM) certificate for ARN." value = module.acm.acm_certificate_arn } output "vpc_arn" { - description = "VPC ID" + description = "VPC ID." value = module.vpc.vpc_arn } output "eks_cluster_arn" { - description = "EKS cluster ARN" + description = "Amazon EKS cluster ARN." value = module.eks.cluster_arn } output "s3_cbcd_arn" { - description = "cbcd s3 Bucket Arn" + description = "CloudBees CD/RO Amazon S3 bucket ARN." value = module.cbcd_s3_bucket.s3_bucket_arn } output "s3_cbcd_name" { - description = "cbcd s3 Bucket Name. It is required by Velero for backup" + description = "CloudBees CD/RO Amazon S3 bucket name; it is required by Velero for the backup." value = local.bucket_name } output "efs_access_points" { - description = "EFS Access Points." + description = "Amazon EFS access points." value = "aws efs describe-access-points --file-system-id ${module.efs.id} --region ${local.region}" } output "cbcd_ing" { - description = "CD Ingress for the CloudBees CI add-on." + description = "CloudBees CD/RO Ingress for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_ing } output "cbcd_liveness_probe_int" { - description = "CD service internal liveness probe for the CloudBees CD add-on." + description = "CloudBees CD/RO service internal liveness probe for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_liveness_probe_int } output "velero_backup_schedule_team_cd" { - description = "Create velero backup schedulle for Team A, deleting existing one (if exists). It can be applied for other controllers using EBS." + description = "Creates a Velero backup schedule for Team CD; delete the existing backup if one already exists." value = "velero schedule delete ${local.velero_bk_demo} --confirm || true; velero create schedule ${local.velero_bk_demo} --schedule='@every 30m' --ttl 2h --include-namespaces ${module.eks_blueprints_addon_cbcd.cbcd_namespace} --exclude-resources events,events.events.k8s.io" } output "velero_backup_on_demand_team_cd" { - description = "Take an on-demand velero backup from the schedulle for Team CD. " + description = "Takes an on-demand Velero backup from the schedule for Team CD. " value = "velero backup create --from-schedule ${local.velero_bk_demo} --wait" } output "velero_restore_team_cd" { - description = "Restore Team A from backup. It can be applicable for rest of schedulle backups." + description = "Restores Team CD from a backup. It can be applicable to any subsequent scheduled backups." value = "kubectl delete all -n ${module.eks_blueprints_addon_cbcd.cbcd_namespace}; kubectl delete pvc -n ${module.eks_blueprints_addon_cbcd.cbcd_namespace}; kubectl delete ep -n ${module.eks_blueprints_addon_cbcd.cbcd_namespace}; velero restore create --from-schedule ${local.velero_bk_demo}" } diff --git a/blueprints/02-at-scale/variables.tf b/blueprints/02-at-scale/variables.tf index 1c5186e..0f93ddf 100644 --- a/blueprints/02-at-scale/variables.tf +++ b/blueprints/02-at-scale/variables.tf @@ -6,17 +6,17 @@ variable "tags" { } variable "host_name" { - description = "Host name. CloudBees CD Apps is configured to use this host name." + description = "Host name. CloudBees CD/RO applications are configured to use this host name." type = string } variable "hosted_zone" { - description = "Route 53 Hosted Zone. CloudBees CD is configured to use subdomains in this Hosted Zone." + description = "Amazon Route 53 hosted zone. CloudBees CD/RO is configured to use subdomains in this hosted zone." type = string } variable "suffix" { - description = "Unique suffix to be assigned to all resources" + description = "Unique suffix that is assigned to all resources." default = "" type = string validation { diff --git a/outputs.tf b/outputs.tf index 38bb1b3..a3852bf 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,41 +1,41 @@ # Copyright (c) CloudBees, Inc. output "merged_helm_config" { - description = "(merged) Helm Config for CloudBees CD" + description = "(merged) Helm configuration for CloudBees CD/RO." value = helm_release.cloudbees_cd } output "cbcd_namespace" { - description = "Namespace for CloudBees CD Addon." + description = "Namespace for the CloudBees CD/RO add-on." value = helm_release.cloudbees_cd.namespace } output "cbcd_url" { - description = "URL for CloudBees CD Add-on." + description = "URL for the CloudBees CD/RO add-on." value = "https://${var.host_name}" } output "cbcd_password" { - description = "Command to get the admin password of Cloudbees CD" + description = "Command to retrieve the admin password of CloudBees CD/RO." value = "kubectl get secret --namespace ${local.namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 -d; echo" } output "cbcd_domain_name" { - description = "Route 53 Domain Name to host CloudBees CD Services." + description = "Amazon Route 53 domain name to host CloudBees CD/RO Services." value = var.host_name } output "cbcd_flowserver_pod" { - description = "Flow Server Pod for CloudBees CD Add-on." + description = "Flow server pod for the CloudBees CD/RO add-on." value = "kubectl get pods -l app=flow-server -n ${helm_release.cloudbees_cd.namespace}" } output "cbcd_ing" { - description = "Ingress for the CloudBees CD add-on." + description = "Ingress for the CloudBees CD/RO add-on." value = "kubectl get ing -n ${helm_release.cloudbees_cd.namespace} flow-ingress" } output "cbcd_liveness_probe_int" { - description = "CD service internal liveness probe for the CloudBees CD add-on." + description = "CloudBees CD/RO service internal liveness probe for the CloudBees CD/RO add-on." value = "kubectl exec -n ${helm_release.cloudbees_cd.namespace} -ti $(kubectl get pods -l app=flow-server -n ${helm_release.cloudbees_cd.namespace} --output=jsonpath={.items..metadata.name}) --container flow-server -- /opt/cbflow/health-check > /dev/null" } diff --git a/variables.tf b/variables.tf index 1a15a75..33b80a8 100644 --- a/variables.tf +++ b/variables.tf @@ -1,7 +1,7 @@ # Copyright (c) CloudBees, Inc. variable "helm_config" { - description = "CloudBees CD Helm chart configuration" + description = "CloudBees CD/RO Helm chart configuration." type = any default = { values = [ @@ -12,7 +12,7 @@ variable "helm_config" { } variable "host_name" { - description = "Route53 Host name" + description = "Amazon Route 53 hosted zone name." type = string validation { condition = trim(var.host_name, " ") != "" @@ -21,17 +21,17 @@ variable "host_name" { } variable "cert_arn" { - description = "Certificate ARN from AWS ACM" + description = "AWS Certificate Manager (ACM) certificate for Amazon Resource Names (ARN)." type = string validation { condition = can(regex("^arn", var.cert_arn)) - error_message = "For the cert_arn should start with arn." + error_message = "The cert_arn should start with arn." } } variable "flow_db_secrets_file" { - description = "Secrets file yml path containing the secrets names:values to create the Kubernetes secret flow_db_secret." + description = "Secrets file a .yml path that contains the secrets names:values to create the Kubernetes secret flow_db_secret." default = "flow_db_secrets-values.yml" type = string } From 812302be9f9507525d2f09936aad2f9941f70630 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 11 Sep 2024 15:15:28 -0400 Subject: [PATCH 02/20] Minor edits --- CONTRIBUTING.md | 30 +++++++++++++++++++--- README.md | 2 +- blueprints/01-getting-started/variables.tf | 2 +- blueprints/02-at-scale/README.md | 25 ++++++++++-------- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1bd22f..3b5d574 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ This document provides guidelines for contributing to the CloudBees CD/RO add-on ## Dependencies -Validate your changes inside the blueprint-agent described in [.Dockerfile](blueprints/Dockerfile). It can be run `make dBuildAndRun`. +Validate your changes inside the blueprint agent, as described in [Dockerfile](blueprints/Dockerfile) For example, it can be used to run `make dBuildAndRun`. ## Report bugs and feature requests @@ -13,21 +13,43 @@ CloudBees welcomes you to use the GitHub issue tracker to report bugs or suggest When filing an issue: 1. Check existing open and recently closed [issues](https://github.com/cloudbees/terraform-aws-cloudbees-cd-eks-addon/issues) to ensure the issue has not already been reported. -2. Review the upstream repositories: +1. Review the upstream repositories: - [aws-ia/terraform-aws-eks-blueprints](https://github.com/aws-ia/terraform-aws-eks-blueprints/issues) - [aws-ia/terraform-aws-eks-blueprints-addons](https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/issues) -3. Try to include as much information as you can. Details like the following are incredibly useful: +1. Try to include as much information as you can. Details like the following are incredibly useful: - A reproducible test case or series of steps - The version of code being used - Any modifications you have made relevant to the bug - Anything unusual about your environment or deployment +## Contribute via pull requests + +Contributions via pull requests are appreciated. Before submitting a pull request, please ensure that you: + +1. Are working against the latest source on the `main` branch. +1. Check existing open, and recently merged, pull requests to make sure someone else has not already addressed the problem. +1. Open an issue to discuss any significant work; we do not want your time to be wasted. + +To submit a pull request: + +1. Fork the repository. +1. Create a feature branch based on the `main` branch. +1. Modify the source and focus on the specific change you are contributing. For example, if you reformat all the code, it is hard for reviewers to focus on your specific change. +1. **Ensure that local tests pass**. Local tests can be orchestrated via the companion [Makefile](Makefile). +1. Make commits to your fork using clear commit messages. +1. Submit a pull request against the `main` branch and answer any default questions in the pull request interface. +1. Pay attention to any automated failures reported in the pull request, and stay involved in the conversation. + +> [!IMPORTANT] +> If you make updates to embedded repository (e.g. CasC bundles), you must push the changes to the public upstream (repository/branch) before running `terraform apply` locally. The endpoint and/or branch can be updated via `set-casc-location` from the companion [Makefile](Makefile). + + ## Pre-commits: Linting, Formatting and Secrets Scanning Many of the files in the repository can be linted or formatted to maintain a standard of quality. Additionally, secret leaks are watched via [gitleaks](https://github.com/zricethezav/gitleaks#pre-commit) and [git-secrets](https://github.com/awslabs/git-secrets). 1. When working with the repository for the first time, you must install `pre-commit`. For more information, refer to [pre-commit installation](https://pre-commit.com/#installation). -2. Run `pre-commit run --all-files`. Run this command again if the automated checks fail when you create a pull request. +1. Run `pre-commit run --all-files`. Run this command again if the automated checks fail when you create a pull request. ## Release Drafter diff --git a/README.md b/README.md index 90f6b8c..c336a1a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The CloudBees CD/RO AWS add-on streamlines the adoption and experimentation of C - Providing a series of opinionated [blueprints](blueprints) that implement the CloudBees CD/RO add-on module for use with [Amazon EKS blueprints for Terraform](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) which are aligned with the [EKS Best Practices Guides](https://aws.github.io/aws-eks-best-practices/). ## CloudBees CD/RO license -You must have a valid license to operate the CloudBees CD/RO server. By default the product use the Server License type. For more information, refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses). +You must have a valid license to operate the CloudBees CD/RO server. By default, CloudBees CD/RO uses the Server License type. For more information, refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses). ## Usage diff --git a/blueprints/01-getting-started/variables.tf b/blueprints/01-getting-started/variables.tf index b97eabb..fac767c 100644 --- a/blueprints/01-getting-started/variables.tf +++ b/blueprints/01-getting-started/variables.tf @@ -16,7 +16,7 @@ variable "hosted_zone" { } variable "suffix" { - description = "Unique suffix to assign to all resources" + description = "Unique suffix to assign to all resources." default = "" type = string validation { diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index 62056d9..8b65e72 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -74,10 +74,10 @@ A license is required to use CloudBees CD/RO. Please refer to [CloudBees CD/RO L When preparing to deploy, you must complete the following steps: 1. Customize your Terraform values by copying `.auto.tfvars.example` to `.auto.tfvars`. -1. Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. -1. If using the Terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` must be updated. -1. Initialize the root module and any associated configuration for providers. -1. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). +2. Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. +3. If using the Terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` must be updated. +4. Initialize the root module and any associated configuration for providers. +5. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). For more information, refer to [The Core Terraform Workflow](https://www.terraform.io/intro/core-workflow) documentation. @@ -104,8 +104,8 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh terraform output cbcd_url ``` -1. To access CloudBees CD/RO, paste the output of the previous command into a web browser. -1. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: +2. To access CloudBees CD/RO, paste the output of the previous command into a web browser. +3. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: ```sh eval $(terraform output --raw cbcd_password) @@ -119,7 +119,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh eval $(terraform output -raw rds_backup_cmd) ``` -1. Issue the following command to restore the RDS instance from the snapshot: +2. Issue the following command to restore the RDS instance from the snapshot: ```sh eval $(terraform output -raw rds_restore_cmd) @@ -132,19 +132,19 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh eval $(terraform output --raw velero_backup_schedule_team_cd) ``` -1. Issue the following command to take an on-demand Velero backup for a specific point in time for `Team CD` based on the schedule definition: +2. Issue the following command to take an on-demand Velero backup for a specific point in time for `Team CD` based on the schedule definition: ```sh eval $(terraform output --raw velero_backup_on_demand_team_cd) ``` -1. Issue the following command to restore from the last backup: +3. Issue the following command to restore from the last backup: ```sh eval $(terraform output --raw velero_restore_team_cd) ``` -1. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC): +4. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC): ```sh eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path @@ -152,4 +152,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ## Destroy -To tear down and remove the resources created in the blueprint, complete the steps for [Amazon EKS Blueprints for Terraform - Destroy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#destroy). \ No newline at end of file +To tear down and remove the resources created in the blueprint, complete the steps for [Amazon EKS Blueprints for Terraform - Destroy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#destroy). + +> [!TIP] +> The `destroy` phase can be orchestrated via the companion [Makefile](../../Makefile). \ No newline at end of file From 19c24a749e11913d6c9acda2d199121d2c4b4784 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 11 Sep 2024 15:19:24 -0400 Subject: [PATCH 03/20] Commented out sections to hide them for now. --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b5d574..484026e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,7 @@ This document provides guidelines for contributing to the CloudBees CD/RO add-on Validate your changes inside the blueprint agent, as described in [Dockerfile](blueprints/Dockerfile) For example, it can be used to run `make dBuildAndRun`. + ## Pre-commits: Linting, Formatting and Secrets Scanning From 67486528e88760dfbbda15b78d4e950035542587 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 11 Sep 2024 15:21:00 -0400 Subject: [PATCH 04/20] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 484026e..5ec8561 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,18 +27,18 @@ When filing an issue: Contributions via pull requests are appreciated. Before submitting a pull request, please ensure that you: -1. Are working against the latest source on the `main` branch. +1. Are working against the latest source on the `develop` branch. 1. Check existing open, and recently merged, pull requests to make sure someone else has not already addressed the problem. 1. Open an issue to discuss any significant work; we do not want your time to be wasted. To submit a pull request: 1. Fork the repository. -1. Create a feature branch based on the `main` branch. +1. Create a feature branch based on the `develop` branch. 1. Modify the source and focus on the specific change you are contributing. For example, if you reformat all the code, it is hard for reviewers to focus on your specific change. 1. **Ensure that local tests pass**. Local tests can be orchestrated via the companion [Makefile](Makefile). 1. Make commits to your fork using clear commit messages. -1. Submit a pull request against the `main` branch and answer any default questions in the pull request interface. +1. Submit a pull request against the `develop` branch and answer any default questions in the pull request interface. 1. Pay attention to any automated failures reported in the pull request, and stay involved in the conversation. > [!IMPORTANT] From a320ba1c5340c5e608a653033775acb753c5fbd1 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 11 Sep 2024 16:39:19 -0400 Subject: [PATCH 05/20] Fixed some problems --- CONTRIBUTING.md | 2 +- README.md | 7 ++----- blueprints/01-getting-started/README.md | 3 +-- blueprints/01-getting-started/outputs.tf | 6 +++--- blueprints/02-at-scale/README.md | 9 +++------ blueprints/02-at-scale/outputs.tf | 10 +++++----- outputs.tf | 2 +- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ec8561..60c0058 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,4 +54,4 @@ Many of the files in the repository can be linted or formatted to maintain a sta ## Release Drafter -This repository uses [Release Drafter](https://github.com/release-drafter/release-drafter) thus it is recommended to use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) to ease labelling your pull request accordingly. \ No newline at end of file +This repository uses [Release Drafter](https://github.com/release-drafter/release-drafter). Therefore, it is recommended that you use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) to label your pull requests accordingly. \ No newline at end of file diff --git a/README.md b/README.md index c336a1a..30c1069 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The CloudBees CD/RO AWS add-on streamlines the adoption and experimentation of C - Providing a series of opinionated [blueprints](blueprints) that implement the CloudBees CD/RO add-on module for use with [Amazon EKS blueprints for Terraform](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/) which are aligned with the [EKS Best Practices Guides](https://aws.github.io/aws-eks-best-practices/). ## CloudBees CD/RO license -You must have a valid license to operate the CloudBees CD/RO server. By default, CloudBees CD/RO uses the Server License type. For more information, refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses). +You must have a valid license to operate the CloudBees CD/RO server. By default, CloudBees CD/RO uses the server license type. For more information, refer to [Licenses](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses). ## Usage @@ -35,9 +35,6 @@ module "eks_blueprints_addon_cbcd" { By default, it uses a minimum required configuration described in the Helm chart [values.yml](values.yml). If you need to override any default settings with the chart, you can do so by passing the `helm_config` variable. -> [!TIP] -> The blueprints lifecycle (`deploy` > `validate` > `destroy`) can be orchestrated via the companion [Makefile](Makefile). - ## Prerequisites ### Tooling @@ -53,7 +50,7 @@ Before getting started, you must export your required [AWS Environment Variables ### Existing AWS 53 hosted zone -These blueprints rely on an existing hosted zone in AWS Route 53. If you do not have a hosted zone, you can create one by following the [AWS Rout 53 documentation](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html). +These blueprints rely on an existing hosted zone in AWS Route 53. If you do not have a hosted zone, you can create one by following the [AWS Route 53 documentation](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html). ## Data storage options diff --git a/blueprints/01-getting-started/README.md b/blueprints/01-getting-started/README.md index 7cf0419..04f27ea 100644 --- a/blueprints/01-getting-started/README.md +++ b/blueprints/01-getting-started/README.md @@ -1,7 +1,6 @@ # CloudBees CD/RO blueprint add-on: Get started -Get started with the [CloudBees CD/RO on Kubernetes -](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/) by running this blueprint, which only installs the product and its [prerequisites](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/installation, to help you understand the minimum setup: +Get started with [CloudBees CD/RO in EKS](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/) by running this blueprint, which only installs the product and its [prerequisites](https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-k8s/installation), to help you understand the minimum setup: - Amazon Web Services (AWS) certificate manager - The following [Amazon EKS blueprints add-ons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/): diff --git a/blueprints/01-getting-started/outputs.tf b/blueprints/01-getting-started/outputs.tf index 30620eb..ce73a93 100644 --- a/blueprints/01-getting-started/outputs.tf +++ b/blueprints/01-getting-started/outputs.tf @@ -1,11 +1,11 @@ output "kubeconfig_export" { - description = "Export the KUBECONFIG environment variable to access the Kubernetes API." + description = "Exports the KUBECONFIG environment variable to access the Kubernetes API." value = "export KUBECONFIG=${local.kubeconfig_file_path}" } output "kubeconfig_add" { - description = "Add Kubeconfig to your local configuration to access the Kubernetes API." + description = "Adds Kubeconfig to your local configuration to access the Kubernetes API." value = "aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name}" } @@ -26,7 +26,7 @@ output "cbcd_url" { } output "cbcd_password" { - description = "Command to get the admin password for the CloudBees CD/RO add-on." + description = "Retrieves the admin password for the CloudBees CD/RO add-on." value = module.eks_blueprints_addon_cbcd.cbcd_password } diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index 8b65e72..74cf1e9 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -18,9 +18,6 @@ Once you have familiarized yourself with the [CloudBees CD/RO blueprint: Get sta > [!TIP] > A [resource group](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html) is also included, to get a full list of all resources created by this blueprint. -## CloudBees CD/RO license -A license is required to use CloudBees CD/RO. Please refer to [CloudBees CD/RO Licensing](https://docs.cloudbees.com/docs/cloudbees-cd/latest/set-up-cdro/licenses) for more information. - ## Architecture ![Architecture](img/at-scale.architect.drawio.svg) @@ -69,7 +66,7 @@ A license is required to use CloudBees CD/RO. Please refer to [CloudBees CD/RO L | vpc_arn | VPC ID | -~~## Deploy +## Deploy When preparing to deploy, you must complete the following steps: @@ -112,7 +109,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ``` ### Back up and restore -#### Back up and restore Database storage using Amazon Relational Database Service (Amazon RDS) +#### Back up and restore database storage using Amazon Relational Database Service (Amazon RDS) 1. Issue the following command to create a snapshot of the Amazon RDS instance: @@ -144,7 +141,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin eval $(terraform output --raw velero_restore_team_cd) ``` -4. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC): +4. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC: ```sh eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path diff --git a/blueprints/02-at-scale/outputs.tf b/blueprints/02-at-scale/outputs.tf index 0452e98..41125ee 100644 --- a/blueprints/02-at-scale/outputs.tf +++ b/blueprints/02-at-scale/outputs.tf @@ -1,9 +1,9 @@ output "kubeconfig_export" { - description = "Export the KUBECONFIG environment variable to access the Kubernetes API." + description = "Exports the KUBECONFIG environment variable to access the Kubernetes API." value = "export KUBECONFIG=${local.kubeconfig_file_path}" } -output "kubeconfig_add" { +output "kubeconfig_asdd" { description = "Add kubeconfig to your local configuration to access the Kubernetes API." value = "aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name}" } @@ -25,7 +25,7 @@ output "cbcd_url" { } output "cbcd_password" { - description = "Retrieve the administrator password for CloudBees CD/RO." + description = "Retrieves the administrator password for CloudBees CD/RO." value = module.eks_blueprints_addon_cbcd.cbcd_password } @@ -45,12 +45,12 @@ output "rds_arn" { } output "rds_backup_cmd" { - description = "Perform a database backup." + description = "Performs a database backup." value = "aws rds create-db-snapshot --db-instance-identifier ${local.rds_instance_id} --db-snapshot-identifier ${local.rds_snapshot_id}" } output "rds_restore_cmd" { - description = "Perform a database restore from a snapshot." + description = "Performs a database restore from a snapshot." value = "aws rds restore-db-instance-from-db-snapshot --db-instance-identifier ${local.rds_instance_id} --db-snapshot-identifier ${local.rds_snapshot_id}" } diff --git a/outputs.tf b/outputs.tf index a3852bf..c022c9a 100644 --- a/outputs.tf +++ b/outputs.tf @@ -16,7 +16,7 @@ output "cbcd_url" { } output "cbcd_password" { - description = "Command to retrieve the admin password of CloudBees CD/RO." + description = "Retrieves the admin password of CloudBees CD/RO." value = "kubectl get secret --namespace ${local.namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 -d; echo" } From dbec0d3b17c9fcfeca6ac191b0695e2c3ec72307 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 11 Sep 2024 16:43:33 -0400 Subject: [PATCH 06/20] Update variables.tf --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 33b80a8..705cfd0 100644 --- a/variables.tf +++ b/variables.tf @@ -31,7 +31,7 @@ variable "cert_arn" { } variable "flow_db_secrets_file" { - description = "Secrets file a .yml path that contains the secrets names:values to create the Kubernetes secret flow_db_secret." + description = "Secrets file .yml path that contains the secrets names:values to create the Kubernetes secret flow_db_secret." default = "flow_db_secrets-values.yml" type = string } From ca43e60be64dc63d76884aea759e0ade490668a0 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Thu, 12 Sep 2024 15:22:51 -0400 Subject: [PATCH 07/20] Update .gitignore --- .gitignore | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f37da2b..9d9624e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,8 +23,8 @@ crash.*.log .idea # Exclude all .tfvars files, which are likely to contain sensitive data, such as -# password, private keys, and other secrets. These should not be part of version -# control as they are data points which are potentially sensitive and subject +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject # to change depending on the environment. *.tfvars *.tfvars.json @@ -51,4 +51,10 @@ terraform.rc #Ignore kubeconfig files kubeconfig_*.yaml -blueprints/02-at-scale/k8s/flow_db_secrets-values.yml \ No newline at end of file +blueprints/02-at-scale/k8s/flow_db_secrets-values.yml + +#Ignore auto-generated files and directories +.vscode +*.bkp +*.dtmp +*.save \ No newline at end of file From 7de70cb92aa5ab6938c4a53ee1356657bb8657e4 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Thu, 12 Sep 2024 15:23:10 -0400 Subject: [PATCH 08/20] Minor edits to the getting started diagrams --- .../img/getting-started.architect.drawio.svg | 384 +------ .../img/getting-started.k8s.drawio.svg | 962 +----------------- 2 files changed, 8 insertions(+), 1338 deletions(-) diff --git a/blueprints/01-getting-started/img/getting-started.architect.drawio.svg b/blueprints/01-getting-started/img/getting-started.architect.drawio.svg index 27c1f84..9ed1b74 100644 --- a/blueprints/01-getting-started/img/getting-started.architect.drawio.svg +++ b/blueprints/01-getting-started/img/getting-started.architect.drawio.svg @@ -1,380 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - -
-
-
- AWS Cloud -
-
-
-
- - AWS Cloud - -
-
- - - - - -
-
-
- - Custom VPC - -
-
-
-
- - Custom VPC - -
-
- - - - - -
-
-
- Availability Zone 1 -
-
-
-
- - Availability Zone 1 - -
-
- - - - - -
-
-
- Internet -
- Gateway -
-
-
-
- - Internet... - -
-
- - - - - -
-
-
- Route 53 -
- Hosted Zone -
-
-
-
- - Route 53... - -
-
- - - - - -
-
-
- Region -
-
-
-
- - Region - -
-
- - - - - -
-
-
- - EBS -
- gp3 -
-
-
-
-
-
- - EBS... - -
-
- - - - - -
-
-
- Certificate -
- Manager -
-
-
-
- - Certificat... - -
-
- - - - - -
-
-
- Application Load -
- Balancing (ALB) -
-
-
-
- - Application L... - -
-
- - - - - -
-
-
- K8s Cluster -
- EKS -
-
-
-
- - K8s Cluster... - -
-
- - - - - -
-
-
- Public subnet -
-
-
-
- - Public subnet - -
-
- - - - - -
-
-
- NAT -
- Gateway -
-
-
-
- - NAT... - -
-
- - - - - -
-
-
- Private Subnet -
-
-
-
- - Private Subnet - -
-
- - - - - - - -
-
-
- Availability Zone 2 -
-
-
-
- - Availability Zone 2 - -
-
- - - - - -
-
-
- - EBS -
- gp3 -
-
-
-
-
-
- - EBS... - -
-
- - - - - -
-
-
- Public subnet -
-
-
-
- - Public subnet - -
-
- - - - - -
-
-
- NAT -
- Gateway -
-
-
-
- - NAT... - -
-
- - - - - -
-
-
- Private Subnet -
-
-
-
- - Private Subnet - -
-
- - -
- - - - - Text is not SVG - cannot display - - - -
+ + + +
AWS Cloud
AWS Cloud
Custom VPC
Custom VPC
Availability zone 1
Availability zone 1
Amazon Route 53
hosted zone
Amazon Rou...
Region
Region
Amazon EBS
gp2
Amazon EB...
AWS certificate
manager
AWS certif...
Application load 
balancer (ALB)
Application l...
Kubernetes cluster
on AWS EKS
Kubernetes cl...
Public subnet
Public subnet
NAT
Gateway
NAT...
Private subnet
Private subnet
Availability zone 2
Availability zone 2
Amazon EBS
gp2
Amazon EB...
Public subnet
Public subnet
NAT
Gateway
NAT...
Private subnet
Private subnet
Internet gateway
Internet...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg b/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg index 85bf9d2..00f0a44 100644 --- a/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg +++ b/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg @@ -1,958 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - AWS Cloud - - - - - - AWS Cloud - - - - - - - - - - - - - - K8s Cluster - - - - - - EKS - - - - - K8s Cluster... - - - - - - - - - - - - - EBS CSI Driver - - - - - - EBS CSI Dri... - - - - - - - - - - - - - external-dns - - - - - - external-dns - - - - - - - - - - - - - AWS Load Balancer - - - - - - - AWS Load Ba... - - - - - - - - - - - Route 53 - - - - - - Hosted Zone - - - - - Route 53... - - - - - - - - - - - - - - Application Load - - - - - - Balancing (ALB) - - - - - Applicatio... - - - - - - - - - - - - EBS - - - - - - - EBS - - - - - - - - - - - kube-system - - - - - - kube-system - - - - - - - - - - - - - - - cbcd - - - - - - cbcd - - - - - - - - - - - - Flow Repository - - - - - - Flow Repository - - - - - - - - - - - Flow Agents - - - - - - Flow Agents - - - - - - - - - - - - - - Flow Server - - - - - - Flow Server - - - - - - - - - - Devops Insight - - - - - - Devops Insight - - - - - - - - - - - Flow Web - - - - - - Flow Web - - - - - - - - Text is not SVG - cannot display - - - - + + + +
AWS Cloud
AWS Cloud
Kubernetes cluster
on Amazon EKS
Kubernetes...
Amazon EBS 
CSI driver
Amazon EBS...
AWS Load Balancer
AWS Load Ba...
Amazon Route 53
hosted zone
Amazon Route...
Application Load 
Balancing (ALB)
Applicatio...
Amazon EBS
Amazon E...
kube-system
kube-system
CloudBees CD/RO
CloudBees CD/RO
external-dns
external-dns
Text is not SVG - cannot display
\ No newline at end of file From c33805c387966fcd36b9faa64f1902e42106081a Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 09:52:11 -0400 Subject: [PATCH 09/20] Update at-scale.architect.drawio.svg --- .../img/at-scale.architect.drawio.svg | 2855 +++++------------ 1 file changed, 783 insertions(+), 2072 deletions(-) diff --git a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg index 6a99968..3074234 100644 --- a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg +++ b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg @@ -1,2110 +1,821 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
AWS Cloud - - - - - AWS Cloud - - - - - - - - - - +
+
+
+
+ + AWS Cloud + +
+
+ + + + + +
+
+
us-east-1c - - - - - us-east-1c - - - - - - - - - - +
+
+
+
+ + us-east-1c + +
+
+ + + + + +
+
+
us-east-1a - - - - - us-east-1a - - - - - - - - - - +
+
+
+
+ + us-east-1a + +
+
+ + + + + +
+
+
Region - - - - - Region - - - - - - - - - - +
+
+
+
+ + Region + +
+
+ + + + + +
+
+
Private Subnet - - - - - Private Subnet - - - - - - - - - - +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
us-east-1b - - - - - us-east-1b - - - - - - - - - - +
+
+
+
+ + us-east-1b + +
+
+ + + + + +
+
+
Private Subnet - - - - - Private Subnet - - - - - - - - - - +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
Private Subnet - - - - - Private Subnet - - - - - - - - - - - +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
+ CBCI Agents +
+
+
+
+ + CBCI Agen... + +
+
+ + + + + +
+
+
+ Custom VPC - - - - - - Custom VPC - - - - - - - - - - - Internet - - - - - - - - - Gateway - - - - - Internet... - - - - - - - - - - + +
+
+
+
+ + Custom VPC + +
+
+ + + + + +
+
+
Route 53 - - - - - - - - +
Hosted Zone - - - - - Route 53... - - - - - - - - - - - +
+
+
+
+ + Route 53... + +
+
+ + + + + +
+
+
+ EBS - - - - - - - - +
gp3 - - - - - - - EBS... - - - - - - - - - - +
+
+
+
+
+
+ + EBS... + +
+
+ + + + + +
+
+
Certificate - - - - - - - - +
Manager - - - - - Certificat... - - - - - - - - - - +
+
+
+
+ + Certificat... + +
+
+ + + + + +
+
+
Application Load - - - - - - - - +
Balancing (ALB) - - - - - Applicatio... - - - - - - - - - - +
+
+
+
+ + Applicatio... + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
K8s Cluster - - - - - - - - +
EKS - - - - - K8s Cluster... - - - - - - - - - - +
+
+
+
+ + K8s Cluster... + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
EFS - - - - - EFS - - - - - - - - - - - Kubernetes Applications - - - - - Kubernetes Applications - - - - - - - - - - +
+
+
+
+ + EFS + +
+
+ + + + + +
+
+
+ CBCI SPOT +
+ Agents +
+
+
+
+ + CBCI SPOT... + +
+
+ + + + + +
+
+
+ CBCI SPOT +
+ Agents +
+
+
+
+ + CBCI SPOT... + +
+
+ + + + + +
+
+
Autoscaling - - - - - - - - +
Group - - - - - Autoscal... - - - - - - - - - - - - +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + + + +
+
+
+ K8s Apps +
+
+
+
+ + K8s Apps + +
+
+ + + + + +
+
+
+ CBCI Apps +
+
+
+
+ + CBCI Apps + +
+
+ + + + + +
+
+
+ CBCI Agents +
+
+
+
+ + CBCI Agen... + +
+
+ + + + + +
+
+
+ CBCI SPOT +
+ Agents +
+
+
+
+ + CBCI SPOT... + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ CBCI Apps +
+
+
+
+ + CBCI Apps + +
+
+ + + + + +
+
+
+ CBCI Apps +
+
+
+
+ + CBCI Apps + +
+
+ + + + + + + +
+
+
+ CBCI Agents +
+
+
+
+ + CBCI Agen... + +
+
+ + + + + +
+
+
+ EBS - - - - - - - - +
gp3 - - - - - - - EBS... - - - - - - - - - - - +
+
+
+
+
+
+ + EBS... + +
+
+ + + + + +
+
+
+ EBS - - - - - - - - +
gp3 - - - - - - - EBS... - - - - - - - - - - +
+
+
+
+
+
+ + EBS... + +
+
+ + + + + +
+
+
s3 - - - - - s3 - - - - - - - - - - - - Kubernetes Applications - - - - - Kubernetes Applications - - - - - - - - - - - Kubernetes Applications - - - - - Kubernetes Applications - - - - - - - - - - - Cloudbees CD Applications - - - - - Cloudbees CD Applications - - - - - - - - - - - Autoscaling - - - - - - - - - Group - - - - - Autoscal... - - - - - - - - - - - - Cloudbees CD Applications - - - - - Cloudbees CD Applications - - - - - - - - - - - Cloudbees CD Applications - - - - - Cloudbees CD Applications - - - - - - - - - - - Cloudbees CD Agents - - - - - Cloudbees CD Agents - - - - - - - - - - - Autoscaling - - - - - - - - - Group - - - - - Autoscal... - - - - - - - - - - - - Cloudbees CD Agents - - - - - Cloudbees CD Agents - - - - - - - - - - - Cloudbees CD Agents - - - - - Cloudbees CD Agents - - - - - - - - rds - - - - - RDS - - - - - - - - - - - - - +
+
+
+ + + s3 + + + + + + + + +
+
+
+ + Instance +
+ Profile +
+
+
+
+
+ + Instance... + +
+
+ + + + + +
+
+
+ K8s Apps +
+
+
+
+ + K8s Apps + +
+
+ + + + + +
+
+
+ K8s Apps +
+
+
+
+ + K8s Apps + +
+
+ + + +
+ Text is not SVG - cannot display - -
-
+ + + \ No newline at end of file From 178c4a89c36790a5d0d2e62740fac378d04b8a33 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 12:58:18 -0400 Subject: [PATCH 10/20] Update at-scale.architect.drawio.svg --- .../img/at-scale.architect.drawio.svg | 535 +++++++++--------- 1 file changed, 257 insertions(+), 278 deletions(-) diff --git a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg index 3074234..8499d3c 100644 --- a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg +++ b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg @@ -1,4 +1,4 @@ - + @@ -18,12 +18,12 @@ - - + + -
+
AWS Cloud @@ -31,107 +31,111 @@
- + AWS Cloud - - + + -
+
- us-east-1c + us-east-1a
- - us-east-1c + + us-east-1a - - + + -
+
- us-east-1a +
+ + us-east-1b + +
- - us-east-1a + + us-east-1b - - + + -
-
-
- Region +
+
+
+ us-east-1c
- - Region + + us-east-1c - - + + -
+
- Private Subnet + Region
- - Private Subnet + + Region - - + + -
-
-
- us-east-1b +
+
+
+ Private Subnet
- - us-east-1b + + Private Subnet - - + + -
+
Private Subnet @@ -139,17 +143,17 @@
- + Private Subnet - - + + -
+
Private Subnet @@ -157,35 +161,37 @@
- + Private Subnet - - + + -
+
- CBCI Agents + CloudBees CD/RO +
+ agents
- - CBCI Agen... + + CloudBees... - - + + -
+
@@ -195,37 +201,37 @@
- + Custom VPC - - + + -
+
- Route 53 + Amazon Route 53
- Hosted Zone + hosted zone
- - Route 53... + + Amazon Rou... - - + + -
+
@@ -238,37 +244,37 @@
- + EBS... - - + + -
+
- Certificate + AWS certificate
- Manager + manager
- - Certificat... + + AWS certif... - - + + -
+
Application Load @@ -278,17 +284,17 @@
- + Applicatio... - - + + -
+
Public subnet @@ -296,17 +302,17 @@
- + Public subnet - - + + -
+
NAT @@ -316,17 +322,17 @@
- + NAT... - - + + -
+
K8s Cluster @@ -336,17 +342,17 @@
- + K8s Cluster... - - + + -
+
Public subnet @@ -354,17 +360,17 @@
- + Public subnet - - + + -
+
NAT @@ -374,17 +380,17 @@
- + NAT... - - + + -
+
Public subnet @@ -392,17 +398,17 @@
- + Public subnet - - + + -
+
NAT @@ -412,17 +418,17 @@
- + NAT... - - + + -
+
EFS @@ -430,57 +436,17 @@
- + EFS - - - - - -
-
-
- CBCI SPOT -
- Agents -
-
-
-
- - CBCI SPOT... - -
-
- - - - - -
-
-
- CBCI SPOT -
- Agents -
-
-
-
- - CBCI SPOT... - -
-
- - + + -
+
Autoscaling @@ -490,113 +456,77 @@
- + Autoscal... - - + + -
+
- Autoscaling + Kubernetes
- Group + applications
- - Autoscal... + + Kubernete... - - - - + + -
+
- K8s Apps + CloudBees CD/RO +
+ applications
- - K8s Apps + + CloudBees... - - + + -
+
- CBCI Apps -
-
-
- - - CBCI Apps - - - - - - - - -
-
-
- CBCI Agents -
-
-
-
- - CBCI Agen... - -
-
- - - - - -
-
-
- CBCI SPOT + CloudBees CD/RO
- Agents + agents
- - CBCI SPOT... + + CloudBees...
- - + + -
+
Autoscaling @@ -606,17 +536,17 @@
- + Autoscal... - - + + -
+
Autoscaling @@ -626,73 +556,77 @@
- + Autoscal... - - + + -
+
- CBCI Apps + CloudBees CD/RO +
+ applications
- - CBCI Apps + + CloudBees... - - + + -
+
- CBCI Apps + CloudBees CD/RO +
+ applications
- - CBCI Apps + + CloudBees... - - - - + + -
+
- CBCI Agents + CloudBees CD/RO +
+ agents
- - CBCI Agen... + + CloudBees... - - + + -
+
@@ -705,17 +639,17 @@
- + EBS... - - + + -
+
@@ -728,84 +662,129 @@
- + EBS... - - + + -
+
- s3 + Amazon S3 bucket
- - s3 + + Amazon S3... - - + + -
+
- - Instance -
- Profile -
+ Kubernetes +
+ applications
- - Instance... + + Kubernete... - - + + -
+
- K8s Apps + Kubernetes +
+ applications
- - K8s Apps + + Kubernete... - - + + + + -
+
+
+
+ RDS +
+
+
+ + + RDS + + + + + + + + + + + + +
+
+
+ + Internet gateway + +
+
+
+
+ + Internet... + +
+
+ + + + +
-
- K8s Apps +
+ Instance +
+ profile
- - K8s Apps + + Instance... From 690bec15b95887db377d0ee7cd4adb433f1c2e64 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 15:08:17 -0400 Subject: [PATCH 11/20] Recreated SVG --- .../img/getting-started.k8s.drawio.svg | 350 +++++++++++++++++- 1 file changed, 346 insertions(+), 4 deletions(-) diff --git a/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg b/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg index 00f0a44..b367c7e 100644 --- a/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg +++ b/blueprints/01-getting-started/img/getting-started.k8s.drawio.svg @@ -1,4 +1,346 @@ - - - -
AWS Cloud
AWS Cloud
Kubernetes cluster
on Amazon EKS
Kubernetes...
Amazon EBS 
CSI driver
Amazon EBS...
AWS Load Balancer
AWS Load Ba...
Amazon Route 53
hosted zone
Amazon Route...
Application Load 
Balancing (ALB)
Applicatio...
Amazon EBS
Amazon E...
kube-system
kube-system
CloudBees CD/RO
CloudBees CD/RO
external-dns
external-dns
Text is not SVG - cannot display
\ No newline at end of file + + + + + + + + + + + + + + + + + +
+
+
+ + AWS Cloud + +
+
+
+
+ + AWS Cloud + +
+
+ + + + + + + + +
+
+
+ Kubernetes cluster +
+ on Amazon EKS +
+
+
+
+ + Kubernetes... + +
+
+ + + + + + +
+
+
+ + Amazon EBS + +
+ + CSI driver + +
+
+
+
+
+ + Amazon EBS... + +
+
+ + + + + + +
+
+
+ + AWS Load Balancer +
+
+
+
+
+
+ + AWS Load Ba... + +
+
+ + + + + +
+
+
+ Amazon Route 53 +
+ hosted zone +
+
+
+
+ + Amazon Route... + +
+
+ + + + + + + + +
+
+
+ Application Load +
+ Balancing (ALB) +
+
+
+
+ + Applicatio... + +
+
+ + + + + +
+
+
+ + Amazon EBS +
+
+
+
+
+
+ + Amazon E... + +
+
+ + + + +
+
+
+ + kube-system + +
+
+
+
+ + kube-system + +
+
+ + + + + + + + +
+
+
+ + external-dns + +
+
+
+
+ + external-dns + +
+
+ + + + + +
+
+
+ + CloudBees CD/RO + +
+
+
+
+ + CloudBees CD/RO + +
+
+ + + + + + + + +
+
+
+ CloudBees Analytics +
+ server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ agents +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ web server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ repository +
+
+
+
+ + CloudBees... + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file From e53791cb54bc6f90f6b1d15a919aaf830439c36e Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 15:08:43 -0400 Subject: [PATCH 12/20] Recreated SVGs --- .../img/at-scale.architect.drawio.svg | 6 +- .../02-at-scale/img/at-scale.k8s.drawio.svg | 1663 ++++++----------- 2 files changed, 536 insertions(+), 1133 deletions(-) diff --git a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg index 8499d3c..3d553a6 100644 --- a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg +++ b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg @@ -1,4 +1,4 @@ - + @@ -26,7 +26,9 @@
- AWS Cloud + + AWS Cloud +
diff --git a/blueprints/02-at-scale/img/at-scale.k8s.drawio.svg b/blueprints/02-at-scale/img/at-scale.k8s.drawio.svg index d7525c2..6897966 100644 --- a/blueprints/02-at-scale/img/at-scale.k8s.drawio.svg +++ b/blueprints/02-at-scale/img/at-scale.k8s.drawio.svg @@ -1,1140 +1,541 @@ - - - AWS Cloud - - AWS Cloud - - K8s Cluster - - - - EKS - - K8s Cluster... - - Flow Repository - Flow Repository - Flow Agents - Flow Agents - cbcd - -cbcd + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + Kubernetes cluster + +
+ on Amazon EKS +
+
+
+
+
+ + Kubernetes... + +
+
+ + + + + +
+
+
+ velero - + +
+
+
+
+ velero -
+ + + + + + + + + +
+
+
+ /velero - + +
+
+
+
+ /velero -
- s3 - - s3 - - rds - RDS - Metric Servers - - Metric Serv... - - EBS CSI Driver - - EBS CSI Dri... - - Devops Insight - Devops Insight - Flow Server - Flow Server - Zoo Keeper - Zoo Keeper - EBS CSI Driver - - EBS CSI Dri... - - external-dns - - external-dns - + + + + + + + + +
+
+
+ Amazon S3 +
+ bucket +
+
+
+
+ + Amazon S3... + +
+
+ + + + + + +
+
+
+ + Metric servers +
+
+
+
+
+
+ + Metric serv... + +
+
+ + + + + + +
+
+
+ Amazon EFS +
+ CSI driver +
+
+
+
+ + Amazon EFS... + +
+
+ + + + + + +
+
+
+ Amazon EBS +
+ CSI driver +
+
+
+
+ + Amazon EBS... + +
+
+ + + + + + +
+
+
+ Autoscaler - Autoscaler - AWS Load Balancer - AWS Load Ba... - Route 53 - - - - Hosted Zone - - Route 53... - - Application Load - - - - Balancing (ALB) - Applicatio... +
+
+
+
+
+
+ + Autoscaler + +
+
+ + + + + + +
+
+
+ AWS load +
+ balancer + +
+
+
+
+
+
+ + AWS load... + +
+
+ + + + + +
+
+
+ Amazon Route 53 +
+ hosted zone +
+
+
+
+ + Amazon Rout... + +
+
+ + + + + + + + +
+
+
+ Application load +
+ balancing (ALB) +
+
+
+
+ + Applicatio... + +
+
+ + + + + +
+
+
Autoscaling - - - - Group - Autoscal... - EFS - - EFS - - EBS - - EBS - +
+ group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Amazon EFS +
+
+
+
+ + Amazon EFS + +
+
+ + + + + +
+
+
+ + Amazon EBS +
+
+
+
+
+
+ + Amazon E... + +
+
+ + + + + + + + + + + + + + + +
+
+
+ RDS +
+
+
+
+ + RDS + +
+
+ + + + +
+
+
+ kube-system - + +
+
+
+
+ kube-system -
- Flow Web - Flow Web + + + + + + +
+
+
+ + external-dns + +
+
+
+
+ + external-dns + +
+
+ + + + + + + + + + + + + + + +
+
+
+ CloudBees Analytics +
+ server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ agents +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ Zookeeper +
+
+
+
+ + Zookeeper + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ web server +
+
+
+
+ + CloudBees... + +
+
+ + + + + + +
+
+
+ CloudBees CD/RO +
+ repository +
+
+
+
+ + CloudBees... + +
+
+ + + +
+
+
+ + CloudBees CD/RO + +
+
+
+
+ + CloudBees CD/RO + +
+
+ + + +
+ Text is not SVG - cannot display - + + + + \ No newline at end of file From a766491f491aad885af53d2053277a8c158087e7 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 15:09:05 -0400 Subject: [PATCH 13/20] Copy edits --- CONTRIBUTING.md | 2 -- blueprints/02-at-scale/README.md | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60c0058..9e68edb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,6 @@ This document provides guidelines for contributing to the CloudBees CD/RO add-on Validate your changes inside the blueprint agent, as described in [Dockerfile](blueprints/Dockerfile) For example, it can be used to run `make dBuildAndRun`. - ## Pre-commits: Linting, Formatting and Secrets Scanning diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index 74cf1e9..1791ae4 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -71,10 +71,10 @@ Once you have familiarized yourself with the [CloudBees CD/RO blueprint: Get sta When preparing to deploy, you must complete the following steps: 1. Customize your Terraform values by copying `.auto.tfvars.example` to `.auto.tfvars`. -2. Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. -3. If using the Terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` must be updated. -4. Initialize the root module and any associated configuration for providers. -5. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). +1. Customize your secrets file by copying `flow_db_secrets-values.yml.example` to `flow_db_secrets-values.yml`. +1. If using the Terraform variable `suffix` for this blueprint, the Amazon `S3 Bucket Access settings` > `S3 Bucket Name` must be updated. +1. Initialize the root module and any associated configuration for providers. +1. Create the resources and deploy CloudBees CD/RO to an EKS cluster. Refer to [Amazon EKS Blueprints for Terraform - Deploy](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#deploy). For more information, refer to [The Core Terraform Workflow](https://www.terraform.io/intro/core-workflow) documentation. @@ -101,8 +101,8 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh terraform output cbcd_url ``` -2. To access CloudBees CD/RO, paste the output of the previous command into a web browser. -3. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: +1. To access CloudBees CD/RO, paste the output of the previous command into a web browser. +1. Issue the following command to retrieve the initial administrative user password to sign in to CloudBees CD/RO: ```sh eval $(terraform output --raw cbcd_password) @@ -116,7 +116,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh eval $(terraform output -raw rds_backup_cmd) ``` -2. Issue the following command to restore the RDS instance from the snapshot: +1. Issue the following command to restore the RDS instance from the snapshot: ```sh eval $(terraform output -raw rds_restore_cmd) @@ -129,23 +129,23 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh eval $(terraform output --raw velero_backup_schedule_team_cd) ``` -2. Issue the following command to take an on-demand Velero backup for a specific point in time for `Team CD` based on the schedule definition: +1. Issue the following command to take an on-demand Velero backup for a specific point in time for `Team CD` based on the schedule definition: ```sh eval $(terraform output --raw velero_backup_on_demand_team_cd) ``` -3. Issue the following command to restore from the last backup: +1. Issue the following command to restore from the last backup: ```sh eval $(terraform output --raw velero_restore_team_cd) ``` -4. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC: + 1. Issue the following command to restore from an Amazon EFS access point, that matches the CloudBees CD/RO PVC: - ```sh - eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path - ``` + ```sh + eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path + ``` ## Destroy From 144b74b3a413230017bcad80ba6d8724e3e7ae74 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 16:52:10 -0400 Subject: [PATCH 14/20] Update at-scale.architect.drawio.svg --- .../img/at-scale.architect.drawio.svg | 669 +++++++++--------- 1 file changed, 327 insertions(+), 342 deletions(-) diff --git a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg index 3d553a6..c652f12 100644 --- a/blueprints/02-at-scale/img/at-scale.architect.drawio.svg +++ b/blueprints/02-at-scale/img/at-scale.architect.drawio.svg @@ -1,4 +1,4 @@ - + @@ -18,12 +18,12 @@ - - + + -
+
@@ -33,270 +33,294 @@
- + AWS Cloud - - + + -
-
-
- us-east-1a +
+
+
+ Region
- - us-east-1a + + Region - - + + -
-
-
-
- - us-east-1b - -
+
+
+
+ + Custom VPC +
- - us-east-1b + + Custom VPC - - + + -
-
-
- us-east-1c +
+
+
+ Amazon Route 53 +
+ hosted zone
- - us-east-1c + + Amazon Rou... - - + + -
-
-
- Region +
+
+
+ AWS certificate +
+ manager
- - Region + + AWS certif... - - + + -
-
-
- Private Subnet +
+
+
+ Application Load +
+ Balancing (ALB)
- - Private Subnet + + Applicatio... - - + + -
-
-
- Private Subnet +
+
+
+ K8s Cluster +
+ EKS
- - Private Subnet + + K8s Cluster... - - + + -
-
-
- Private Subnet +
+
+
+ EFS
- - Private Subnet + + EFS - - + + -
+
- CloudBees CD/RO -
- agents + Autoscaling +
+ Group
- - CloudBees... + + Autoscal... - - + + -
-
-
- - Custom VPC - +
+
+
+ Autoscaling +
+ Group
- - Custom VPC + + Autoscal... - - + + -
+
- Amazon Route 53 + Autoscaling
- hosted zone + Group
- - Amazon Rou... + + Autoscal... + + + + + + + + +
+
+
+ Amazon S3 bucket +
+
+
+
+ + Amazon S3...
- - + + + + -
+
- - EBS -
- gp3 -
-
+ RDS
- - EBS... + + RDS - - + + + -
-
-
- AWS certificate -
- manager +
+
+
+ + Internet gateway +
- - AWS certif... + + Internet... - - + + -
-
-
- Application Load -
- Balancing (ALB) +
+
+
+
+ + us-east-1b + +
- - Applicatio... + + us-east-1b - - + + -
+
Public subnet @@ -304,17 +328,17 @@
- + Public subnet - - + + -
+
NAT @@ -324,75 +348,81 @@
- + NAT... - - + + -
-
-
- K8s Cluster -
- EKS +
+
+
+ + EBS +
+ gp3 +
+
- - K8s Cluster... + + EBS... - - + + -
-
-
- Public subnet +
+
+
+ us-east-1a
- - Public subnet + + us-east-1a - - + + -
-
-
- NAT -
- Gateway +
+
+
+ + EBS +
+ gp3 +
+
- - NAT... + + EBS... - - + + -
+
Public subnet @@ -400,17 +430,17 @@
- + Public subnet - - + + -
+
NAT @@ -420,195 +450,196 @@
- + NAT... - - + + -
-
-
- EFS +
+
+
+
+ + us-east-1c + +
- - EFS + + us-east-1c - - + + -
-
-
- Autoscaling -
- Group +
+
+
+ Public subnet
- - Autoscal... + + Public subnet - - + + -
+
- Kubernetes + NAT
- applications + Gateway
- - Kubernete... + + NAT... - - + + -
-
-
- CloudBees CD/RO -
- applications +
+
+
+ + EBS +
+ gp3 +
+
- - CloudBees... + + EBS... - - + + -
-
-
- CloudBees CD/RO -
- agents +
+
+
+ Private Subnet
- - CloudBees... + + Private Subnet - - + + -
+
- Autoscaling + Kubernetes
- Group + applications
- - Autoscal... + + Kubernete... - - + + -
+
- Autoscaling -
- Group + CloudBees CD/RO +
+ applications
- - Autoscal... + + CloudBees... - - + + -
+
CloudBees CD/RO
- applications + agents
- + CloudBees... - - + + -
-
-
- CloudBees CD/RO -
- applications +
+
+
+ Private Subnet
- - CloudBees... + + Private Subnet - - + + -
+
CloudBees CD/RO @@ -618,81 +649,37 @@
- + CloudBees... - - - - - -
-
-
- - EBS -
- gp3 -
-
-
-
-
-
- - EBS... - -
-
- - - - - -
-
-
- - EBS -
- gp3 -
-
-
-
-
-
- - EBS... - -
-
- - + + -
+
- Amazon S3 bucket + CloudBees CD/RO +
+ applications
- - Amazon S3... + + CloudBees... - - + + -
+
Kubernetes @@ -702,94 +689,92 @@
- + Kubernete... - - + + -
-
-
- Kubernetes -
- applications +
+
+
+ Private Subnet
- - Kubernete... + + Private Subnet - - - - + + -
-
-
- RDS +
+
+
+ CloudBees CD/RO +
+ applications
- - RDS + + CloudBees... - - - - - - + + -
-
-
- - Internet gateway - +
+
+
+ CloudBees CD/RO +
+ agents
- - Internet... + + CloudBees... - + + -
+
-
- Instance -
- profile +
+ Kubernetes +
+ applications
- - Instance... + + Kubernete... + + + From 1dadeef5d2dd7f4ebfa02197fd2aded4bfaf433a Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 17:01:33 -0400 Subject: [PATCH 15/20] Update CONTRIBUTING.md --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e68edb..8f16e84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ This document provides guidelines for contributing to the CloudBees CD/RO add-on ## Dependencies -Validate your changes inside the blueprint agent, as described in [Dockerfile](blueprints/Dockerfile) For example, it can be used to run `make dBuildAndRun`. +Validate your changes inside the blueprint agent, as described in [Dockerfile](blueprints/Dockerfile). For example, it can be used to run `make dBuildAndRun`. ## Report bugs and feature requests @@ -26,22 +26,22 @@ When filing an issue: Contributions via pull requests are appreciated. Before submitting a pull request, please ensure that you: -1. Are working against the latest source on the `develop` branch. +1. Are working against the latest source on the `main` branch. 1. Check existing open, and recently merged, pull requests to make sure someone else has not already addressed the problem. 1. Open an issue to discuss any significant work; we do not want your time to be wasted. To submit a pull request: 1. Fork the repository. -1. Create a feature branch based on the `develop` branch. +1. Create a feature branch based on the `main` branch. 1. Modify the source and focus on the specific change you are contributing. For example, if you reformat all the code, it is hard for reviewers to focus on your specific change. 1. **Ensure that local tests pass**. Local tests can be orchestrated via the companion [Makefile](Makefile). 1. Make commits to your fork using clear commit messages. -1. Submit a pull request against the `develop` branch and answer any default questions in the pull request interface. +1. Submit a pull request against the `main` branch and answer any default questions in the pull request interface. 1. Pay attention to any automated failures reported in the pull request, and stay involved in the conversation. > [!IMPORTANT] -> If you make updates to embedded repository (e.g. CasC bundles), you must push the changes to the public upstream (repository/branch) before running `terraform apply` locally. The endpoint and/or branch can be updated via `set-casc-location` from the companion [Makefile](Makefile). +> If you make updates to the embedded repository, you must push the changes to the public upstream (repository/branch) before running `terraform apply` locally. The endpoint and/or branch can be updated via the companion [Makefile](Makefile). ## Pre-commits: Linting, Formatting and Secrets Scanning From c59b1ab983a609de5ad614d8766d4b2606c1ef00 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 17:07:11 -0400 Subject: [PATCH 16/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30c1069..a36a1b0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The blueprint `deploy` and `destroy` phases use the same requirements provided i ### AWS authentication -Before getting started, you must export your required [AWS Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) to your CLI before getting started (for example, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_PROFILE`). +Before getting started, you must export your required [AWS Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) to your CLI (for example, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_PROFILE`). ### Existing AWS 53 hosted zone @@ -75,7 +75,7 @@ CloudBees CD/RO uses a file system to persist data. Data is stored in several [l | cert_arn | Certificate ARN from AWS ACM | `string` | n/a | yes | | host_name | Route53 Host name | `string` | n/a | yes | | flow_db_secrets_file | Secrets file yml path containing the secrets names:values to create the Kubernetes secret flow_db_secret. | `string` | `"flow_db_secrets-values.yml"` | no | -| helm_config | CloudBees CD/RO Helm chart configuration | `any` |
{
"values": [
""
]
}
| no | +| helm_config | CloudBees CD Helm chart configuration | `any` |
{
"values": [
""
]
}
| no | ### Outputs From 53d200895ba676b5cd2eed4729dbbb0108b0ecc3 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Mon, 16 Sep 2024 17:12:52 -0400 Subject: [PATCH 17/20] Update README.md --- blueprints/02-at-scale/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index 1791ae4..7bf825a 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -2,7 +2,7 @@ Once you have familiarized yourself with the [CloudBees CD/RO blueprint: Get started](../01-getting-started/README.md), this blueprint presents a scalable architecture and configuration by adding: -- An [RDS](https://aws.amazon.com/rds/) that can be used by CloudBees CD/RO as database server. +- An [Amazon Relational Database Service (Amazon RDS)](https://aws.amazon.com/rds/) that can be used by CloudBees CD/RO as database server. - An [Amazon Elastic File System (Amazon EFS) drive](https://aws.amazon.com/efs/) that can be used by CloudBees CD/RO for cluster setup. It is managed by [Amazon Web Services (AWS) Backup](https://aws.amazon.com/backup/) for backup and restore. - An [Amazon S3 bucket](https://aws.amazon.com/s3/) to store assets from applications, such as Velero. - [Amazon Elastic Kubernetes Service (Amazon EKS) managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) for CloudBees CD/RO applications. @@ -109,7 +109,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ``` ### Back up and restore -#### Back up and restore database storage using Amazon Relational Database Service (Amazon RDS) +#### Back up and restore database storage using Amazon RDS 1. Issue the following command to create a snapshot of the Amazon RDS instance: From f31aecea527e939113d305cff0aa55e3beec5d6d Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Tue, 17 Sep 2024 10:05:09 -0400 Subject: [PATCH 18/20] Update CODEOWNERS --- .github/CODEOWNERS | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ea2db41..a48123f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,11 @@ * @carlosrodlop * @holywen -* @ps-ssingh \ No newline at end of file +* @ps-ssingh + +# Center of Excellence team as owners for files that require documentation review. + +*.md @cloudbees/team-docs-coe +LICENSE @cloudbees/team-docs-coe +outputs.tf @cloudbees/team-docs-coe +variables.tf @cloudbees/team-docs-coe +img/ @cloudbees/team-docs-coe From 5bb695c3c15292a9d3d4034de98ff3e9ded6888c Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Tue, 17 Sep 2024 13:28:03 -0400 Subject: [PATCH 19/20] Revert "Update CODEOWNERS" This reverts commit f31aecea527e939113d305cff0aa55e3beec5d6d. --- .github/CODEOWNERS | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a48123f..ea2db41 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,11 +1,3 @@ * @carlosrodlop * @holywen -* @ps-ssingh - -# Center of Excellence team as owners for files that require documentation review. - -*.md @cloudbees/team-docs-coe -LICENSE @cloudbees/team-docs-coe -outputs.tf @cloudbees/team-docs-coe -variables.tf @cloudbees/team-docs-coe -img/ @cloudbees/team-docs-coe +* @ps-ssingh \ No newline at end of file From 97b89b6e1e976ec0eafae94bdabd2596da1cc469 Mon Sep 17 00:00:00 2001 From: Kellie Freeman Date: Wed, 18 Sep 2024 08:56:42 -0400 Subject: [PATCH 20/20] Update README.md --- blueprints/02-at-scale/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/02-at-scale/README.md b/blueprints/02-at-scale/README.md index 7bf825a..8be600f 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -2,7 +2,7 @@ Once you have familiarized yourself with the [CloudBees CD/RO blueprint: Get started](../01-getting-started/README.md), this blueprint presents a scalable architecture and configuration by adding: -- An [Amazon Relational Database Service (Amazon RDS)](https://aws.amazon.com/rds/) that can be used by CloudBees CD/RO as database server. +- An [Amazon Relational Database Service (Amazon RDS)](https://aws.amazon.com/rds/) that can be used by CloudBees CD/RO as database server. - An [Amazon Elastic File System (Amazon EFS) drive](https://aws.amazon.com/efs/) that can be used by CloudBees CD/RO for cluster setup. It is managed by [Amazon Web Services (AWS) Backup](https://aws.amazon.com/backup/) for backup and restore. - An [Amazon S3 bucket](https://aws.amazon.com/s3/) to store assets from applications, such as Velero. - [Amazon Elastic Kubernetes Service (Amazon EKS) managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) for CloudBees CD/RO applications. @@ -134,7 +134,7 @@ Once you can access the Kubernetes API from your terminal, complete the followin ```sh eval $(terraform output --raw velero_backup_on_demand_team_cd) ``` - + 1. Issue the following command to restore from the last backup: ```sh