Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc Contributions and Docker Workflows #82

Merged
merged 45 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0044f1b
Only Build Docker images from Main Branch
carlosrodlop Mar 15, 2024
2e419a2
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
ac9d7de
typo
carlosrodlop Mar 15, 2024
b17ec2b
Docs: Moving comments to Blueprints
carlosrodlop Mar 15, 2024
d6b2727
Doc: Note on agent name
carlosrodlop Mar 15, 2024
7c26d84
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
9ba45d5
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
a3ceea7
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
98a31d9
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
2819a8e
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
d2df915
Update CONTRIBUTING.md
carlosrodlop Mar 15, 2024
14b8b5e
Update blueprints/02-at-scale/README.md
carlosrodlop Mar 15, 2024
d5c6623
Update blueprints/02-at-scale/README.md
carlosrodlop Mar 15, 2024
4a55f6c
Update blueprints/02-at-scale/README.md
carlosrodlop Mar 15, 2024
44c28b4
Update bp-tf-ci.yaml
carlosrodlop Mar 15, 2024
a9d2088
Merge branch 'develop' of github.com:cloudbees/terraform-aws-cloudbee…
carlosrodlop Mar 15, 2024
06ac4ee
Chore: Returning Secrets as output
carlosrodlop Mar 16, 2024
8c27829
Chore: Make fresh plan
carlosrodlop Mar 16, 2024
06900ca
Chore: Return secrets name when it is created
carlosrodlop Mar 16, 2024
c8aaef2
Chore: Reformatting probes
carlosrodlop Mar 16, 2024
5a17ff1
Chore: making outputs more dinamic
carlosrodlop Mar 16, 2024
033350a
Fix: Main Branch
carlosrodlop Mar 16, 2024
64a1ac0
Chore: Prepare for Template
carlosrodlop Mar 16, 2024
a1ab0a7
Chore: Adding local in relation to selections
carlosrodlop Mar 16, 2024
fb86af2
terraform-docs: automated action
github-actions[bot] Mar 16, 2024
9591635
terraform-docs: automated action
github-actions[bot] Mar 16, 2024
574cc7c
Fix: casc_branch
carlosrodlop Mar 16, 2024
789e91a
Merge branch 'develop' of github.com:cloudbees/terraform-aws-cloudbee…
carlosrodlop Mar 16, 2024
fc3a91a
Chore: remove unnecesary space
carlosrodlop Mar 16, 2024
232eb20
Feat: Complete cbci helm values from main
carlosrodlop Mar 16, 2024
4692ca5
Chore: refactor Manage Nde Group Locals
carlosrodlop Mar 16, 2024
7d0e789
Chore: typo in develop brach name
carlosrodlop Mar 16, 2024
48c51aa
Chore: Connect Service Labels with Service Monitor
carlosrodlop Mar 16, 2024
a36b8e2
Specify connection of prometheus_target to Kube Prometheus Stack
carlosrodlop Mar 16, 2024
f4a2d38
terraform-docs: automated action
github-actions[bot] Mar 16, 2024
9e854de
ci: clean-up
carlosrodlop Mar 16, 2024
04d5c82
Merge branch 'develop' of github.com:cloudbees/terraform-aws-cloudbee…
carlosrodlop Mar 16, 2024
5b3f9de
Chore: Force Refresh kubeconfig file
carlosrodlop Mar 16, 2024
3514395
ci: forze cleanup
carlosrodlop Mar 16, 2024
a960926
CI: Prepare Release
carlosrodlop Mar 16, 2024
c80751f
Simplying prometehu target call and remove link to videos
carlosrodlop Mar 17, 2024
71b9550
chore: Add taints dinamically to the helm chart
carlosrodlop Mar 17, 2024
167f9e3
Helper: Simplifying
carlosrodlop Mar 17, 2024
89d6c75
Returning InitialRAMPercentage and MaxRAMPercentage to best practice 50
carlosrodlop Mar 17, 2024
5e9f7ae
ci: clean
carlosrodlop Mar 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cloudbees/workflows/bp-agent-ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: agent
on:
push:
branches:
- '**'
- 'main'

env:
REGISTRY: public.ecr.aws/r1n1q0e5
Expand Down
2 changes: 1 addition & 1 deletion .cloudbees/workflows/ldap-gh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: agent
on:
push:
branches:
- '**'
- 'main'

env:
REGISTRY: ghcr.io
Expand Down
31 changes: 22 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document provides guidelines for contributing to the CloudBees CI add-on fo

## Design principles

