May 3, 2020
· devops ci/cd
Jenkins Install notes
Master on ubuntu 18.04
apt install openjdk-8-jdk
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
apt update
apt-get install jenkins
systemctl status jenkins
systemctl status jenkins
pass needed for initial install prompt on web ui
cat /var/lib/jenkins/secrets/initialAdminPassword
Jenkins user
su - jenkins
ssh-keygen -t rsa # generate ssh key
Slave on ubuntu
install java
sudo apt install openjdk-8-jdk
create jenkins user
useradd -m -s /bin/bash jenkins
passwd Jenkins
ssh-copy-id from jenkins master to slave nodes
install docker
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt-cache policy docker-ce # verify using docker repo
sudo apt install docker-ce
sudo usermod -aG docker jenkins # allow jenkins user to use docker images