diff --git a/README.md b/README.md index 4b76f74..81939b1 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,27 @@ Users can [download releases](https://github.com/andrewgaul/s3proxy/releases) from GitHub. One can also build the project by running `mvn package` which produces a binary at `target/s3proxy`. S3Proxy requires Java 7 to run. -Examples --------- -Linux and Mac OS X users can run S3Proxy via the executable jar: +Usage +----- +Configure S3Proxy via a properties file. An example using the local +file system as the storage backend with anonymous access: + +``` +s3proxy.authorization=none +s3proxy.endpoint=http://127.0.0.1:8080 +jclouds.provider=filesystem +jclouds.identity=identity +jclouds.credential=credential +jclouds.filesystem.basedir=/tmp/s3proxy +``` + +First create the filesystem basedir: + +``` +mkdir /tmp/s3proxy +``` + +Next run S3Proxy. Linux and Mac OS X users can run the executable jar: ``` chmod +x s3proxy @@ -26,61 +44,16 @@ Windows users must explicitly invoke java: java -jar s3proxy --properties s3proxy.conf ``` -Users can configure S3Proxy via a properties file. An example using Rackspace -CloudFiles (based on OpenStack Swift) as the backing store: +Finally test by creating a bucket then listing all the buckets: ``` -s3proxy.endpoint=http://127.0.0.1:8080 -s3proxy.authorization=aws-v2 -s3proxy.identity=local-identity -s3proxy.credential=local-credential -jclouds.provider=rackspace-cloudfiles-us -jclouds.identity=remote-identity -jclouds.credential=remote-credential +$ curl --request PUT http://localhost:8080/testbucket + +$ curl http://localhost:8080/ +75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06aCustomersName@amazon.comtestbucket2015-08-05T22:16:24.000Z ``` -Another example using the local file system as the backing store with anonymous -access: - -``` -s3proxy.authorization=none -s3proxy.endpoint=http://127.0.0.1:8080 -jclouds.provider=filesystem -jclouds.identity=identity -jclouds.credential=credential -jclouds.filesystem.basedir=/tmp -``` - -S3Proxy can listen on HTTPS by setting the `secure-endpoint` and -[configuring a keystore](http://wiki.eclipse.org/Jetty/Howto/Configure_SSL#Generating_Keys_and_Certificates_with_JDK_keytool). -An example: - -``` -s3proxy.secure-endpoint=https://127.0.0.1:8080 -s3proxy.keystore-path=keystore.jks -s3proxy.keystore-password=password -``` - -To setup the keystore, do - -``` -$ keytool -keystore keystore.jks -alias aws -genkey -keyalg RSA -``` - -Use `*.s3.amazonaws.com` as the `CN` if you wish to proxy -access to Amazon S3 itself. Applications will reject the self-signed -certificate, unless you import it to the application's trusted -store. If the application is written in Java, you can do: - -``` -$ keytool -exportcert -keystore keystore.jks -alias aws -rfc > aws.crt -$ keytool -keystore $JAVA_HOME/jre/lib/security/cacerts -import -alias aws -file aws.crt -trustcacerts -``` - -Users can also set other Java, -[jclouds](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/Constants.java), -and [S3Proxy](https://github.com/andrewgaul/s3proxy/blob/master/src/main/java/org/gaul/s3proxy/S3ProxyConstants.java) -properties. +See the wiki for [examples of other providers](https://github.com/andrewgaul/s3proxy/wiki). Supported storage backends -------------------------- @@ -119,7 +92,7 @@ References * Ceph [s3-tests](https://github.com/ceph/s3-tests) help maintain and improve compatibility with the S3 API * [fake-s3](https://github.com/jubos/fake-s3) and [S3 ninja](https://github.com/scireum/s3ninja) provide functionality similar to S3Proxy when using the filesystem provider * Another project named [s3proxy](https://github.com/abustany/s3proxy) provides HTTP access to non-S3-aware applications -* [SwiftProxy](https://github.com/bouncestorage/swiftproxy) provides similar functionality for the OpenStack Swift API +* [GlacierProxy](https://github.com/bouncestorage/glacier-proxy) and [SwiftProxy](https://github.com/bouncestorage/swiftproxy) provide similar functionality for the Amazon Glacier and OpenStack Swift APIs License -------