]> sipb.mit.edu Git - ikiwiki.git/commitdiff
amazon s3 support implemented and kinda working
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 8 May 2008 03:15:43 +0000 (23:15 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 8 May 2008 03:15:43 +0000 (23:15 -0400)
pruning not yet implemented, however

Bundle/IkiWiki/Extras.pm
IkiWiki/Render.pm
doc/ikiwiki.setup
doc/plugins/amazon_s3.mdwn
docwiki.setup

index a9f7372150aeb2e9be9d697377a96c7268040ad5..2c259f20405b60c99edbf8b654f6ae614ae9149c 100644 (file)
@@ -27,6 +27,7 @@ Text::Typography
 Text::Textile
 Text::WikiFormat
 XML::Feed
+Net::Amazon::S3
 
 =head1 AUTHOR
 
index 959279fc8a906508db1d1b8561cd390e5cc62326..8591731dc3a21cff9009d32f0b8ccdf4447f7c40 100644 (file)
@@ -214,7 +214,7 @@ sub render ($) { #{{{
                        if (link($srcfile, $config{destdir}."/".$file)) {
                                return;
                        }
-                       # if hardlink fails, fall back top copying
+                       # if hardlink fails, fall back to copying
                }
                
                my $srcfd=readfile($srcfile, 1, 1);
index a151050e734665cf2b0f1351525f82049ab00ef7..997dcd18e84d3a4cc0919812d28692edcdc28db6 100644 (file)
@@ -171,4 +171,16 @@ use IkiWiki::Setup::Standard {
        # For use with the pinger plugin, how many seconds to wait before
        # timing out.
        #pinger_timeout => 15.
+       
+       # For use with the amazon S3 plugin, your public access key id.
+       #amazon_s3_key_id => 'XXXXXXXXXXXXXXXXXXXX',
+       # And a file holding your secret key. This file *must* not be
+       # readable by others!
+       #amazon_s3_key_file => "/home/me/.hide/.s3_key
+       # The globally unique name of the bucket to use to store the wiki.
+       #amazon_s3_bucket => "mywiki",
+       # A prefix to prepend to each page name.
+       #amazon_s3_prefix => "wiki/",
+       # Uncomment to use the S3 European datacenter.
+       #amazon_s3_location => "EU",
 }
index 855569b42d849436ca42e3e184fc95edc6173e23..f1887d97072258bf0f29917a94ae338426499112 100644 (file)
@@ -11,6 +11,11 @@ modules and an Amazon S3 account to use this plugin.
 
 ## configuration
 
+Important note: You should seriously consider turning off `usedirs` before
+enabling this plugin. If `usedirs` is enabled, every page has to be stored
+in S3 *twice*, as "page/index.html" and as "page/". That will cost you
+money and bandwidth.
+
 This plugin uses the following settings in the setup file:
 
 * `amazon_s3_key_id` - Set to your public access key id.
@@ -35,6 +40,8 @@ Likewise, you will probably want to set the `url` in the setup file.
 The url can use the `foo.s3.amazonaws.com` domain name, or another domain
 name that is a CNAME for it.
 
+The `hardlink` config file setting is not compatible with this plugin.
+
 ## data transfer notes
 
 If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
index 0a6a86678e7591f4c3178cbe0e8c5e2236ac3148..bbe2d438adcfd80a7c1445bcfba632724045810b 100644 (file)
@@ -15,5 +15,8 @@ use IkiWiki::Setup::Standard {
        syslog => 0,
        userdir => "users",
        usedirs => 0,
-       add_plugins => [qw{goodstuff version haiku polygen fortune}],
+       add_plugins => [qw{goodstuff version polygen fortune amazon_s3}],
+       amazon_s3_key_id => '08TJMT99S3510QHZEP82',
+       amazon_s3_bucket => 'ikiwiki-test',
+       amazon_s3_key_file => "/home/joey/.hide/aws_secret_access_key",
 }