Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmjhynes/aws-master-pipeline
A master pipeline that deploys worker pipelines to selected AWS accounts, with each worker pipeline pulling and deploying code from its own designated repository.
https://github.com/rmjhynes/aws-master-pipeline
aws aws-codepipeline cicd codepipeline terraform
Last synced: 18 days ago
JSON representation
A master pipeline that deploys worker pipelines to selected AWS accounts, with each worker pipeline pulling and deploying code from its own designated repository.
- Host: GitHub
- URL: https://github.com/rmjhynes/aws-master-pipeline
- Owner: rmjhynes
- Created: 2024-11-23T10:02:23.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-07T15:17:55.000Z (20 days ago)
- Last Synced: 2024-12-07T15:21:25.940Z (20 days ago)
- Topics: aws, aws-codepipeline, cicd, codepipeline, terraform
- Language: HCL
- Homepage:
- Size: 136 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Master Pipeline
A master pipeline that deploys worker pipelines to selected AWS accounts, with each worker pipeline pulling and deploying code from its own designated repository.
---
## Components
- S3 bucket to store Terraform state (deployed by CloudFormation).
- S3 bucket for shared artifacts.
- AWS CodePipeline.
- AWS CodeBuild projects to generate a terraform plan file and then apply the configuration.
- IAM roles.
- CloudWatch Log Groups.---
## Setup
### AWS Connector for GitHub
For each code repository that you want to pull code from, you will have to configure the AWS Connector for GitHub in your repo settings. This allows GitHub to trigger the pipelines when code is pushed to a repo.### Terraform State Bucket
The Terraform state bucket CloudFormation template is found in `/cloudformation` and should be created in the account in which you are deploying the `master-pipeline` to. This can be done manually in the console or using the script `deploy.sh`.### Terraform State Configuration
To initialise the s3 backend for the `master-pipeline`, run:
`terraform init -reconfigure -backend-config=backend.hcl` in `/master-pipeline`The s3 backend for the `pipelines-to-deploy` module is initialised in codebuild when it runs:
`terraform init -backend-config="region=" -backend-config="bucket=terraform-state-" -backend-config="key=.tfstate"`If you want to destroy the resources related to any worker pipelines from your local - you have to run:
`terraform init -reconfigure -backend-config="region=" -backend-config="bucket=terraform-state-" -backend-config="key=.tfstate"`then
`terraform destroy`> [!IMPORTANT]
> For some reason, when the master pipeline is first deployed the source stage fails with a permissions error. Manually releasing the change will allow it to work.