Skip to content

Jenkins CI CD Pipeline that fully automate aws infrastructure provisioning and configuration and deploy samle node app that connects to a mysql and redis instances.

Notifications You must be signed in to change notification settings

abdallah-refaay/Infrastructure-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure provisioning and configuration pipeline

Jenkins Terraform AWS Ansible Docker badge

Jenkins pipeline runs Terraform to provision resources on aws, Ansible to configure 2 private instances to be a jenkins slave and install docker on it, and lastly invoking the pipelines responsible for deploying this node app on these two instances by build the docker image and using these jenkinsfiles Jenkinsfile, Jenkins_private2.

Getting started with Jenkins

I deployed jenkins master server as a docker custom image on my machine.

First you need to install docker on your machine

I used a custom image I built to deploy the master server which is basically a jenkins image with docker-ce-cli. You would need it if you want to run docker command but in our case we will not need it, so you can use the official jenkins image.

official image:

docker run jenkins

my custom image:

docker run refay/jenkins_master:1.0

Before heading to Jenkins Configuration make sure to check Terraform resources and configuration.

Tools configuration on jenkins

Note: that other versions of tools or plugins may work but I mentioned the versions that worked for me.

Terraform:

I used terraform plugin version 1.0.10 check plugins reference for terraform for more info. terraform plugin
Then After Jenkins restarts, go to global tool configuration and terraform installation as follows. terraform plugin

Ansible:

I installed ansible as a deb package from apt package manager.

but first you need to exec into the container as root.

docker exec -it -u root <containe_name_or_id> bash

Then run

apt install ansible

after installing ansible you need to provide the binary path in the global tool configuration as follows: ansible tool config


🔗 Feedback

📧 [email protected]

linkedin

About

Jenkins CI CD Pipeline that fully automate aws infrastructure provisioning and configuration and deploy samle node app that connects to a mysql and redis instances.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published