Document how to fix BASE-IS-OLD
[mirror/dsa-wiki.git] / input / howto / static-mirroring.creole
1 = static mirroring
2
3 The static mirroring system mirrors //components//, i.e. directory trees from
4 their individual //source// hosts via //static-master// hosts to the
5 //static-mirrors//.
6
7 The static-master can be configured per source.  The mirrors are the same set
8 for all components.
9
10 == Adding a new static component
11
12 Using already configured source and master hosts.
13
14 * Pick a component name, e.g., {{{debaday.debian.net}}}
15
16 * Pick/Learn source host, pick a master, and add to {{{dsa-puppet/modules/roles/files/static-mirroring/static-components.conf}}}:
17 {{{
18         # <master>              <service>                       <source host>                   <directory>                             <extra push hosts, comma separated>
19         dillon.debian.org       debaday.debian.net              dillon.debian.org               /srv/debaday.debian.net/htdocs
20 }}}
21
22 * Give sudo to run the right {{{static-update-component}}} to the appropriate group:
23 {{{
24         /usr/sbin/visudo -f dsa-puppet/modules/sudo/files/sudoer
25 }}}
26 and add something like
27 {{{
28         lucas           dillon=(staticsync)             NOPASSWD: /usr/local/bin/static-update-component debaday.debian.net
29 }}}
30
31 * Add the vhost config on mirrors:
32 {{{
33         vi dsa-puppet/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb
34 }}}
35
36 * run puppet on the master, the source, and all the mirrors.  Check {{{dsa-puppet/hieradata/common.yaml}}}.
37
38 == Adding a mirror
39
40 Note:  This might temporarily break apache on the new mirror host.
41
42 * Add host to {{{static_mirror}}} and {{{static_mirror_nopush}}} in {{{hieradata/common.yaml}}}.
43 * Add {{{staticsync}}} group to host's {{{allowedGroups}}} attribute in ldap.
44 * Run puppet twice on new static mirror once staticsync exists.
45 * Run puppet on static masters.
46 * On the static mirror: {{{install -d -o staticsync -g staticsync -m 02755 /srv/static.debian.org}}}.
47 * Run the command from {{{/etc/cron.d/puppet-static-mirror}}} on the mirror.
48 * Make sure apache works on the mirror.  This might require deploying SSL keys.
49 * Remove mirror from {{{static_mirror_nopush}}}.
50 * Run puppet on static masters.
51 * Rotate mirror.