Introducing ceph-nano
I’ve recently started a small project that aims to help developers working with the S3 API.
The program is called cn
for Ceph Nano, is available on github let me give you a tour of what it does.
I initially presented the program during my talk at the last OpenStack summit in Sydney.
Originally, I wrote a quick prototype in Bash, then moved to Go.
I. Ceph Nano
cn is a little program written in Go that helps you interact with the S3 API by providing a REST S3 compatible gateway.
The target audience is developers building their applications on Amazon S3.
It is also an exciting tool to showcase Ceph Rados Gateway S3 compatibility.
This is brought to you by the power of Ceph and Containers.
Under the hood, cn runs a Ceph container and exposes a Rados Gateway.
For convenience, cn also comes with a set of commands to work with the S3 gateway.
Before you ask “why not using s3cmd instead?”, then you will be happy to read that internally cn uses s3cmd
and act as a wrapper around the most commonly used commands.
Also, keep in mind that the CLI is just for convenience, and the primary use case is you developing your application directly on the S3 API.
cn also comes with a set of commands to work with the S3 gateway.
Available calls are:
$ ./cn s3 -h |
II. Installation
cn relies on Docker so it must be installed on your machine. If you’re not running a Linux workstation you can install Docker for Mac or Windows.
Once Docker is installed you’re ready to start.
Open your terminal and download the cn binary, example below is for Linux, for OSX use cn-v1.0.0-darwin-amd64
.
$ curl -L https://github.com/ceph/cn/releases/download/v1.0.0/cn-v1.0.0-linux-x86 -o cn |
III. Get started
Start the program with a working directory /tmp
, the initial start might take a few minutes since we need to download the container image:
$ ./cn start -d /tmp |
IV. Work with this CLI
Your first S3 bucket!
$ ./s3 mb my-buc |
To all the designers out there, if someone wants to work on a little logo for ceph-nano that’ll be really awesome. I guess that when it comes to design I’m only good with diagram, for the rest I just suck :).
Comments