summaryrefslogtreecommitdiff
path: root/continuous_integration/freebsd_setup.mdwn
blob: a1896afb2ba7c787995e2f4ed0a19dbb4a7ab54a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[[!meta title="Continuous Integration FreeBSD Setup"]]
[[!meta author="Kyllikki"]]
[[!meta date="2014-12-21T02:25:02Z"]]


[[!toc]]

Manual setup of FreeBSD 11.1
----------------------------

as per 10.1

login as jenkins user

download slave jar

    curl -o slave.jar http://ci.netsurf-browser.org/jenkins/jnlpJars/slave.jar

create jenkins slave script

    cat << EOF > jenkins-slave.sh
    #!/bin/sh
    
    PATH=$PATH:/usr/local/jdk-1.8.0/bin/
    
    export PATH
    
    java -Djava.awt.headless=true -jar slave.jar -jnlpUrl http://ci.netsurf-browser.org/jenkins/computer/ciworker6/slave-agent.jnlp -secret 1234
    
    EOF
    
    chmod a+x jenkins-slave.sh

create ssh keypair (accept defaults - no password)

    ssh-keygen -t rsa -C "netsurf@ciworker6.netsurf-browser.org"

copy .ssh/id\_rsa.pub from slave to jenkins master node and append to
/home/netsurf/.ssh/authorized\_keys

start slave daemon in screen

Manual setup of FreeBSD 10.1
----------------------------

Install VM from ISO the usual 1G of RAM and 40G of disc is sufficient.
The install will ask for root password, also create a jenkins user and
give it a password and home dir of /var/lib/jenkins .

I had lots of issues trying to get ps2 mouse support working, the usb
mouse did work but a CI slave does not need it.

enable serial console

    echo 'console="comconsole"' >> /boot/loader.conf

ensure pkg-config is replaced by the freebsd equivalent

    pkg set -o devel/pkg-config:devel/pkgconf
    pkg install -f devel/pkgconf

### required packages

Ensure all ports were added in the install or mess with ports as needed

The first run of the pkg command will prompt you to install it.

    pkg install curl

is a good starting place.

Required packages:

    git
    gmake
    bash
    ccache
    flex
    bison
    png
    jpeg
    wget
    gtk2
    openssl
    p5-HTML-Parser
    screen
    gperf
    rsync
    openjdk
    vim-console

vim-console is required for the xxd tool

### config

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 on slave:

-   create jenkins user

`adduser -home /var/lib`