fixing comment about dates.
[monkeysphere.git] / website / mirrors.mdwn
index 342abfaa352023a3826ca1c055f39070ba2e18a7..44f50d996eda0253e03201e1741d076ce71e011f 100644 (file)
@@ -8,64 +8,91 @@ We're mirrored on several servers. Rather than using ikiwiki's [pinger/pingee
 approach to distribution](http://ikiwiki.info/tips/distributed_wikis/), we've
 opted for a method that uses ssh.
 
-The steps for creating a new mirror are:
+## Initial steps to take on the mirror server ##
 
- * Add etch-backports to your /etc/apt/sources.list:
-               deb http://www.backports.org/debian etch-backports main contrib non-free
- * Add the following lines to your /etc/apt/preferences file:
-               Package: ikiwiki
-               Pin: release a=etch-backports
-               Pin-Priority: 999
+Add etch-backports to your /etc/apt/sources.list:
 
-               # needed by ikiwiki
-               Package: libcgi-formbuilder-perl
-               Pin: release a=etch-backports
-               Pin-Priority: 999
-               
-               Package: git-core 
-               Pin: release a=etch-backports
-               Pin-Priority: 999
-       * Install git-core and ikiwiki
+    deb http://www.backports.org/debian etch-backports main contrib non-free
 
-               aptitude update; aptitutde install git-core ikiwiki
+Add the following lines to your /etc/apt/preferences file:
 
-       * Create a new user. Change the new users shell to git-shell:
+    Package: ikiwiki
+    Pin: release a=etch-backports
+    Pin-Priority: 999
 
-               adduser -s /usr/bin/git-shell <username>
+    # needed by ikiwiki
+    Package: libcgi-formbuilder-perl
+    Pin: release a=etch-backports
+    Pin-Priority: 999
+    
+    Package: git-core 
+    Pin: release a=etch-backports
+    Pin-Priority: 999
 
-       * Add webmaster@george's public key to this user's ~/.ssh/authorized_keys file
+Install git-core and ikiwiki
 
-       * Add web site configuration that the user has write access to. If you are using Apache, include the following rewrite:
+    aptitude update; aptitutde install git-core ikiwiki
 
-               RewriteEngine On
-               RewriteCond %{HTTP_HOST} !^(YOURHOSTNAME|web)\.monkeysphere\.info$ [NC]
-               RewriteCond %{HTTP_HOST} !^$
-               RewriteRule ^/(.*) http://web.monkeysphere.info/$1 [L,R]
+Create a new user. Change the new users shell to git-shell:
 
-       * Upload and edit ikiwiki.setup.sample from the docs directory
-       * As the new user, create two new git repos
+    adduser -s /usr/bin/git-shell <username>
 
-               mkdir monkeysphere.git; cd monkeysphere.git; git init --bare; cd ../
-               git clone monkeysphere.git # this will create a second git repo called monkeysphere
+Add webmaster@george's public key to this user's ~/.ssh/authorized_keys file
 
-       * Change the mode of monkeysphere.git/hooks/post-receive to 755
+Add web site configuration that the user has write access to. If you are using Apache, include the following rewrite:
 
-               chmod 755 monkesphere.git/hooks/post-receive
+    RewriteEngine On
+    RewriteCond %{HTTP_HOST} !^(YOURHOSTNAME|web)\.monkeysphere\.info$ [NC]
+    RewriteCond %{HTTP_HOST} !^$
+    RewriteRule ^/(.*) http://web.monkeysphere.info/$1 [L,R]
 
-       * Edit the file so that it executes the post-receive hook ikiwiki generates (as you specified in the ikiwiki.setup file)
+Upload and edit ikiwiki.setup.sample from the docs directory
 
-The steps to be taken on the mirror site should now be complete. The following steps should be taken by a Monkeysphere admin user:
+As the new user, create a git repo
 
- * Add a new dns record for SERVERNAME.monkeysphere.info. 
- * Test the ssh connection by logging in as webmaster@george.riseup.net
- * Add the new server as a remote on webmaster@george.riseup.net:monkeysphere.git
+    mkdir monkeysphere.git; cd monkeysphere.git; git init --bare;
 
-               cd ~/monkeysphere.git
-               git add remote SERVERNAME USER@SERVERNAME.monkeysphere.info:/path/to/repo
 
- * Test:
+## Initial Admin steps to take to enable the configuration ##
 
-               git push SERVERNAME
+Add a new dns record for SERVERNAME.monkeysphere.info. 
 
+Test the ssh connection by logging in as webmaster@george.riseup.net
+
+Add the new server as a remote on webmaster@george.riseup.net:monkeysphere.git
+
+    cd ~/monkeysphere.git
+    git add remote SERVERNAME USER@SERVERNAME.monkeysphere.info:/path/to/repo
+
+Modify ~/monkeysphere.git/config, so the new repo stanza looks like this:
+
+    [remote "SERVERNAME"]
+               url = USER@SERVERNAME.monkeysphere.info:monkeysphere.git
+               push = +refs/heads/master
+               skipDefaultUpdate = true
+
+Test:
+
+    git push SERVERNAME
+
+
+## Final steps to take on mirror server ##
+
+At this point, you should have a populated git repo in your
+monkeyshere.git directory. 
+
+Change the mode of monkeysphere.git/hooks/post-receive to 755
+
+    chmod 755 monkesphere.git/hooks/post-receive
+
+Edit the file so that it executes the post-receive hook ikiwiki generates (as
+you specified in the ikiwiki.setup file)
+
+Next, clone the repository:
+
+    clone monkeysphere.git monkeysphere
+
+And lastly, run ikiwiki manually to generate the post-receive hook:
+
+    ikiwiki --setup ikiwiki.setup
 
-