It follows the same approach as the [Terraform AWS EKS Blueprints for Terraform Patterns](https://aws-ia.github.io/terraform-aws-eks-blueprints/)
It follows the same approach as the [Terraform AWS EKS Blueprints for Terraform Patterns](https://aws-ia.github.io/terraform-aws-eks-blueprints/).

## Report bugs and feature requests

Expand Down Expand Up @@ -37,13 +37,26 @@ To submit a pull request:
3. **Ensure that local tests pass**.
4. Make commits to your fork using clear commit messages.
5. Submit a pull request against the `develop` branch and answer any default questions in the pull request interface.

> [!IMPORTANT]
> Validate Casc Bundle SCM is pointing to the `develop` branch.
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

>[!TIP]
> GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## CI pipeline
### Pre-commits: Linting, formatting and secrets scanning

Many of the files in the repository can be lined 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).
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

When working with the repository for the first time, you must run `pre-commit`:

1. Run `pre-commit install`.
2. Run `pre-commit run --all-files`.

## Blueprint Terraform CI pipeline

Validate your pull request changes inside the blueprint agent described in the [Dockerfile](.docker/agent). It is the same agent used for the CI pipeline [bp-agent-ecr.yaml](.cloudbees/workflows/bp-agent-ecr.yaml).

Expand All @@ -61,17 +74,17 @@ The [bp-tf-ci.yaml](.cloudbees/workflows/bp-tf-ci.yaml) blueprints are orchestra
> [!IMPORTANT]
> CloudBees Platform currently only supports push events. Therefore, pull requests are sent to the `dev` branch for integration.

## Pre-commits: Linting, formatting and secrets scanning
## Release

Many of the files in the repository can be lined 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).
Pre-requisites:
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

When working with the repository for the first time, you must run `pre-commit`:
1. Project Admins create a Pull Request from `develop` to `main`.
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

1. Run `pre-commit install`.
2. Run `pre-commit run --all-files`.
> [!IMPORTANT]
> Validate Casc Bundle SCM is pointing to the `main` branch.
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

## Release
2. Once it is merged, ensure `main` branch successfully passes the [Terraform CI build](#Blueprint Terraform_CI_pipeline).
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

This project uses [Release Drafter](https://github.com/release-drafter/release-drafter); pull request labels should be set accordingly.

Kubernetes' environment versions are managed centrally in the [blueprints/.k8.env](blueprints/.k8s.env) file.
For a new release, the latest commits in the `main` branch should successfully pass the CI build.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,14 @@ module "eks_blueprints_addon_cbci" {

By default, it uses a minimum required configuration described in the Helm chart [values.yaml](values.yml) file. 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

### Tools

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](.docker) to run the blueprints in a containerized development environment, ensuring all dependencies are met. It can be built using the [Makefile](Makefile) target `make dRun`.
> There is a companion [Dockerfile](.docker/agent/agent.rootless.Dockerfile) to run the blueprints in a containerized development environment, ensuring all dependencies are met. It can be built using the [Makefile](Makefile) target `make bpAgent-dRun`.

### AWS authentication

Expand Down
6 changes: 6 additions & 0 deletions blueprints/01-getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ When preparing to deploy, you must complete the following steps:

For more information, refer to [The Core Terraform Workflow](https://www.terraform.io/intro/core-workflow) documentation.

> [!TIP]
> The `deploy` phase can be orchestrated via the companion [Makefile](../../Makefile).

## Validate

Once the blueprint has been deployed, you can validate it.
Expand Down Expand Up @@ -126,3 +129,6 @@ 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).

> [!TIP]
> The `destroy` phase can be orchestrated via the companion [Makefile](../../Makefile).
9 changes: 6 additions & 3 deletions blueprints/02-at-scale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ Once you have familiarized yourself with [CloudBees CI blueprint add-on: Get sta

## Deploy

When preparing to deploy, you must [customize the secrets file](#customize-secrets-file) and [update Amazon S3 bucket settings](#update-amazon-s3-bucket-settings).
In addition to the minimum required settings explained in [Get started - Deploy](../01-getting-started/README.md#deploy), when preparing to deploy, you must [customize the secrets file](#customize-secrets-file) and [update Amazon S3 bucket settings in Casc](#update-amazon-s3-bucket-settings)
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

> [!TIP]
> To understand the minimum required settings, refer to [Get started - Deploy](../01-getting-started/README.md#deploy).
> The `deploy` phase can be orchestrated via the companion [Makefile](../../Makefile).

### Secrets file
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

You must create your secrets file by copying the contents of [secrets-values.yml.example](k8s/secrets-values.yml.example) to `secrets-values.yml`. This provides [Kubernetes secrets](https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc#kubernetes-secrets) that can be consumed by CasC.

### Update Amazon S3 bucket settings

Since the Terraform variable `suffix` is used for this blueprint, you must update the Amazon S3 bucket name for CloudBees CI controllers and the Amazon S3 bucket for the backup controller cluster operations. To update the Amazon S3 bucket name, you have the following options:
Since the Terraform variable `suffix` is used for this blueprint (optional), you must update the Amazon S3 bucket name for CloudBees CI controllers and the Amazon S3 bucket for the backup controller cluster operations. To update the Amazon S3 bucket name, you have the following options:
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved

- [Option 1: Update Amazon S3 bucket name using CasC](#option-1-update-amazon-s3-bucket-name-using-casc)
- [Option 2: Update Amazon S3 bucket name using the CloudBees CI UI](#option-2-update-amazon-s3-bucket-name-using-the-cloudbees-ci-ui)
Expand Down Expand Up @@ -306,6 +306,9 @@ For CloudBees CI build logs:

To tear down and remove the resources created in the blueprint, refer to [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).

## Additional resources

The following videos provide more insights regarding the capabilities presented in this blueprint:
Expand Down
Loading