Installing jenkins is quite simple. The easiest way to install it is through docker. You can check the official documentation for more details. In this documentation I will share with you what I did to install jenkins and setup my ci pipelines.
There are two kinds of versioning supported by jenkins long term support and regular release. You can directly install and run jenkins as war. Here we will try to use the container concept and use docker to help us install jenkins and boot the same.
Checkout the documentation at https://www.jenkins.io/doc/book/installing/. I tried replicating the steps of On macOS and Linux
I tried to install the regular release(2.252) and exposed jenkins with 49000 port. The command to do so (step 4 from documentation)
docker container run --name jenkins-2.252 --rm --detach \
--network jenkins --env DOCKER_HOST=tcp://docker:2376 \
--env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 \
--volume jenkins-data:/var/jenkins_home \
--volume jenkins-docker-certs:/certs/client:ro \
--publish 49000:8080 --publish 50000:50000 jenkins/jenkins:2.252
You would then need to perform post-installation setup
Go to http://localhost:49000
if you would like to follow the logs you can try this command
docker logs --follow jenkins-2.252
Head on over to https://ngrok.com/ and signup for an account, using whichever method you choose. Then you should be greeted with the screen below showing how to unzip and run it.
Start your ngrok with the following command
./ngrok http 49000
This would output something like
ngrok by @inconshreveable
Session Status online
Account Paul Williams (Plan: Free)
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://dfghfdhqw4.ngrok.io -> http://localhost:49000
Forwarding https://sdfsdfsdf.ngrok.io -> http://localhost:49000
Connections ttl opn rt1 rt5 p50 p90
32 0 0.08 0.07 9.42 14.31
HTTP Requests
-------------
Now you can test if the requests are being forwarded to with https://sdfsdfsdf.ngrok.io
and see if your jenkins page is rendered.