From: Jamie McClelland Date: Wed, 3 Sep 2008 16:27:18 +0000 (-0400) Subject: adding sample ikiwiki setup file and mirrors web page. X-Git-Tag: monkeysphere_0.13-1~13 X-Git-Url: https://codewiz.org/gitweb?p=monkeysphere.git;a=commitdiff_plain;h=39ad3cccd2307fe3c43892376ab1a4e57b53b6d6 adding sample ikiwiki setup file and mirrors web page. --- diff --git a/doc/ikiwiki.setup.sample b/doc/ikiwiki.setup.sample new file mode 100644 index 0000000..97e77c8 --- /dev/null +++ b/doc/ikiwiki.setup.sample @@ -0,0 +1,29 @@ +use IkiWiki::Setup::Standard { + wikiname => "Monkeysphere", + adminemail => 'webmaster@monkeysphere.info', + + srcdir => "/path/to/cloned/monkeysphere/repo/website", + destdir => "/path/to/web/dir", + + url => "http://monkeysphere.info", + + rcs => "git", + + wrappers => [ + { + wrapper => "/path/to/post-receive/hook", + wrappermode => "0755", + } + ], + + rss => 1, + atom => 1, + verbose => 0, + syslog => 0, + + add_plugins => [qw{goodstuff favicon toc sidebar}], + + + tagbase => "tags", + +} diff --git a/website/mirrors.mdwn b/website/mirrors.mdwn new file mode 100644 index 0000000..8445a26 --- /dev/null +++ b/website/mirrors.mdwn @@ -0,0 +1,57 @@ +[[meta title="Mirroring the web site"]] + +In keeping with the philosophy of distributed development, our web site is +stored in our git repositories and converted into html by +[ikiwiki](http://ikiwiki.info/). + +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: + + * 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 + + # 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 + aptitude update; aptitutde install git-core ikiwiki + * Create a new user. Change the new users shell to git-shell: + adduser -s /usr/bin/git-shell + * Add webmaster@george's public key to this user's ~/.ssh/authorized_keys file + * Add web site configuration that the user has write access to. If you are using Apache, include the following rewrite: + RewriteEngine On + RewriteCond %{HTTP_HOST} !^(YOURHOSTNAME|web)\.monkeysphere\.info$ [NC] + RewriteCond %{HTTP_HOST} !^$ + RewriteRule ^/(.*) http://web.monkeysphere.info/$1 [L,R] + * Upload and edit ikiwiki.setup.sample from the docs directory + * As the new user, create two new git repos + mkdir monkeysphere.git; cd monkeysphere.git; git init --bare; cd ../ + git clone monkeysphere.git # this will create a second git repo called monkeysphere + * 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) + +The steps to be taken on the mirror site should now be complete. The following steps should be taken by a Monkeysphere admin user: + + * 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 + * Test: + git pusch SERVERNAME + + +