# ceph-agent

> Simple UI for Ceph storage

Latest version **0.6.0** (published 2019-02-27) · 0 weekly downloads

## Install

```sh
npm install ceph-agent
pnpm add ceph-agent
yarn add ceph-agent
bun add ceph-agent
```

Provides the command `ceph-agent`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2019-02-27 |
| First published | 2017-11-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 201.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | YounGoat |
| Maintainers | youngoat, youngoat.elite |
| Keywords | ceph, http-proxy, user-agent |

## Links

- npm: https://www.npmjs.com/package/ceph-agent
- Repository: https://github.com/YounGoat/nodejs.ceph-agent
- Issues: https://github.com/YounGoat/nodejs.ceph-agent/issues
- npm.io page: https://npm.io/package/ceph-agent

## Dependencies (7)

- [if2](https://npm.io/package/if2.md) ^0.2.0
- [ceph](https://npm.io/package/ceph.md) ^0.8.5
- [mifo](https://npm.io/package/mifo.md) ~0.0.2
- [noda](https://npm.io/package/noda.md) ^0.4.0
- [jinang](https://npm.io/package/jinang.md) ^0.21.0
- [portman](https://npm.io/package/portman.md) ^0.0.3
- [commandos](https://npm.io/package/commandos.md) ^0.3.1

## Recent versions

- 0.6.0 (latest) — 2019-02-27
- 0.5.3 — 2018-07-14
- 0.5.2 — 2018-06-11
- 0.5.1 — 2018-06-05
- 0.5.0 — 2018-04-27
- 0.4.1 — 2018-04-27
- 0.4.0 — 2018-04-23
- 0.3.0 — 2018-03-14
- 0.2.0 — 2018-02-23
- 0.1.1 — 2018-02-08
- 0.0.4 — 2018-01-09
- 0.0.3 — 2017-12-12
- 0.0.2 — 2017-11-28
- 0.0.1 — 2017-11-27

## README

#	ceph-agent
__Simple UI for CEPH storage__

[![total downloads of ceph-agent](https://img.shields.io/npm/dt/ceph-agent.svg)](https://www.npmjs.com/package/ceph-agent)
[![ceph-agent's License](https://img.shields.io/npm/l/ceph-agent.svg)](https://www.npmjs.com/package/ceph-agent)
[![latest version of ceph-agent](https://img.shields.io/npm/v/ceph-agent.svg)](https://www.npmjs.com/package/ceph-agent)

> Languages / [简体中文](./README.zh_CN.md)

##  Description

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

![logo](./resources/logo.128.png)

##	ToC

*	[Get Started](#get-started)
* 	[Manual](#manual)
*	[API](#api)
*   [Recommendations](#recommendations)
*	[CHANGE LOG](./CHANGELOG.md)
*	[Homepage](https://github.com/YounGoat/nodejs.ceph-agent)

##	Get Started

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

```javascript
// 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.

```bash
# 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](./resources/homepage.png)

##	Manual

```bash
# 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

```javascript
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

*   [ceph](https://www.npmjs.com/package/ceph)
*   [ceph-agent](https://www.npmjs.com/package/ceph-agent)
*   [ceph-cli](https://www.npmjs.com/package/ceph-cli)
*   [ceph-sync](https://www.npmjs.com/package/ceph-sync)
*   [osapi](https://www.npmjs.com/package/osapi)

---
_Source: https://npm.io/package/ceph-agent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
