From e7366bf41f68cfe07e9ea03fc4a398baecbae651 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 4 Feb 2017 09:41:13 +0000 Subject: Initial conversion from MediaWiki, 20170204 --- continuous_integration_debian_wheezy_setup.mdwn | 164 ++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 continuous_integration_debian_wheezy_setup.mdwn (limited to 'continuous_integration_debian_wheezy_setup.mdwn') diff --git a/continuous_integration_debian_wheezy_setup.mdwn b/continuous_integration_debian_wheezy_setup.mdwn new file mode 100644 index 0000000..9127b32 --- /dev/null +++ b/continuous_integration_debian_wheezy_setup.mdwn @@ -0,0 +1,164 @@ +[[!meta title="Continuous Integration Debian Wheezy Setup"]] +[[!meta author="Kyllikki"]] +[[!meta date="2014-12-20T11:46:57Z"]] + + +[[!toc]] + +Debian wheezy (7.0) OS install +------------------------------ + +Install minimal system from netinst CD (attached when VDS is created on +phoenix) Config options: + +- In the "role" selection select "ssh server" and "system utilities" + only. +- The whole disc default partitioning is fine +- The base user the install insists on creating should be the netsurf + user. +- Boot loader in MBR + +Once installed: + +- install sudo package and add netsurf user to sudo group +- edit /etc/inittab comment pty 3 through 6 and uncomment serial T0 + +Packaged Setup for Debian wheezy (7.0) +-------------------------------------- + +on master jenkins use "manage nodes" to create new node. Ensure "remote +fs root" is set to /var/lib/jenkins add variable JENKINS\_HOME set to +/var/lib/jenkins + +As superuser: + +- create jenkins user + +`adduser --system --group --home /var/lib/jenkins/ --disabled-login jenkins` + +- Add CI server repo to slave apt sources + +`echo "deb `[`http://ci.netsurf-browser.org/debian/`](http://ci.netsurf-browser.org/debian/)` wheezy/amd64/" >> /etc/apt/sources.list.d/netsurf-browser.list` + +- update repos + +`apt-get update` + +- install ns-ci-slave package. accept the large package list and the + unsigned package install for gcovr and ns-ci-slave + +`apt-get install ns-ci-slave` + +- edit /etc/default/ns-ci-slave to set the correct url and secret + parameters +- If toolchains are to be built on the node ensure /opt is setup + correctly + +`mkdir -p /opt/netsurf` +`chown jenkins:jenkins /opt/netsurf` + +- become jenkins user + +`su -s/bin/bash - jenkins` + +- create ssh keypair (accept defaults - no password) + +`ssh-keygen -t rsa -C "netsurf@cislave10.netsurf-browser.org"` + +- copy .ssh/id\_rsa.pub from slave to jenkins master node and append + to /home/netsurf/.ssh/authorized\_keys + +`scp /home/jenkins/.ssh/id_rsa.pub netsurf@ci.netsurf-browser.org:cislave10_id_rsa.pub` + +- exit jenkins user shell +- start slave daemon + +`/etc/init.d/ns-ci-slave start` + +Manual Setup of Debian wheezy (7.0) +----------------------------------- + +### required packages + +use apt to install all these. The Netsurf repository has the necessary +updated packages in it and can be accessed by doing the following: + +- Add CI server repo to slave apt sources + +`echo "deb `[`http://ci.netsurf-browser.org/builds/debian/`](http://ci.netsurf-browser.org/builds/debian/)` wheezy/amd64/" >> /etc/apt/sources.list` + +- update repos + +`apt-get update` + +`openjdk-7-jre-headless ` +`screen ` +`build-essential` +`ccache` +`clang` +`git` +`pkg-config` +`check` +`doxygen` +`libjson0-dev (from our repo - needs bugfixes `[`http://ci.netsurf-browser.org/builds/debian/`](http://ci.netsurf-browser.org/builds/debian/)`)` +`libexpat1-dev` +`libxml-perl` +`libxml-xpath-perl` +`lcov` +`gcovr (from our repo)` +`gperf` +`flex` +`bison` +`libpng-dev` +`libjpeg-dev` +`libmozjs185-dev` +`libglib2.0-dev` +`libcurl4-openssl-dev` +`liblcms1-dev` +`libxml2-dev` +`librsvg2-dev` +`libmng-dev` +`libgtk2.0-dev` +`libmozjs-dev` + +### config + +- on master jenkins use "manage nodes" to create new node. Ensure + "remote fs root" is set to /home/netsurf/jenkins +- create netsurf user +- as netsurf user: + - wget + - run screen + - create jenkins-slave.sh + +`#!/bin/bash` + +`java -Djava.awt.headless=true -jar slave.jar -jnlpUrl `[`http://ci.netsurf-browser.org/jenkins/computer/chimera/slave-agent.jnlp`](http://ci.netsurf-browser.org/jenkins/computer/chimera/slave-agent.jnlp)` -secret 0123456789abcdef01234567890abcdef` + +- - run jenkins-slave.sh + - create new screen tab + - create ssh keypair (accept defaults - no password) + +`ssh-keygen -t rsa -C "netsurf@cislave0.netsurf-browser.org"` + +- - copy .ssh/id\_rsa.pub from slave to jenkins master node and + append to /home/netsurf/.ssh/authorized\_keys + +`scp ci.netsurf-browser.org:.ssh/id_rsa.pub .id_rsa.pub` +`cat id_rsa.pub >> .ssh/authorized_keys` + +- - copy .ssh/id\_rsa.pub from master node to slave and append to + /home/netsurf/.ssh/authorized\_keys + - create reverse-ssh.sh (change tunnel port number!) + +`#!/bin/sh` + +`ssh -R 22224:localhost:22 netsurf@ci.netsurf-browser.org 'bash -c "while true; do echo .; sleep 60; done"'` + +- - run reverse-ssh.sh + - on the master create a shell script to use the ssh tunnel + connection, thus firewalls etc are moot as long as the slave can + connect to the master + +`ssh netsurf@localhost -p 22223` + -- cgit v1.2.3