0.6.0 • Published 5 years ago

ceph-agent v0.6.0

Weekly downloads
45
License
-
Repository
github
Last release
5 years ago

ceph-agent

Simple UI for CEPH storage

total downloads of ceph-agent ceph-agent's License latest version of ceph-agent

Languages / 简体中文

Description

Start a web server as an agent of remote CEPH storage.

logo

ToC

Get Started

Firstly, create a JSON file and put into your CEPH storage connection configurations. Only SWIFT style connection config is acceptable now.

// swift.json
{
    "endPoint"   : "http://storage.example.com/",
    "subuser"    : "userName:subUserName",
    "key"        : "380289ba59473a368c593c1f1de6efb0380289ba5",
    "container"  : "containerName"
}

ATTENTION: All above options but container are necessary.

Then, run ceph-agent passing path of the JSON file.

# Install globally.
npm install -g ceph-agent

# Start agent (an HTTP proxy to CEPH storage service).
ceph-agent swift.json

By default, an HTTP service listening on port 7000 will be started. You may access the CEPH storage via http://localhost:7000/.

ceph-agent homepage

Manual

# Display help info.
ceph-agent -h | --help

# Start the agent (proxy server) and listen the specified port.
ceph-agent -p | --port <port>

# Specify the connection config file.
# By default, ceph-agent will try the "ceph.json" or "swift.json" in current
# working directory.
ceph-agent -C | --connection <path/to/connection-config.json>

API

const CephAgent = require('ceph-agent');

const conn = {
    "endPoint"   : "http://storage.example.com/",
    "subuser"    : "userName:subUserName",
    "key"        : "380289ba59473a368c593c1f1de6efb0380289ba5",
    "container"  : "containerName", /* OPTIONAL */
};

const agent = new CephAgent(conn, { basepath: '/myceph/' });

// -----------------------------------------------------------------------------
// -- CASE 1: Start HTTP server directly.
agent.start();

// -----------------------------------------------------------------------------
// -- CASE 2: Return a listener.
conset handler = agent.getHandler();

// In express.
app.use('/myceph/*', handler);

Recommendations

0.6.0

5 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago