add README for the static mirroring infrastructure
[mirror/dsa-puppet.git] / modules / roles / README.static-mirroring.txt
1 For content which can be served via the Apache web server, possibly with a
2 custom configuration, Debian runs its static mirroring infrastructure.
3
4 The term static mirroring infrastructure includes:
5
6  • components, specifying the data source and other config options.
7    See modules/roles/misc/static-components.yaml
8  • a masterhost for each component, responsible only for distributing data,
9    not for serving data to end users.
10  • machines with the static_mirror role configured in hieradata/common.yaml
11  • a few scripts around rsync(1)
12
13 All of the above is managed via Puppet, for details see the files in
14 modules/roles/*/static-mirroring.
15
16 When data changes, the data source is responsible for running
17 static-update-component, which instructs the masterhost via SSH to run
18 static-master-update-component.
19
20 static-master-update-component transfers a new copy of the source data to the
21 masterhost using rsync(1) and, upon successful copy, swaps it with the current
22 copy.
23
24 The current copy on the masterhost is then distributed to all actual mirrors,
25 again placing a new copy alongside their current copy using rsync(1).
26
27 Once the data successfully made it to all mirrors, the mirrors are instructed
28 to swap the new copy with their current copy, at which point the updated data
29 will be served to end users.