Skip to content

Instantly share code, notes, and snippets.

@ramitsurana
Last active March 27, 2018 16:15
Show Gist options
  • Save ramitsurana/aa2271a3f5b2d116a92fbd71a2e75362 to your computer and use it in GitHub Desktop.
Save ramitsurana/aa2271a3f5b2d116a92fbd71a2e75362 to your computer and use it in GitHub Desktop.
Setting up jenkins,docker and git pipeline
## Install Jenkins
$ sudo yum update
$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
$ sudo yum install jenkins
$ sudo service jenkins start
$ sudo chkconfig jenkins on
## Install Docker (Amazon EC2 Container Service)
$ sudo yum install -y ecs-init
$ sudo gpasswd -a jenkins docker
$ sudo service docker start
$ sudo chkconfig docker on
## Install Git
$ sudo yum install git
#### If you are using the GitHub plug-in then you should create a key to log in to GitHub
$ sudo su -s /bin/bash jenkins
$ cd /var/lib/jenkins/
$ ssh-keygen
$ cat .ssh/id_rsa.pub
#### Copy the public key, which was just concatenated onto the screen, and add it to your GitHub keys.
$ sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment