Last active
August 29, 2015 14:06
-
-
Save int128/1ca30b656ad90c504998 to your computer and use it in GitHub Desktop.
Setting up Jenkins slave on Digital Ocean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fallocate -l 4G /swapfile | |
chmod -v 600 /swapfile | |
mkswap /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab | |
swapon -a | |
free | |
groupadd -g 900 jenkins | |
useradd -m -u 900 -g 900 -G docker jenkins | |
sudo -u jenkins -i mkdir -v -m 700 .ssh | |
sudo -u jenkins -i tee .ssh/authorized_keys < .ssh/authorized_keys | |
sudo -u jenkins -i chmod -v 600 .ssh/authorized_keys | |
curl -L -C - -b "oraclelicense=accept-securebackup-cookie" -O http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz | |
tar zxf jdk-*.tar.gz | |
rm -v jdk-*.tar.gz | |
mv -v jdk* /usr/local/java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment