Skip to content

Commit b61b7f1

Browse files
committed
feat(setup-node.sh): remove user intervention setting up new nodes
1 parent 27d820d commit b61b7f1

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

tests/bin/setup-node.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Preps a Ubuntu 14.04 box with requirements to run as a Jenkins node to https://ci.deis.io/
44
# Should be run as root.
55

6+
# fail on any command exiting non-zero
7+
set -eo pipefail
8+
9+
apt-get install -y apt-transport-https
10+
611
# install docker
712
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
813
sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@@ -13,18 +18,17 @@ apt-get install -yq openjdk-7-jre-headless
1318

1419
# install virtualbox
1520
apt-get install -yq build-essential libgl1-mesa-glx libpython2.7 libqt4-network libqt4-opengl \
16-
libqtcore4 libqtgui4 libsdl1.2debian libvpx1 libxcursor1 libxinerama1 libxmu6
17-
wget http://download.virtualbox.org/virtualbox/4.3.22/virtualbox-4.3_4.3.22-98236~Ubuntu~raring_amd64.deb
21+
libqtcore4 libqtgui4 libsdl1.2debian libvpx1 libxcursor1 libxinerama1 libxmu6 psmisc
22+
wget -nv http://download.virtualbox.org/virtualbox/4.3.22/virtualbox-4.3_4.3.22-98236~Ubuntu~raring_amd64.deb
1823
dpkg -i virtualbox-4.3_4.3.22-98236~Ubuntu~raring_amd64.deb && \
1924
rm virtualbox-4.3_4.3.22-98236~Ubuntu~raring_amd64.deb
2025

2126
# install vagrant
22-
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb
27+
wget -nv https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb
2328
dpkg -i vagrant_1.7.2_x86_64.deb && rm vagrant_1.7.2_x86_64.deb
24-
# as the jenkins user, do "vagrant plugin install vagrant-triggers"
2529

2630
# install go
27-
wget -qO- https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xz
31+
wget -nv -O- https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xz
2832
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
2933
echo "You must reboot for the global $PATH changes to take effect."
3034

@@ -34,15 +38,20 @@ curl -sSL https://raw.githubusercontent.com/pypa/pip/6.0.8/contrib/get-pip.py |
3438
pip install virtualenv
3539

3640
# create jenkins user and install node bootstrap script
37-
useradd -G docker,vboxusers -s /bin/bash -m jenkins
41+
useradd -G docker,vboxusers -s /bin/bash --system -m jenkins
3842
mkdir -p /home/jenkins/bin
39-
wget -x -O /home/jenkins/bin/start-node.sh \
43+
wget -nv -x -O /home/jenkins/bin/start-node.sh \
4044
https://raw.githubusercontent.com/deis/deis/master/tests/bin/start-node.sh
4145
chmod +x /home/jenkins/bin/start-node.sh
4246
chown -R jenkins:jenkins /home/jenkins/bin
4347

48+
# as the jenkins user, do "vagrant plugin install vagrant-triggers"
49+
su - jenkins -c "vagrant plugin install vagrant-triggers"
50+
4451
# TODO: instructions to download and install fleetctl
4552

53+
/etc/init.d/postgresql start
54+
4655
# set up PostgreSQL role for controller unit tests
4756
sudo -u postgres psql -c "CREATE ROLE jenkins WITH CREATEDB LOGIN;"
4857
sudo -u postgres psql -c "CREATE DATABASE deis WITH OWNER jenkins;"

0 commit comments

Comments
 (0)