Code Monkey home page Code Monkey logo

s3gw-haproxy's Introduction

s3gw-haproxy

The s3gw-haproxy adds S3 bucket notifications for Ceph Rados GW. It basically works by putting the HAProxy infront of the rgw.

See README_ORIG for the original HAProxy README.

Checkout

cd /usr/src
git clone https://github.com/spreadshirt/s3gw-haproxy

Build

cd s3gw-haproxy
dpkg-buildpackage -us -uc -b

Install

cd ..
dpkg -i haproxy*.deb

Configure

To enable bucket notifications, adjust the global section of your haproxy.cfg. The notifications must be enabled in general and individual per bucket.

Example:

global
        s3.enable
        s3.redis_ip 127.0.0.1
        s3.redis_port 6379
        s3.bucket_prefix s3notifications
        s3.buckets mybucket1
        s3.buckets mybucket2
```

## Notifications

The notifications for PUT, POST and DELETE operations are published (LPUSH) to a redis queue with the name `<s3.bucket_prefix>:<bucket-name>` where `<bucket-name>` is the name of the actual bucket, e.g. a queue name could be like `s3notifications:mybucket`. The notification itself is a simple JSON with the fields event (what happened) and objectKey (to which object).

Example notification:
```
{
  "event": "s3:ObjectCreated:Put",
  "objectKey": "foobar"
}
```

| Field name | Description | Data Type | Possible Values |
| --- | --- | --- | --- |
| event | type | String (fixed set) | `s3:ObjectCreated:Put`<br>`s3:ObjectCreated:Post`<br>`s3:ObjectCreated:Copy`<br>`s3:ObjectRemoved:Delete` |
| objectKey | key of created or deleted object | String | (see S3 documentation for possible values) |
| source | only for PUT operations; value of `x-amz-copy-source header` (if set) (see [RESTObjectCopy](http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html)) | String | `/<bucketName>/<objectKey>` |

s3gw-haproxy's People

Contributors

wtarreau avatar cbonte avatar lynxis avatar horms avatar wlallemand avatar jenshadlich avatar godbach avatar bedis avatar lukastribus avatar emericbr avatar apoikos avatar morfoh avatar piba-nl avatar keruspe avatar krig avatar trtrmitya avatar tmm1 avatar bitfehler avatar jf avatar ylafon avatar odoucet avatar vincentbernat avatar sgotti avatar spachev avatar westr avatar nmerdan avatar copiousfreetime avatar janfrode avatar hnakamur avatar finnag avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.