• Stars
    star
    4,623
  • Rank 8,750 (Top 0.2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Install Jenkins, configure Docker as slave, set up cicd, deploy applications to k8s using Argo CD in GitOps way.

Jenkins-Zero-To-Hero

Are you looking forward to learn Jenkins right from Zero(installation) to Hero(Build end to end pipelines)? then you are at the right place.

Installation on EC2 Instance

YouTube Video -> https://www.youtube.com/watch?v=zZfhAXfBvVA&list=RDCMUCnnQ3ybuyFdzvgv2Ky5jnAA&index=1

Screenshot 2023-02-01 at 5 46 14 PM

Install Jenkins, configure Docker as agent, set up cicd, deploy applications to k8s and much more.

AWS EC2 Instance

  • Go to AWS Console
  • Instances(running)
  • Launch instances

Screenshot 2023-02-01 at 12 37 45 PM

Install Jenkins.

Pre-Requisites:

  • Java (JDK)

Run the below commands to install Java and Jenkins

Install Java

sudo apt update
sudo apt install openjdk-11-jre

Verify Java is Installed

java -version

Now, you can proceed with installing Jenkins

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins

**Note: ** By default, Jenkins will not be accessible to the external world due to the inbound traffic restriction by AWS. Open port 8080 in the inbound traffic rules as show below.

  • EC2 > Instances > Click on
  • In the bottom tabs -> Click on Security
  • Security groups
  • Add inbound traffic rules as shown in the image (you can just allow TCP 8080 as well, in my case, I allowed All traffic).

Screenshot 2023-02-01 at 12 42 01 PM

Login to Jenkins using the below URL:

http://:8080 [You can get the ec2-instance-public-ip-address from your AWS EC2 console page]

Note: If you are not interested in allowing All Traffic to your EC2 instance 1. Delete the inbound traffic rule for your instance 2. Edit the inbound traffic rule to only allow custom TCP port 8080

After you login to Jenkins, - Run the command to copy the Jenkins Admin Password - sudo cat /var/lib/jenkins/secrets/initialAdminPassword - Enter the Administrator password

Screenshot 2023-02-01 at 10 56 25 AM

Click on Install suggested plugins

Screenshot 2023-02-01 at 10 58 40 AM

Wait for the Jenkins to Install suggested plugins

Screenshot 2023-02-01 at 10 59 31 AM

Create First Admin User or Skip the step [If you want to use this Jenkins instance for future use-cases as well, better to create admin user]

Screenshot 2023-02-01 at 11 02 09 AM

Jenkins Installation is Successful. You can now starting using the Jenkins

Screenshot 2023-02-01 at 11 14 13 AM

Install the Docker Pipeline plugin in Jenkins:

  • Log in to Jenkins.
  • Go to Manage Jenkins > Manage Plugins.
  • In the Available tab, search for "Docker Pipeline".
  • Select the plugin and click the Install button.
  • Restart Jenkins after the plugin is installed.

Screenshot 2023-02-01 at 12 17 02 PM

Wait for the Jenkins to be restarted.

Docker Slave Configuration

Run the below command to Install Docker

sudo apt update
sudo apt install docker.io

Grant Jenkins user and Ubuntu user permission to docker deamon.

sudo su - 
usermod -aG docker jenkins
usermod -aG docker ubuntu
systemctl restart docker

Once you are done with the above steps, it is better to restart Jenkins.

http://<ec2-instance-public-ip>:8080/restart

The docker agent configuration is now successful.

More Repositories

1

aws-devops-zero-to-hero

AWS zero to hero repo for devops engineers to learn AWS in 30 Days. This repo includes projects, presentations, interview questions and real time examples.
Python
4,817
star
2

Docker-Zero-to-Hero

Repo to learn Docker with examples. Contributions are most welcome.
2,436
star
3

python-for-devops

Learn Python from DevOps Engineer point of you.
Python
1,786
star
4

Azure-zero-to-hero

Repository to learn Azure from Zero. This repository covers the complete Azure fundamentals required for a DevOps Engineer.
HCL
1,646
star
5

terraform-zero-to-hero

Master Terraform in 7 days using this Zero to Hero course.
HCL
1,581
star
6

Kubernetes-Zero-to-Hero

Creating this repo with an intent to make Kubernetes easy for begineers. This is a work-in-progress repo.
1,028
star
7

prometheus-Grafana-Zero-to-Hero

[WIP]: Repo for learning how monitor your kubernetes clusters using prometheus and visualize using grafana
799
star
8

GitHub-Actions-Zero-to-Hero

Repository to kick start your journey with GitHub Actions
Python
777
star
9

shell-scripting-projects

Projects on shell scripting. Goal is to simulate real time projects as much as posible.
Shell
591
star
10

devops-interview-preparation-guide

Share your interview questions and help others. Let's build this interview preparation guide together.
446
star
11

cicd-end-to-end

Using this repo for an End to End CICD Demo
Python
337
star
12

write_your_first_terraform_project

helps you learn terraform and write your first project
HCL
320
star
13

devops-project-ideas

Real-time project ideas for devops engineers.
216
star
14

Golang-Zero-to-Hero

Learn golang with practical approach. TODO repo - work in progress
183
star
15

k8s-kyverno-argocd

Demo repository to enforce automated k8s cluster security using kyverno policy generator and argocd
145
star
16

sandbox

Just a sandbox
105
star
17

k8s-crossplane-argocd

Demonstrate GitOpsification of Cloud Infrastructure using Crossplane and Argo CD
98
star
18

argocd-hub-spoke-demo

Deploy resources to multiple kubernetes clusters using Argo CD.
96
star
19

design_diagrams

flowcharts, workflows and diagrams
83
star
20

cicd-demo-golang

Sample golang application to demonstrate CICD
Go
66
star
21

cis-istio-integration

Integration of F5 CIS Ingress Controller with Istio Service Mesh for Kubernetes and Openshift
Makefile
63
star
22

terraform-eks

A sample repository to create EKS with VPC on AWS using Terraform.
HCL
50
star
23

argo-perf-test

Repo for testing Argo CD Performance(This can be very vague)
46
star
24

officeassistant

Office Management Assistant During Covid19
JavaScript
31
star
25

cicd-demo-manifests-repo

Repo for CICD demo app kubernetes manifests
9
star
26

abhishek-shell-example-project

Shell scripting example project
7
star
27

AWS

AWS Lambda functions for Cloud-admins
Python
3
star
28

demo-repo

This repo is created for a demo
2
star
29

keycloak-stuff

Keycloak Installation and Configuration on K8s and OpenShift Container Platforms. Describes on how OpenShiftv4 Idp can be used as broker for openshift-gitops.
Go
1
star