Frugalos is a distributed object storage written by Rust.
It is suitable for storing medium size BLOBs that become petabyte scale in total.
You can install frugalos
by the following command:
console
$ cargo install frugalos
Note: The current installation process requires automake
, autoconf
, and libtool
to build [liberasurecode] internally. If you have not installed them, please install them. (See also [liberasurecode's prerequisites])
You can also use pre-build binaries from the [releases] page.
```console // Create a cluster. $ frugalos create --id example --data-dir example/ Oct 26 13:42:06.244 INFO [START] create: local=Server { id: "example", seqno: 0, host: V4(127.0.0.1), port: 14278 }; datadir.asref()="example/"; , server: example@127.0.0.1:14278, module: frugalosconfig::cluster:121 Oct 26 13:42:06.245 INFO Creates data directry: "example/", server: example@127.0.0.1:14278, module: frugalosconfig::cluster:113 Oct 26 13:42:06.256 INFO [START] LoadBallot: lumpid=LumpId("03000000000000000000000000000000"); , server: example@127.0.0.1:14278, module: frugalosraft::storage::ballot:21 ... ...
// Start a frugalos process in the background. $ frugalos start --data-dir example/ & Oct 26 13:46:16.046 INFO Local server info: Server { id: "example", seqno: 0, host: V4(127.0.0.1), port: 14278 }, module: frugalosconfig::service:68 Oct 26 13:46:16.062 INFO [START] LoadBallot: lumpid=LumpId("03000000000000000000000000000000"); , module: frugalosraft::storage::ballot:21 Oct 26 13:46:16.086 INFO Starts RPC server, server: 127.0.0.1:14278, module: fibersrpc::rpc_server:221 ... ...
// Add a device and a bucket to store objects. $ DEVICEJSON='{"file": {"id": "file0", "server": "example", "filepath": "example/file0.lusf"}}' $ curl -XPUT -d "$DEVICEJSON" http://localhost:3000/v1/devices/file0 {"file":{"id":"file0","seqno":0,"weight":"auto","server":"example","capacity":19556691462,"filepath":"example/file0.lusf"}}%
$ BUCKETJSON='{"metadata": {"id": "bucket0", "device": "file0", "tolerablefaults": 1}}' $ curl -XPUT -d "$BUCKETJSON" http://localhost:3000/v1/buckets/bucket0 {"metadata":{"id":"bucket0","seqno":0,"device":"file0","segmentcount":1,"tolerable_faults":1}}%
// PUT and GET an object. $ curl -XPUT -d 'yourobjectdata' http://localhost:3000/v1/buckets/bucket0/objects/yourobjectid $ curl http://localhost:3000/v1/buckets/bucket0/objects/yourobjectid yourobjectdata ```
Please see [REST API] for details and other available APIs.
Please see [Developer's Guide].