]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/amazon_s3.mdwn
formatting
[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 * `amazon_s3_dupindex` - Normally, when `usedirs` is enabled,
31   "foo/index.html" is stored in S3 as a key named "foo/", and all links
32   between pages use that name. If you also needs links that include
33   "index.html" in their names to work, you can enable this option. Then
34   each index.html file will be stored in S3 *twice*, under both names. This
35   will use more disk and bandwidth, and is not recommended unless you really
36   need it for some reason.
37
38 Note that you should still set `destdir` in the setup file. The files that
39 are uploaded to Amazon S3 will still be written to the destdir, too.
40
41 Likewise, you will probably want to set the `url` in the setup file.
42 The url can use the `foo.s3.amazonaws.com` domain name, or another domain
43 name that is a CNAME for it.
44
45 The `hardlink` config file setting is not compatible with this plugin.
46
47 ## data transfer notes
48
49 If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
50 entire thing will be re-uploaded to Amazon S3. This will take time, and
51 cost you money, so it should be avoided as much as possible.
52
53 If you run 'ikiwiki -setup my.setup -refresh', ikiwiki will only upload the
54 modified pages that it refreshes. Faster and cheaper. Still, if you have
55 very large pages (for example, a page that inlines hundreds of other pages
56 .. or is just very large), the complete page contents will be re-uploaded
57 each time it's changed. Amazon S3 does not currently support partial/rsync
58 type uploads.
59
60 Copy and rename detection is not done, so if you copy or rename a large file,
61 it will be re-uploaded, rather than copied.
62
63 ## deleting a bucket
64
65 You can use "ikiwiki -setup my.setup --delete-bucket" to delete anything
66 that's in the configured bucket, and remove the bucket.