Skip to content

The repository contains scripts used by packer to create a baked docker image (from ubuntu) on AWS. The docker AMI is used to setup Jenkins using the Configuration-as-Code approach.

Notifications You must be signed in to change notification settings

Wach-E/Jenkins-Configuration-as-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins-Configuration-as-Code

Pre-requisites:

  • IAM user with AmazonEC2FullAccess role.
  • aws cli installed on your local machine (preferaly, version awscli v2
  • aws cli configured with IAM user.
  • packer installed on your local machine.

N\B: I used us-west-2 as my region. Feel free to change it to what suits you.

Step 1: Clone this repository

git clone https://github.com/Wach-E/Jenkins-Configuration-as-Code.git

Step 2: Navigate to the cloned repository

cd Jenkins-Configuration-as-Code

Step 3: Build Docker baked image with Packer

packer build template.json

Step 4: On completion of packer build, create an EC2 instance with the docker ami and upload the start.sh script as a user data N\B: port 8080 must be opened on your security group for access to Jenkins

Step 5: After the instance has been created, wait for 30 - 60 secs and then Navigate to http:server_ip:8080 to access your Jenkins server

I will really love to learn about a better approach as opposed to the waitime for the Jenkins server. A pull request on this will be awesome :)

TODO:

About

The repository contains scripts used by packer to create a baked docker image (from ubuntu) on AWS. The docker AMI is used to setup Jenkins using the Configuration-as-Code approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published