Docs
Search…
Jenkins
The installation instructions may become out of date at any time due to updates to Jenkins. Feel free to "Google it" as a supplement to this guide.
1. Setup Debian antlet
Login to antMan and spin up an Debian LXC antlet.
If you are going to run your builds on this Jenkins antlet, which we will be in this tutorial, be sure to allocate the appropriate amount of RAM and vCPUs for your build.
SSH into your Antsle then your Debain antlet
1
ssh <username>@<hostname>.local
2
ssh [email protected]<antlet-ip>
Copied!
The default root password is antsle
Make sure you are on the latest version:
1
apt update
2
apt upgrade
Copied!
At the time of this writing the latest stable Debian is 9.8
2. Install Jenkins
First, we need to install java on the antlet ad Jenkins is a Java application.
1
apt install openjdk-8-jdk
Copied!
Import the GPG keys of the Jenkins repository
1
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | apt-key add -
Copied!
When your key is imported, we want to add the Jenkins repository to the antlet
1
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Copied!
Now lets update the package list and install the latest version of Jenkins
1
apt update
2
apt install jenkins
Copied!
Start the Jenkins service and systemctl enable jenkins
1
systemctl start jenkins
Copied!
We also want to have it automatically start on boot
1
systemctl enable jenkins
Copied!
3. Make Jenkins Accessible
1. Accessing by Domain Name
If you want to access your Jenkins on a specific url (which is recommended) have a look at our accessing antlets by domain name page.
2. Accessing by Private IP
We could also add a vNIC to the antlet in antMan so that the antlet can acquire a IP from our local network.
In antMan, click on the antlet, Go to “Virtual Network”, and click on “New virtual NIC”. Choose which physical interface you want it to route to, this will be br0 by default.
Now stop the antlet, and start again.
Now ssh back into the antlet. Check the name of the new interface that we have assigned, its most likely eth1.
1
ifconfig -a
Copied!
And use your favourite editor to edit the interfaces file.
1
nano /etc/network/interfaces
Copied!
You might want to set it to a static IP, but thats particular to your network so we will just set it to dhcp here. Your file should now look like this:
1
auto lo
2
iface lo inet loopback
3
4
auto eth1
5
iface eth1 inet dhcp
6
7
auto eth0
8
iface eth0 inet dhcp
Copied!
Restart the network.
1
service networking restart
Copied!
Run the following command and Note the new local network IP that is assigned to to our new nic.
1
ip -4 -o addr show eth1 | awk '{print $4}' | cut -d "/" -f 1
Copied!
You can now access Jenkins in your web browser with that IP on port 8080. For example:
1
http://192.168.0.105:8080
Copied!
3. Configure Jenkins
It will then prompt you for the password initialAdminPassword which you can with the following command:
1
cat /var/lib/jenkins/secrets/initialAdminPassword
Copied!
You can then go through the options of installing selected plugins, set up new accounts, etc.
Once you get to the "Instance Configuration" page you can put it in your domain if you it set up a domain above. If you are accessing it with the private IP, then just set that pre-populated IP.
Congratulations! You now have Jenkins running on your own Private Cloud.
Jenkins running on your Antsle
To change the admin password, click on the "admin" dropdown on the top right. Then hit "Configure" on the left, and scroll down to change the password.
Happy Building!
Copy link