source: project/wiki/running-an-egg-mirror @ 36650

Last change on this file since 36650 was 31126, checked in by Mario Domenech Goulart, 6 years ago

Properly capitalize CHICKEN on the wiki directory (only first level).

I used the following shell script to change things:

while IFS= read -d $'\0' -r file ; do

sed -i 's/Chicken/CHICKEN/g' "$file"

done < <(find wiki -maxdepth 1 -type f -print0 )

Some files have been manually reverted after that, since some
substitutions don't apply:

  • friedly-chicken (repl banner)
  • survey2011 (Chicken in URI paths)
  • chickenista-guide (Chickenista)

I hope the link canonicalization thing will be on my side.

File size: 1.5 KB
Line 
1== Running an egg mirror
2
3Running your own egg mirror is quite simple. All you need is a Web server that will run CGIs, and the ability to run cron jobs, on a Unix shell account.
4
5Install the [[eggs|henrietta]] and [[eggs|henrietta-cache]] eggs.
6
7Create a directory to store the cache in. Let's call it ~chicken/cache.
8
9Create a cron job to run the following daily:
10
11<enscript highlight="shell">
12henrietta-cache -c ~chicken/cache -e https://anonymous@code.call-cc.org/svn/chicken-eggs/release/4/egg-locations
13</enscript>
14
15Run it once by hand to initially populate the cache (this will take a while the first time, but subsequent runs are much faster, as it only processes updated or added eggs).
16
17That creates the cache directory. Now we need to set up henrietta itself, the CGI that serves eggs from the cache.
18
19Place the following into {{henrietta.cgi}} somewhere your Web server will process it as a CGI:
20
21<enscript highlight="shell">
22#!/bin/sh
23
24export EGG_REPOSITORY=~chicken/cache
25export LOGFILE=~chicken/henrietta-cache.log
26
27exec henrietta -l "$EGG_REPOSITORY" -t local 2>>"$LOGFILE"
28
29</enscript>
30
31Make sure to mark it executable!
32
33You will now be able to install eggs from your mirror, with a command like:
34
35<enscript highlight="shell">
36chicken-install -l http://chicken-mirror.example.com/henrietta.cgi -t http <name of egg>
37</enscript>
38
39If you would like to help the CHICKEN community by offering your mirror up for public usage, please contact [[maintainers|the CHICKEN core team]]. Thanks!
Note: See TracBrowser for help on using the repository browser.