]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/amazon_s3.mdwn
documentation for amazon_s3 plugin
[ikiwiki.git] / doc / plugins / amazon_s3.mdwn
1 [[template id=plugin name=amazon_s3 author="[[Joey]]"]]
2 [[tag type/special-purpose]]
3
4 This plugin allows ikiwiki to publish a wiki in the [Amazon Simple Storage
5 Service](http://aws.amazon.com/s3) (S3). As pages are rendered, ikiwiki
6 will upload them to Amazon S3. The entire wiki contents, aside from the
7 ikiwiki CGI, can then be served directly out of Amazon S3.
8
9 You'll need the [[cpan Net::Amazon::S3]] and [[cpan File::MimeInfo]] perl
10 modules and an Amazon S3 account to use this plugin.
11
12 ## configuration
13
14 This plugin uses the following settings in the setup file:
15
16 * `amazon_s3_key_id` - Set to your public access key id.
17 * `amazon_s3_key_file` - Set to the name of a file where you have
18   stored your secret access key. The content of this file *must*
19   be kept secret.
20 * `amazon_s3_bucket` - The globally unique name of the bucket to use to
21   store the wiki. This determines the URL to your wiki. For example, if you
22   set it to "foo", then the url will be
23   "http://foo.s3.amazonaws.com/wiki/".
24 * `amazon_s3_prefix` - A prefix to prepend to each page name.
25   The default is "wiki/". Note that due to S3 limitations (lack of support
26   for uploading a root key), it is not possible to set the prefix to an
27   empty string.
28 * `amazon_s3_location` - Optionally, this can be set to control which
29   datacenter to use. For example, set it to "EU" to for Europe.
30
31 Note that you should still set `destdir` in the setup file. The files that
32 are uploaded to Amazon S3 will still be written to the destdir, too.
33
34 Likewise, you will probably want to set the `url` in the setup file.
35 The url can use the `foo.s3.amazonaws.com` domain name, or another domain
36 name that is a CNAME for it.
37
38 ## data transfer notes
39
40 If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
41 entire thing will be re-uploaded to Amazon S3. This will take time, and
42 cost you money, so it should be avoided as much as possible.
43
44 If you run 'ikiwiki -setup my.setup -refresh', ikiwiki will only upload the
45 modified pages that it refreshes. Faster and cheaper. Still, if you have
46 very large pages (for example, a page that inlines hundreds of other pages
47 .. or is just very large), the complete page contents will be re-uploaded
48 each time it's changed. Amazon S3 does not currently support partial/rsync
49 type uploads.
50
51 Copy and rename detection is not done, so if you copy or rename a large file,
52 it will be re-uploaded, rather than copied.