Sha256: ff63d6d4c7dff24a4f9925ff7117f81330dbd69408b0051dfe0a4d9e3e28c3aa

Contents?: true

Size: 1.91 KB

Versions: 12

Compression:

Stored size: 1.91 KB

Contents

SFP Agent for Ruby
==================
- Author: Herry (herry13@gmail.com)
- [Version](https://github.com/herry13/sfpagent/blob/master/VERSION)
- License: [BSD License](https://github.com/herry13/sfpagent/blob/master/LICENSE)

[![Gem Version](https://badge.fury.io/rb/sfpagent.png)](http://badge.fury.io/rb/sfpagent)

A Ruby script and library of SFP agent. The agent could be accessed through HTTP RESTful API.

With this agent, you could get the state and deploy configuration of particular software components.
Each configuration should be specified in [SFP language](https://github.com/herry13/sfp).
Every software component could have a set of methods which could be called through HTTP request.


Requirements
------------
- Ruby (>= 1.8.7)
- Ruby Gems
	- sfp (>= 0.3.0)


To install
----------

	$ apt-get install ruby1.9.1 ruby1.9.1-dev libz-dev libaugeas-ruby1.9.1
	$ gem install sfpagent


As daemon
---------
- start the agent daemon

		$ sfpagent -s

  In default, the agent will listen at port **1314**.

- stop the agent daemon

		$ sfpagent -t


Cached Directory
----------------
Cached directory keeps all agent's local data such as:
- log file
- PID file
- model file
- installed modules

In default, the agent will use (and created if not exist) the following directory as _cached directory_:
- **~/.sfpagent**, when the daemon is running with non-root user,
- **/var/sfpagent**, when the daemon is running with root user.


HTTP RESTful API
----------------
- GET
	- /state : return the state of the agent
	- /model : return the model of the agent
	- /modules : return the list of modules
	- /log : return the last 100 lines of the log file

- POST
	- /execute : execute an action as specified in "action" parameter

- PUT
	- /model : set/replace the model with given model as specified in "model" parameter
	- /module : set/replace the module if "module" parameter is specified, or delete the module if the parameter is not exist


Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sfpagent-0.3.1 README.md
sfpagent-0.3.0 README.md
sfpagent-0.2.10 README.md
sfpagent-0.2.9 README.md
sfpagent-0.2.8 README.md
sfpagent-0.2.7 README.md
sfpagent-0.2.6 README.md
sfpagent-0.2.5 README.md
sfpagent-0.2.4 README.md
sfpagent-0.2.3 README.md
sfpagent-0.1.14 README.md
sfpagent-0.1.13 README.md