Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jenkins can be run in all operating systems, and in Docker containers.  Follow the instructions here: https://jenkins.io/download/


Azure Cloud

You can also find it as a template in the Azure marketplace : https://azuremarketplace.microsoft.com/en-us/marketplace/apps/azure-oss.jenkins?tab=Overview and instructions on how to use it here: https://docs.microsoft.com/en-us/azure/jenkins/

...

Install Via Docker Container


Pull the Jenkins image

Code Block
themeFadeToGrey
titleGet Jenkins Image
docker pull jenkins/jenkins:lts


Run Jenkins and expose it on port 8080


Code Block
themeFadeToGrey
titleRun Jenkins
docker run --detach --publish 8080:8080 --volume jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts


Connects to the "Jenkins" container and executes the "cat <filename>" command to get the initial password.   After this, you can connect to http://localhost:8080 and log in with the password shown.  If you are inside a VM, make sure you use the browser in the VM and not your host.  Alternatively, you can provide the VM's hostname followed by :8080 (eg, http://ubuntu1804lts:8080)


Code Block
themeFadeToGrey
titleExecute A Command In Container
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword


...

Install In Ubuntu


Code Block
themeFadeToGrey
titleCommands To Install Jenkins
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add -

echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" | tee -a /etc/apt/sources.list 

apt-get update && apt-get upgrade -y

apt-get -y install openjdk-8-jdk

apt-get -y install jenkins 

cat /var/lib/jenkins/secrets/initialAdminPassword