Skip to content

Latest commit

 

History

History
94 lines (49 loc) · 4.16 KB

Project9.md

File metadata and controls

94 lines (49 loc) · 4.16 KB

TOOLING WEBSITE DEPLOYMENT AUTOMATION WITH CONTINUOUS INTEGRATION. INTRODUCTION TO JENKINS

DevOps is about Agility, and speedy release of software and web solutions. One of the ways to guarantee fast and repeatable deployments is Automation of routine tasks. Acording to Circle CI, Continuous integration (CI) is a software development strategy that increases the speed of development while ensuring the quality of the code that teams deploy. Developers continually commit code in small increments (at least daily, or even several times a day), which is then automatically built and tested before it is merged with the shared repository. n our project we are going to utilize Jenkins CI capabilities to make sure that every change made to the source code in GitHub https://github.com/Damdev-95/tooling will be automatically be updated to the Tooling Website.

image

Step 1 – Install Jenkins server

  • Create an AWS EC2 server based on Ubuntu Server 20.04 LTS and name it "Jenkins"
  • Install JDK (since Jenkins is a Java-based application)
sudo apt update
sudo apt install default-jdk-headless
  • Install Jenkins
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
    /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt-get install jenkins

image

  • By default Jenkins server uses TCP port 8080 – open it by creating a new Inbound Rule in your EC2 Security Group image

image

  • Retrieve it from your server: sudo cat /var/lib/jenkins/secrets/initialAdminPassword

image

Then you will be asked which plugings to install – choose suggested plugins.

Step 2 – Configure Jenkins to retrieve source codes from GitHub using Webhooks

  • Enable webhooks in your GitHub repository settings

image

  • Go to Jenkins web console, click "New Item" and create a "Freestyle project" image

image

image

image

image

  • I had issues with this

image

  • The issues was regarding the ssh-keys on the NFS server

image

image

  • Having issues sending the files, there is permission issue on the /mnt/apps folder

image

  • Change the permission of the /mnt/apps directory

sudo chmod 777 -R /mnt/apps

image

  • This confirm the changes has been successfully tranfer to the NFS server

image

image