]>
Commit | Line | Data |
---|---|---|
a6dc2ede ER |
1 | Installation instructions. |
2 | ||
3 | 1. Accounts | |
4 | ||
5 | Builder needs account for it's needs. Account should be shared for all builders, | |
6 | which build binary packages on specified host. This allows for better | |
7 | resources managment (hint: variable job_slots in configuration). | |
8 | ||
9 | However, SRPMS builder should use different account. | |
10 | ||
11 | We will call accounts: bin_builder and srpms_builder. | |
12 | ||
13 | 2. Requirements | |
14 | ||
15 | Both: | |
16 | sending mail | |
17 | gpg | |
18 | scp or/and rsync (sending buildlogs and files to ftp) | |
19 | access to chroots | |
20 | ||
21 | srpms_builder: | |
22 | mail box + procmail | |
23 | posibillity to serve files via http | |
24 | cvs connections | |
25 | ftp or http connections (distfiles) | |
26 | ||
27 | bin_builder: | |
28 | http connections | |
29 | ||
30 | access to chroots via sudo (sudoers): | |
31 | ||
32 | srpms_builder ALL = NOPASSWD: \ | |
33 | /usr/sbin/chroot /path/to/chroot * | |
34 | ||
35 | bin_builder ALL = NOPASSWD: \ | |
36 | /usr/sbin/chroot /path/to/chroot1 *, \ | |
37 | /usr/sbin/chroot /path/to/chroot2 * | |
38 | ||
39 | 3. Scripts installations | |
40 | ||
fd8aef53 | 41 | Scripts *have* to be in ~/pld-builder.new/, checked out from CVS. |
a6dc2ede | 42 | |
c7469f55 | 43 | 4. Installation of queues |
a6dc2ede ER |
44 | |
45 | cd ~/pld-builder.new | |
46 | ./admin/fresh-queue.sh y | |
47 | ||
48 | 5. Chroots setup | |
49 | poldek.conf: | |
50 | ||
51 | source = local,pri=1 /spools/ready/ | |
c4bb8d09 AM |
52 | source = main-test,noauto,pri=2 ftp://ftp.pld-linux.org/dists/th/test/i686/RPMS/ |
53 | source = main-ready,pri=3 ftp://ftp.pld-linux.org/dists/th/ready/i686/RPMS/ | |
54 | source = main-ug,pri=4 ftp://ftp.pld-linux.org/dists/th/updates/i686/RPMS/ | |
55 | source = main,pri=5 ftp://ftp.pld-linux.org/dists/th/PLD/i686/RPMS/ | |
a6dc2ede ER |
56 | particle_install = no |
57 | greedy = yes | |
58 | rpmdef = _excludedocs 1 | |
59 | cachedir = /spools/poldek/ | |
60 | keep_downloads = yes | |
61 | ||
62 | Preinstalled packages: | |
63 | ||
64 | bin_builder: | |
65 | rpm-build poldek shadow net-tools which | |
66 | ||
67 | srpms_builder: | |
68 | bin_builder+ | |
69 | cvs wget rpm-perlprov rpm-php-pearprov rpm-pythonprov | |
70 | ||
71 | both: user builder | |
72 | ||
73 | both: ~builder/rpm/{SPECS,SOURCES,RPMS,SRPMS,BUILD} | |
74 | ||
75 | srpms_build: additionally has to have SPECS and SOURCES checkouted from CVS | |
76 | in SPECS it has to have builder, additional-md5sum and mirrors | |
77 | ||
78 | both: folders /spools/poldek/ /spools/ready/ | |
79 | ||
80 | Wszystko to robi automagicznie admin/install-chroot.sh | |
81 | All that stuff can be done automaticly with admin/install-chroot.sh. | |
82 | ||
83 | [[...]] | |
84 | ||
85 | ||
86 | 100. cron jobs | |
87 | ||
88 | srpms_builder: | |
89 | src-builder.sh | |
90 | file-sender.sh | |
91 | ||
92 | bin_builder: | |
93 | request-fetcher.sh | |
94 | load-balancer.sh | |
95 | file-sender.sh | |
96 | ||
97 | *Very* good idea is to execute tmpwatch for each builder.: | |
98 | 5 3 * * * sudo chroot $HOME/chroots/chroot-i686/ tmpwatch -m 200 /spools/ready/ | |
99 | (autentic example). Of course, example cron item above should be placed for each chroot | |
100 | inside account. Tmpwatch have to be installed inside. In other case, You have to clean it | |
101 | manually. | |
102 | ||
103 | Example for bin builder: | |
104 | * * * * * $HOME/pld-builder.new/bin/request-fetcher.sh | |
105 | * * * * * $HOME/pld-builder.new/bin/load-balancer.sh | |
106 | * * * * * $HOME/pld-builder.new/bin/file-sender.sh | |
107 | 30 3 * * * $HOME/pld-builder.new/bin/maintainer.sh | |
108 | ||
109 | Example for source builder: | |
110 | * * * * * $HOME/pld-builder.new/bin/src-builder.sh | |
111 | * * * * * $HOME/pld-builder.new/bin/file-sender.sh | |
112 | 30 3 * * * $HOME/pld-builder.new/bin/maintainer.sh | |
113 | ||
114 | 101. procmail | |
115 | ||
116 | srpms_builder: | |
117 | ||
118 | :0 | |
119 | * ^X-New-PLD-Builder: | |
120 | |~/pld-builder.new/bin/request-handler.sh | |
121 | ||
122 | :0 | |
123 | !admin@somehere | |
124 | ||
125 | bin_builder | |
126 | ||
127 | :0 | |
128 | !admin@somwhere | |
129 | ||
130 | 102. httpd | |
131 | ||
fd8aef53 | 132 | Directory ~/pld-builder.new/www/, in srpm_builder account, have to be accessibble |
a6dc2ede ER |
133 | via http (control_url in bin_builder configuration) |
134 | ||
135 | 103. src builder | |
136 | ||
137 | Automat can send informaction (notify) between bin-builders and src-builders | |
138 | via e-mail or via http (POST METHOD). | |
139 | ||
140 | To use HTTP POST, one should run (src_builder side): | |
141 | ./request_handler_server.py | |
142 | On other side (bin-builders): | |
143 | notify_url = http://some-server.pl:1234/ | |
144 |