How to Use Jenkins - A Basic Approach

Deploy your Jenkins instance first.

We are going to use password login for automatic deployment, note that it’s not the most secure way, but for simplicity for now.

CHANGE SSH PORT - FOR DESTINATION SERVER

1
sudo vim /etc/ssh/sshd_config

Find out the line #port 22 and uncomment it to change into port ${YOUR_NEW_SSH_PORT}, then reload the sshd service like so:

1
sudo systemctl restart sshd

One more additional step for firewall (ufw in Ubuntu, firewall-cmd in CentOS), but we will refer to tons of materials out there, instead of mentioning it here.

Let's Encrypt Automation - A Right Way in 2021

Install Certbot

Install snapd.

Remove old version of certbot:

sudo apt-get remove certbot
# or
sudo dnf remove certbot

Install certbot:

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Run it!

sudo certbot --nginx

Caution!

In case you have an IP access blocking config in nginx, you need to disable it, temporarily at least.

For example, imagine you have this nginx block for IP access blocking:

1
2
3
4
5
6
server {

  listen 80 default_server;
  return 444;

}

Then disable it like so:

How to Install Vmware-Tools on Manjaro - an Awesome Distro of Arch Linux

One of the popular package managers for Arch Linux is “pacman”.

1
2
3
4
5
sudo pacman -Syu                # Update and upgrade system packages
sudo pacman -S package_name     # Install a new package
sudo pacman -R package_name     # Remove a package
sudo pacman -Rn package_name    # Remove along with backup-ed config files
sudo pacman -Rsu package_name   # Remove along with dependencies

If you do not have wget on your machine, you can install like so:

How to Install the Latest Version of Nginx on Ubuntu Bionic

Nginx.org maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx.

First off, let’s create a repository source file for Nginx with the following command.

1
vim /etc/apt/sources.list.d/nginx.list

Paste in the following two lines to the file:

deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu/ bionic nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx

In order to verify the integrity of packages downloaded from this repository, we need to import Nginx public key using the commands below.

How to Build a CI/CD Pipeline on CircleCI

Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo.

Create a file named “config.yml” in there.

Grab the sample script given by CircleCI platform according to your project type.

  • The first step is to get the building workflow success.
  • The next step is to get the deployment workflow success.

Key point here is writing beautiful shell scripts and using proper orbs.