Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / mirroring / README.md
1 # Mirroring Ceph
2 Ceph is primarily distributed from download.ceph.com which is based in the US.
3
4 However, globally there are multiple mirrors which offer the same content. Often
5 faster than downloading from the primary source.
6
7 Using the script found in this directory you can easily mirror Ceph to your local
8 datacenter and serve packages from there to your servers.
9
10 ## Guidelines
11 If you want to mirror Ceph please follow these guidelines:
12 * Please use a mirror close to you
13 * Do not sync in a shorter interval than 3 hours
14 * Avoid syncing at minute 0 of the hour, use something between 0 and 59.
15
16 ## Mirror script
17 The 'mirror-ceph.sh' script is written in Bash and will use rsync to mirror
18 all the contents to a local directory.
19
20 Usage is simple:
21
22 <pre>
23 ./mirror-ceph.sh -q -s eu -t /srv/mirrors/ceph
24 </pre>
25
26 This example will mirror all contents from the source 'eu' which is *eu.ceph.com*.
27
28 ### Running with CRON
29 The script can easily be run with CRON:
30
31 <pre>
32 13 1,5,9,13,17,21 * * * /home/ceph/mirror-ceph.sh -q -s eu -t /srv/mirrors/ceph
33 </pre>
34
35 This will sync from *eu.ceph.com* on 01:13, 05:13, 09:13, 13:13, 17:13 and 21:13.
36
37 ## Becoming a mirror source
38 If you have spare hardware and resources available you can opt for becoming a mirror
39 source for others.
40
41 A few things which are required:
42 * 1Gbit connection or more
43 * Native IPv4 **and** IPv6
44 * HTTP access
45 * rsync access
46 * 2TB of storage or more
47 * Monitoring of the mirror/source
48
49 You can then run the *mirror-ceph.sh* script and mirror all the contents.
50
51 ### Logs
52 The project wants to analyze the downloads of Ceph a few times a year. From mirrors
53 we expect that they store HTTP access logs for at least 6 months so they can be
54 used for analysis.
55
56 ### DNS
57 Using a DNS CNAME record a XX.ceph.com entry can be forwarded to the server and
58 added to the mirror script.
59
60 You can request such a DNS entry on the ceph mailinglists.
61
62 ### Apache configuration
63 A Apache 2.4 VirtualHost example configuration can be found the Git repository
64 with the name *apache2.vhost.conf*