Jenkins on AWS
Terraform Repository to deploy a Jenkins server to AWS.
Provision Jenkins to AWS with this Terraform template. This will create several AWS resources: VPC, EC2s, Security Groups, Subnets, etc.
The Jenkins Controller and a Jenkins Agent will be provisioned on two separate EC2 instances.
Built With
Getting Started
Prerequisites
- An AWS account and access to the AWS Management Console
- An S3 bucket for Terraform state tracking
- AWS CLI
- Key Pairs to ssh into the EC2 instances.
- Terraform
Usage
This is IaC to manage your CI/CD infrastructure. Once deployed, ensure to consult the documentation, configure Jenkins for your environment, and write a Jenkinsfile under your project repository.
Ensure to sign into the AWS CLI.
aws login
Modify the data sources and resources to match your current environment. See my blog post for an explanation here.
Initalize Terraform, validate the plan to provision the AWS resources, and apply.
terraform init
terraform plan
terraform apply