It's pretty easy to get started with a Jenkins instance on Oracle Container Cloud



Setup Jenkins service


You can leverage the out-of-the-box Service (name Jenkins) provided in OCC or create your own. In this example, we will be creating a new service (name yet-another-jenkins)



Use the existing Docker image or another image (tag) of your choice (e.g. from Docker Hub)


Map volumes


If you want to save your Jenkins data (e.g. plugins, configuration etc.) after container restart, you would need map the container path to a persistent volume on your host container


The Docker Hub Jenkins images stores data in /var/jenkins_home

This can be done easily since Oracle Container Cloud allows SSH access into the worker nodes as well (in addition to the Manager node)


All you need to do is the following


SSH into your worker node


More details here


Create the Jenkins data directory


This needs to be done on the worker node and permissions need to be assigned



cd /home/opc
mkdir jenkins
sudo chmod 777 jenkins


Configure the volume in the OCCS Jenkins service


More info here



Deploy the service in OCC

That's it.. Now just click Deploy to start your Jenkins container. You should see it in the Deployments list



Get started


Get the administrator password


Access the running Jenkins container in OCC and click on View Logs (scroll down to see the password)



Access Jenkins


The Jenkins container exposes port 9002 (by default).Just browse to http://<occs-host-ip>:9002/ and enter the password to get started



Configure Jenkins as per your requirements....



**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.