Skip to content

Instantly share code, notes, and snippets.

@silvae86
Last active December 13, 2016 17:33
Show Gist options
  • Save silvae86/b5a8e945f47383ec79a36ce9c1829d16 to your computer and use it in GitHub Desktop.
Save silvae86/b5a8e945f47383ec79a36ce9c1829d16 to your computer and use it in GitHub Desktop.
Interesting locations for Jenkins install on Ubuntu

Install:

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get -y install jenkins

Logfile:

tail -f /var/log/jenkins/jenkins.log

JournalCtl:

sudo journalctl -f

Config file:

sudo vim /etc/default/jenkins

Listening Port in config file:

HTTP_PORT=8001

Install VirtualBox + Vagrant (Repositories)

sudo apt-get install virtualbox
sudo apt-get install vagrant
sudo apt-get install virtualbox-dkms

Install Ubuntu (From Debs - Recommended)

#UBUNTU 14.04
wget http://download.virtualbox.org/virtualbox/5.1.10/virtualbox-5.1_5.1.10-112026~Ubuntu~trusty_amd64.deb
sudo dpkg -i virtualbox-5.1_5.1.10-112026~Ubuntu~trusty_amd64.deb

#UBUNTU 16.04
wget http://download.virtualbox.org/virtualbox/5.1.10/virtualbox-5.1_5.1.10-112026~Ubuntu~xenial_amd64.deb
sudo dpkg -i 5.1.10/virtualbox-5.1_5.1.10-112026~Ubuntu~xenial_amd64.deb


wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb
sudo dpkg -i vagrant_1.9.1_x86_64.deb

Configure security

Jenkins Script (gonna give up on this and use TeamCity, as this garbage requires TTY to interact with Vagrant. Nice knowin' ya, Jenkins)

 #!/bin/bash
ps -p $$
printf "SHELL"
if [ "${BRANCH_NAME}" != "" ]
then
	rm -rf dendro-install_${BRANCH_NAME}
	git clone https://github.com/feup-infolab-rdm/dendro-install dendro-install_${BRANCH_NAME}
	cd dendro-install_${BRANCH_NAME}
	/bin/bash ./install.sh -b ${BRANCH_NAME}
else
	rm -rf dendro-install
	git clone https://github.com/feup-infolab-rdm/dendro-install dendro-install
	cd dendro-install
	/bin/bash ./install.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment