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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 188bca6..8f16e84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,23 +1,55 @@ # 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`. +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 +## Report bugs and feature requests + +CloudBees welcomes you to use the GitHub issue tracker to report bugs or suggest features. + +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. +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) +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 -Many of the files in the repository can be linted or formatted to -maintain a standard of quality. +Contributions via pull requests are appreciated. Before submitting a pull request, please ensure that you: -Additionally, secret leaks are watched via gitleaks and git-secrets. +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 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 -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). +1. 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). 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/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..a36a1b0 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, 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 -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,39 @@ 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. - -> [!TIP] -> Blueprints lifecycle (`deploy` > `validate` > `destroy`) can be orchestrated via the companion [Makefile](Makefile). +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. ## 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 (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 Route 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 @@ -98,15 +91,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..04f27ea 100644 --- a/blueprints/01-getting-started/README.md +++ b/blueprints/01-getting-started/README.md @@ -1,21 +1,21 @@ -# 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 [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: -- 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 +48,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/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..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,958 +1,346 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
+
+
+ AWS Cloud - - - - - - AWS Cloud - - - - - - - - - - - - - - K8s Cluster - - - - - - EKS - - - - - K8s Cluster... - - - - - - - - - - - - - EBS CSI Driver - - - - - - EBS CSI Dri... - - - - - - - - - - - - - external-dns - - - - - - external-dns - - - - - - - - - - - - + +
+
+
+
+ + AWS Cloud + +
+
+ + + + + + + + +
+
+
+ Kubernetes cluster +
+ on Amazon EKS +
+
+
+
+ + Kubernetes... + +
+
+ + + + + + +
+
+
+ + Amazon EBS + +
+ + CSI driver + +
+
+
+
+
+ + Amazon EBS... + +
+
+ + + + + + +
+
+
+ AWS Load Balancer - - - - - - - AWS Load Ba... - - - - - - - - - - - Route 53 - - - - - - Hosted Zone - - - - - Route 53... - - - - - - - - - - - - - +
+
+
+
+
+
+ + AWS Load Ba... + +
+
+ + + + + +
+
+
+ Amazon Route 53 +
+ hosted zone +
+
+
+
+ + Amazon Route... + +
+
+ + + + + + + + +
+
+
Application Load - - - - - +
Balancing (ALB) - - - - - Applicatio... - - - - - - - - - - - - EBS - - - - - - - EBS - - - - - - - - - - +
+
+
+
+ + Applicatio... + +
+
+ + + + + +
+
+
+ + Amazon EBS +
+
+
+
+
+
+ + Amazon E... + +
+
+ + + + +
+
+
+ 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 - + +
+
+
+
+ + 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 diff --git a/blueprints/01-getting-started/outputs.tf b/blueprints/01-getting-started/outputs.tf index 2821708..ce73a93 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 = "Exports 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 = "Adds 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 = "Retrieves 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..fac767c 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..8be600f 100644 --- a/blueprints/02-at-scale/README.md +++ b/blueprints/02-at-scale/README.md @@ -1,32 +1,32 @@ -# 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 [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. +- The following [Amazon EKS blueprints add-ons](https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/): -> [!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. + | 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).| -## 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. +> [!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. ## Architecture ![Architecture](img/at-scale.architect.drawio.svg) -### Kubernetes Cluster +### Kubernetes cluster ![Architecture](img/at-scale.k8s.drawio.svg) -## Terraform Docs +## Terraform documentation ### Inputs @@ -68,67 +68,88 @@ A initial license is required to use CloudBees CD. Please refer to the [CloudBee ## 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 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 - ``` + ```sh + eval $(terraform output --raw efs_access_points) | . jq .AccessPoints[].RootDirectory.Path + ``` ## 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). + +> [!TIP] +> The `destroy` phase can be orchestrated via the companion [Makefile](../../Makefile). \ No newline at end of file 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..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,2110 +1,787 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AWS Cloud - - - - - AWS Cloud - - - - - - - - - - - us-east-1c - - - - - us-east-1c - - - - - - - - - - - us-east-1a - - - - - us-east-1a - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + AWS Cloud + +
+
+
+
+ + AWS Cloud + +
+
+ + + + + +
+
+
Region - - - - - Region - - - - - - - - - - - Private Subnet - - - - - Private Subnet - - - - - - - - - - - us-east-1b - - - - - us-east-1b - - - - - - - - - - - Private Subnet - - - - - Private Subnet - - - - - - - - - - - Private Subnet - - - - - Private Subnet - - - - - - - - - - - +
+
+
+
+ + Region + +
+
+ + + + + +
+
+
+ Custom VPC - - - - - - Custom VPC - - - - - - - - - - - Internet - - - - - - - - - Gateway - - - - - Internet... - - - - - - - - - - - Route 53 - - - - - - - - - Hosted Zone - - - - - Route 53... - - - - - - - - - - - - EBS - - - - - - - - - gp3 - - - - - - - EBS... - - - - - - - - - - - Certificate - - - - - - - - - Manager - - - - - Certificat... - - - - - - - - - - + +
+
+
+
+ + Custom VPC + +
+
+ + + + + +
+
+
+ Amazon Route 53 +
+ hosted zone +
+
+
+
+ + Amazon Rou... + +
+
+ + + + + +
+
+
+ AWS certificate +
+ manager +
+
+
+
+ + AWS certif... + +
+
+ + + + + +
+
+
Application Load - - - - - - - - +
Balancing (ALB) - - - - - Applicatio... - - - - - - - - - - +
+
+
+
+ + Applicatio... + +
+
+ + + + + +
+
+
+ K8s Cluster +
+ EKS +
+
+
+
+ + K8s Cluster... + +
+
+ + + + + +
+
+
+ EFS +
+
+
+
+ + EFS + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Autoscaling +
+ Group +
+
+
+
+ + Autoscal... + +
+
+ + + + + +
+
+
+ Amazon S3 bucket +
+
+
+
+ + Amazon S3... + +
+
+ + + + + + + +
+
+
+ RDS +
+
+
+
+ + RDS + +
+
+ + + + + + +
+
+
+ + Internet gateway + +
+
+
+
+ + Internet... + +
+
+ + + + + +
+
+
+
+ + us-east-1b + +
+
+
+
+
+ + us-east-1b + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - - K8s Cluster - - - - - - - - - EKS - - - - - K8s Cluster... - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
+ + EBS +
+ gp3 +
+
+
+
+
+
+ + EBS... + +
+
+ + + + + +
+
+
+ us-east-1a +
+
+
+
+ + us-east-1a + +
+
+ + + + + +
+
+
+ + EBS +
+ gp3 +
+
+
+
+
+
+ + EBS... + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
+
+ + us-east-1c + +
+
+
+
+
+ + us-east-1c + +
+
+ + + + + +
+
+
Public subnet - - - - - Public subnet - - - - - - - - - - +
+
+
+
+ + Public subnet + +
+
+ + + + + +
+
+
NAT - - - - - - - - +
Gateway - - - - - NAT... - - - - - - - - - - - EFS - - - - - EFS - - - - - - - - - - - Kubernetes Applications - - - - - Kubernetes Applications - - - - - - - - - - - Autoscaling - - - - - - - - - Group - - - - - Autoscal... - - - - - - - - - - - - - EBS - - - - - - - - - gp3 - - - - - - - EBS... - - - - - - - - - - - +
+
+
+
+ + NAT... + +
+
+ + + + + +
+
+
+ EBS - - - - - - - - +
gp3 - - - - - - - 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 - - - - - - - - - - - - - +
+
+
+
+
+ + + EBS... + + + + + + + + +
+
+
+ Private Subnet +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
+ Kubernetes +
+ applications +
+
+
+
+ + Kubernete... + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ applications +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ agents +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ Private Subnet +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ agents +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ applications +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ Kubernetes +
+ applications +
+
+
+
+ + Kubernete... + +
+
+ + + + + +
+
+
+ Private Subnet +
+
+
+
+ + Private Subnet + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ applications +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ CloudBees CD/RO +
+ agents +
+
+
+
+ + CloudBees... + +
+
+ + + + + +
+
+
+ Kubernetes +
+ applications +
+
+
+
+ + Kubernete... + +
+
+ + + + + + +
+ Text is not SVG - cannot display - -
-
+ + + \ No newline at end of file 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 diff --git a/blueprints/02-at-scale/outputs.tf b/blueprints/02-at-scale/outputs.tf index dcdc915..41125ee 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 = "Exports 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." +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}" } 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 = "Retrieves 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 = "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 = "command to do DB restore from 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}" } 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..c022c9a 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 = "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" } 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..705cfd0 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 .yml path that contains the secrets names:values to create the Kubernetes secret flow_db_secret." default = "flow_db_secrets-values.yml" type = string }