DEV Community

AyushDabhi
AyushDabhi

Posted on

Jenkins Setup On Digital- Ocean Cloud ( Run Jenkins as a Docker container )

Jenkins is an open-source automation server that can be used to automate various tasks like building, testing, and deploying software.

DigitalOcean is a cloud hosting platform that provides a simple and cost-effective way to deploy and manage applications in the cloud.

In this blog, we will discuss how to set up Jenkins on DigitalOcean cloud.

To set up Jenkins on DigitalOcean, the first step is to create a Droplet.

A Droplet is a virtual machine that can be used to host applications in the cloud. To create a Droplet, follow these steps:

Step 1: Create a Droplet on DigitalOcean

1) Log in to your DigitalOcean account. Click on the "Create" button and select "Droplets."

Create a Droplet on DigitalOcean

2) Choose Region

Choose Region

3) Choose an Image

Choose an Image

4) Choose size

Choose size

Choose size

5) Choose Authentication Method

i) Password

Choose Authentication Method Password

ii) SSH key (We are Using)

Choose Authentication Method SSH key

Choose Authentication Method SSH key

6) Click on the Create Droplet button to create your Droplet.

Create Droplet

Rename droplet name :

Rename droplet name

7) Click on Networking and click on Create Firewall button

Create Firewall

Inbound Rules :

Inbound Rules

Outbound Rules :

Outbound Rules

Firewall Created :

Firewall Created

Step 2: Install Docker on your Droplet

1) SSH to your droplet

Copy your droplet's IPV4

Copy your droplet's IPV4

2) Update your package index by running the command:
apt update

3) Install docker by running the command :
apt install docker.io

Step 3: Install Jenkins on Docker container

1) docker run -p 8080:8080 -p 50000:50000 -d -v
jenkins_home:/var/jenkins_home jenkins/jenkins:lts

2) docker ps

docker ps

3) Access Jenkins on web-browser via typing
ip_address:jenkins_port

Access Jenkins on web-browser via typing ip_address:jenkins_port

4) Getting Unlock Jenkins Password

Getting Unlock Jenkins Password

5) Install Suggested Plugins

Install Suggested Plugins

Install Suggested Plugins

6) Create First Admin User

Create First Admin User

Congratulations🥳

Congratulations

#jenkins #devops #cloud #digitalocean

Top comments (0)