aboutsummaryrefslogtreecommitdiffstats
path: root/README-WALKTHROUGHS.md
blob: def4167a5d26220ce2c0031a32dfa8d27ce0a9c1 (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
######################################################################
# Installing buildbot without ability to edit UI
######################################################################

sudo adduser pokybuild3
sudo -iu pokybuild3
pip3 install buildbot
PATH=$PATH:/.local/bin

[FIXME]


######################################################################
# To edit/rebuild UI Plugin
######################################################################

# Ensure prereqs are installed
apt install sudo git build-essential python3-pip virtualenv enchant npm

# Create a new user
sudo adduser pokybuild3
sudo -iu pokybuild3

# Clone the buildbot UI
git clone http://github.com/buildbot/buildbot.git

# Build up the right virtualenv
cd buildbot
make virtualenv VENV_PY_VERSION=python3.6 VENV_NAME=testenv
. testenv/bin/activate

# Build the web frontend components
make frontend VENV_PY_VERSION=python3.6 VENV_NAME=testenv

# Clone our plugin and rebuild it
cd ~
git clone https://git.yoctoproject.org/git/yocto-autobuilder2 yoctoabb
cd ~/yoctoabb/yocto_console_view
python3 setup.py build


######################################################################
# To build/run/edit a test autobuilder
######################################################################

# Create a new user
sudo adduser pokybuild3
sudo -iu pokybuild3

# Clone the buildbot UI
git clone http://github.com/buildbot/buildbot.git

# Build up the right virtualenv
cd buildbot
make virtualenv VENV_PY_VERSION=python3.6 VENV_NAME=testenv
. testenv/bin/activate

# Build the web frontend components
pip install --editable pkg
pip install --editable master/
pip install --editable www/waterfall_view/
pip install --editable www/grid_view/
make frontend VENV_PY_VERSION=python3.6 VENV_NAME=testenv

# Create controller and worker
buildbot create-master ~/yocto-controller
buildbot-worker create-worker ~/yocto-worker localhost example-worker pass --umask=0o22

# Setup the controller
cd ~/yocto-controller
git clone https://git.yoctoproject.org/git/yocto-autobuilder2 yoctoabb
ln -rs yoctoabb/master.cfg master.cfg
<edit master.cfg services.py www.py config.py>
<add ~/config-local.json with contents:>
{
    "BASE_HOMEDIR" : "/home/pokybuild3",
    "BASE_SHAREDDIR" : "/home/pokybuild3/shareddir"
}
export ABHELPER_JSON="config.json /home/pokybuild3/config-local.json"
(or set env in config.py for builders)

# Rebuild our plugin
cd ~/yocto-controller/yoctoabb/yocto_console_view
python3 setup.py build

# Setup the helper
cd ~
git clone https://git.yoctoproject.org/git/yocto-autobuilder-helper

# Startup commands (janitor, controller, worker)
~/yocto-autobuilder-helper/janitor/ab-janitor &
cd buildbot
. testenv/bin/activate
buildbot start ~/yocto-controller
buildbot-worker start ~/yocto-worker