Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/1ambda/aram


https://github.com/1ambda/aram

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# ARAM

Action Runner and Monitor



### 1. Guide

**ARAM** consists of two parts. **Runner** and **Monitor**



#### \# Runner
**Runner** captures websites and checks whether services are availale by finding DOM unless **Runner** executes **actions**


**action** is a node.js script registered in **/runner/util/requirements.js** and exists in **/runner/actions/**


Every **action** must exports a function takes at least 1 argument.
The first argument is `done` callback which is should be called in **action** unless runner will be stop.


```javascript
// /aram/runner/actions/sample_action.js

module.exports = function(done, siteName) {
var exec = require('child_process').exec;
exec("node /home/auth/restart.js", function(err, stdout, stderr) {

if (err) {
console.log('err : ' + err);
}

console.log('\n\tAction Result : \n\n' + stdout + '\n');
console.log((new Date()).toLocaleString() +
': Done action for service [' + siteName + ']');
done();
});
};
```


```javascript
// /aram/runner/config/requirements.js
// action is optional

module.exports = {
"context": [
{ "siteName" : 'accounts',
"url" : "https://accounts.service.com/public",
"tagToTest" : '#info-welcometex',
"action": 'knowlauth_restart.js' },
{ "siteName" : 'story',
"url" : "https://site.service.com",
"tagToTest" : '#welcome' }
]
};

```



#### \# Monitor

**Monitor** is web-service which provides other website's status using charts and images recorded by **Runner**.



### 2. Installation Guide

```
$ sudo npm install -g phantomjs
$ sudo npm install -g casperjs
$ sudo npm install -g supervisor

$ # git clone move to aram directory
$ git clone http://github.com/ansterd/aram
$ cd aram

/aram $ npm install
/aram $ bower install
/aram $ npm start
/aram $ cd runner
/aram/runner $ npm start
```



### 3. Development Guide

```
npm install -g phantomjs
npm install -g casperjs
npm install -g mocha
npm install -g grunt-cli
npm install -g less
npm install -g supervisor
```



### 4. Todo

- Monitor diR structure
- action : nodemailer
- grunt build script [Use this](https://github.com/sindresorhus/grunt-shell)
- Grunt minify, uglify script and css
- less, grunt-contrib-less
- Logging with winston
- passport
- MongoDB virtual
- csurf