Jenkins CI/CD

Jenkins is an open-source automation server used to build, test, and deploy software projects, enabling continuous integration and continuous delivery (CI/CD). The base Debian 12 server also has security features, including Nginx , UFW Host Firewall , OSSEC HIDS , Crowdsec IPS , Auditd , and Automate updates.

Software Included

Package Version License
Jenkins 2.452.1 MIT
Nginx 1.26.1 BSD

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the Jenkins CI/CD 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Jenkins CI/CD Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "decyphertekio-jenkinscicd"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying Jenkins CI/CD

SSH Into server:

  • If using ssh keys:
  • Linux + Mac - add .pem key to ~/.ssh/id_rsa > change permisisons > chmod 400

id_rsa

  • If using putty or mobaxterm make sure to convert .pem to .ppk using puttygen.
  • Linux + Mac - ssh root@ip-of-server
  • Windows - utilize putty or mobaxterm

Login to Jenkins:

  • Jenkins uses PAM Authentication, you need to make a user.
  • Ex: ssh into server > root@ip-of-server
  • Create a new user to login to jenkins :
  • sudo useraddd username && sudo passwd username
  • Login to Jenkins > https://ip-of-server
  • Login with username and password set