GithubHelp home page GithubHelp logo

tableflip / guvnor Goto Github PK

View Code? Open in Web Editor NEW
430.0 27.0 37.0 8.81 MB

A node process manager that isn't spanners all the way down

License: MIT License

JavaScript 80.90% Shell 0.09% CoffeeScript 0.01% Ruby 0.14% CSS 17.75% HTML 1.12%

guvnor's Introduction

Control your processes like a boss

The Guv'nor

Discuss Tasks Build Status Dependency Status Coverage Status

Noun 1. guvnor - (British slang) boss

A node process manager that isn't spanners all the way down.

Features

  • Monitoring via console or web
  • Configure user/group to run processes as
  • Auto process restart on crash
  • Log redirection to per process out/err files
  • Cluster support
  • Monitor process CPU/memory/event loop latency
  • Remotely trigger GC/heap dump
  • Debug remote processes
  • Store exception stack traces and logs for post-crash analysis

Command line interface

cli

Use guv (or guvnor if you're not into the whole brevity thing).

## Web interface

Start the web interface with (can be run without guvnor running in the background - for example if you want to monitor one or more guvnor servers from a different machine that is not running guvnor):

$ guv-web

or run the web interface under guvnor itself (please read the guvnor web setup section first!):

$ guv web

guvnor-web

Install

npm install -g guvnor --unsafe-perm

Why --unsafe-perm? Guvnor uses a fair few native modules that require access to /root/.npm and /root/.node-gyp when building. At the moment this is the only way to allow access.

Upgrading

npm's upgrade command is a big angry box of wasps so to be sure, kill guvnor, remove it, reinstall and start it.

guv kill
npm remove -g guvnor
npm install -g guvnor
guv

For instructions on how to move between breaking versions, see upgrading

## Usage

Comprehensive help is available on the command line:

guv --help

and with more detail for each subcommand, e.g.:

guv start --help

The first time you invoke a guvnor command, the daemon will start in the background. Because guvnor can run processes as different users, it needs to be able to switch to those users. Consequently you should start guvnor as root or another privileged user.

Help

  1. Starting and stopping processes
  2. Controlling the Daemon
  3. Managing clusters
  4. Installing and running apps
  5. Remote access and monitoring (e.g. guvnor-web)
  6. Web interface
  7. Web interface - configuration
  8. Web interface - user management
  9. Programmatic access
  10. Programmatic access - local
  11. Programmatic access - remote
  12. Programmatic access - events

Configure

A configuration file if run as root can be placed at /etc/guvnor/guvnor. Take a look at the default configuration file for details.

If you create a configuration file, it will be merged with the default configuration, so if you only want to override one property, you need only specify one property in your config file.

Starting guvnor on boot

Guvnor comes with a sysv init script. To configure it to run on system boot run the following:

$ sudo ln -s /usr/local/lib/node_modules/guvnor/scripts/init/sysv/guvnor /etc/init.d/guvnor
$ sudo update-rc.d guvnor defaults

To undo this, run:

$ sudo update-rc.d guvnor remove
$ sudo rm /etc/init.d/guvnor

apt-get

If you installed node via apt-get install nodejs, you should create a symlink to the nodejs binary:

$ sudo ln -s /usr/bin/nodejs /usr/bin/node

Also, the init script is probably stored at /usr/lib/node_modules/... instead of /usr/local/lib/node_modules/... - please check your filesystem to be sure.

Docker

See the sample Dockerfile for how to run guvnor with Docker.

In the Dockerfile there are two variables - GUVNOR_ROOT_SECRET and GUVNOR_USER_SECRET - you should change these to a long random string unique to your install before building the container.

Once you'd done that, build the container and run it with the commands below. The -p option forwards a port used by guv-web to connect to the instance of guvnor in the container, so forward the port as appropriate to your setup.

$ sudo docker build -t guvnor .
$ sudo docker run -p 57484:57483 -d guvnor

To connect guv-web to your docker container, add something like the below to your guvnor-web-hosts file:

[docker]
  host = localhost
  port = 57484
  user = root
  secret = GUVNOR_ROOT_SECRET

...and to your guvnor-web-users file:

[alex.docker]
  user = guvnor
  secret = GUVNOR_USER_SECRET

Replace GUVNOR_ROOT_SECRET and GUVNOR_USER_SECRET with whatever you defined in the Dockerfile.

Development

Vagrant setup

It's useful to be able to set up and tear down fresh VMs to do testing, so a Vagrant file is available. It's configured to run Debian Jessie and install the latest versions of Node and Guvnor.

Once Vagrant is installed, cd into the vagrant directory and run:

$ vagrant up
$ vagrant ssh
$ sudo npm install -g guvnor

Then when you are done, to shut the machine down exit your SSH session and run:

$ vagrant destroy

Docker

Install docker on vagrant with

wget -qO- https://get.docker.com/ | sh

Then cd to /docker and build & run guvnor

sudo docker build -t guvnor .
sudo docker run -p 60000-60020:60000-60020 -d guvnor

Changelog

See the changelog

guvnor's People

Contributors

achingbrain avatar alanshaw avatar codydaig avatar olizilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guvnor's Issues

bs-web errors with "No component with name mdns has been registered"

$ bs-web

Uncaught error Error: No component with name mdns has been registered
    at Container._getDependency (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:224:24)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:104:32)
    at Array.forEach (native)
    at Dependency._testForCircularDependencies (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:99:16)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:17:10)
    at processImmediate [as _immediateCallback] (timers.js:354:15)

/usr/local/lib/node_modules/process-boss/lib/web/BossWeb.js:12
    throw error
          ^
Error: No component with name mdns has been registered
    at Container._getDependency (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:224:24)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:104:32)
    at Array.forEach (native)
    at Dependency._testForCircularDependencies (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:99:16)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Dependency.js:17:10)
    at processImmediate [as _immediateCallback] (timers.js:354:15)

$ boss --version
2.5.2
$ node -v
v0.10.36

Can't print boss version

$ bs -v

  error: unknown option '-v'

$ bs --version

  error: unknown option '--version'

$ bs -V

  error: unknown option '-V'

Stopping two processes at once results in one process stopping and an error message

PID  User Group Name                     Uptime        Restarts CPU  RSS    Heap size Heap used Status  Type    
?    alex staff http-server.js           ?             0        ?    ?      ?         ?         stopped Process 
990  alex staff talky.js                 a few seconds 0        0.00 29.4MB 16.2MB    8.9MB     running Process 
1004 alex staff intermittently-crashy.js a few seconds 1        0.00 28.9MB 16.2MB    7.5MB     running Process 
Alexs-MBP:boss-cli alex$ bs stop talky.js intermittently-crashy.js
error: Callback was already called.
Alexs-MBP:boss-cli alex$ bs list
PID  User Group Name                     Uptime        Restarts CPU  RSS    Heap size Heap used Status  Type    
?    alex staff http-server.js           ?             0        ?    ?      ?         ?         stopped Process 
?    alex staff talky.js                 ?             0        ?    ?      ?         ?         stopped Process 
1013 alex staff intermittently-crashy.js a few seconds 2        0.00 29.3MB 16.2MB    7.8MB     running Process 

Boss hangs when process fails to start after internal error

$ sudo bs start test.js --user alan --group alan
error: boss:log:error date=1416922309850, message=Child process 92a947fd-d759-4e61-9787-a3eee35db242 test.js (19946) experienced an uncaught exception Error: groupname not found
    at Object.exports.gid (/usr/local/lib/node_modules/process-boss/node_modules/userid/lib/userid.js:39:18)
    at UserInfo.afterPropertiesSet (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/lib/common/UserInfo.js:13:30)
    at process._tickCallback (node.js:419:13)

$ sudo bs start test.js --user alan
error: test.js failed to start

^C

Where test.js is:

throw new Error('kerpow')

Boss hangs creating boss group

# bs
warn: Boss has been configured to start with the group 'boss' but that group does not exist
prompt: create group 'boss' [Y/n]:  (Y) Y

guv-web Error: Restart / Stop Not Working

When attempting to restart and/or stop processes via guv-web, I receive a vague error stating:

Stop error

process on HOST has failed to stop - undefined

or

Restart error

process on HOST failed to restart - undefined

At first I thought it was a permissions issue since I am running the processes as root:root, however I verified that I am also running guv-web as root - so permissions should not be a factor.

Accessing the process debugger under Docker

Guvnor starts node-inspector on a random port and then allocates debug ports to each process randomly. With Docker ports need to be known in advance in order to forward them, so we can't access the debugger.

Refactor port allocation out into a service that either allocates from a known port range or falls back to randomly chosen open ports.

Arguments arent reaching the process

Im using this syntax but it's not working:

sudo guv start -n ProcessName -a '--username blabla --password blabla --port 3003' app.js

Those arguments aren't getting to the process :(

What am I doing wrong?

Uncaught exception Cannot call method 'toFixed' of undefined

# bs list -v
debug: Loaded config from 0=/etc/boss/bossrc, 1=/usr/local/lib/node_modules/process-boss/bossrc
debug: Will attempt to connect or start daemon
debug: Connecting to daemon on /var/run/boss/user.socket
debug: Connected to daemon on /var/run/boss/user.socket
debug: Timeoutifying remote method startProcess
debug: Timeoutifying remote method listProcesses
debug: Timeoutifying remote method setClusterWorkers
debug: Timeoutifying remote method findProcessInfoById
debug: Timeoutifying remote method findProcessInfoByPid
debug: Timeoutifying remote method findProcessInfoByName
debug: Timeoutifying remote method dumpProcesses
debug: Timeoutifying remote method restoreProcesses
debug: Timeoutifying remote method sendSignal
debug: Exposing remote method without timeout deployApplication
debug: Exposing remote method without timeout removeApplication
debug: Timeoutifying remote method listApplications
debug: Exposing remote method without timeout switchApplicationRef
debug: Timeoutifying remote method listApplicationRefs
debug: Timeoutifying remote method updateApplicationRefs
debug: Exposing server user methods
debug: Connecting to daemon on /var/run/boss/admin.socket
debug: Connected to daemon on /var/run/boss/admin.socket
debug: Timeoutifying remote method kill
debug: Timeoutifying remote method remoteHostConfig
debug: Timeoutifying remote method addRemoteUser
debug: Timeoutifying remote method removeRemoteUser
debug: Timeoutifying remote method listRemoteUsers
debug: Timeoutifying remote method rotateRemoteUserKeys
debug: Timeoutifying remote method generateRemoteRpcCertificates
debug: Exposing server admin methods
error: Uncaught exception Cannot call method 'toFixed' of undefined
error: TypeError: Cannot call method 'toFixed' of undefined
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/lib/Processes.js:38:62)
    at /usr/local/lib/node_modules/process-boss/lib/Processes.js:45:9
    at Array.forEach (native)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/lib/Processes.js:44:17)
    at /usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/timeoutify/lib/timeoutify.js:34:29
    at Proto.apply (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/node_modules/dnode-protocol/index.js:123:13)
    at Proto.handle (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/node_modules/dnode-protocol/index.js:99:19)
    at D.dnode.handle (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/lib/dnode.js:140:21)
    at D.dnode.write (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/lib/dnode.js:106:22)
    at write (_stream_readable.js:602:24)
    at flow (_stream_readable.js:611:7)
    at Socket.pipeOnReadable (_stream_readable.js:643:5)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)
    at emitReadable (_stream_readable.js:423:5)
    at readableAddChunk (_stream_readable.js:166:9)
    at Socket.Readable.push (_stream_readable.js:128:10)
    at Pipe.onread (net.js:529:21)
    ---- async ----
    at Object.exports.connect.exports.createConnection (net.js:95:35)
    at D.connect (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/index.js:52:22)
    at LocalDaemonConnection._connect (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemonConnection.js:69:16)
    at LocalDaemonConnection.connect (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemonConnection.js:60:15)
    at LocalDaemon._connectOrStartDaemon (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemon.js:85:35)
    at LocalDaemon.connectOrStart (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemon.js:68:10)
    at module.exports.connect (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/index.js:55:35)
    at Actions._do (/usr/local/lib/node_modules/process-boss/lib/Actions.js:39:8)
    at Processes.list (/usr/local/lib/node_modules/process-boss/lib/Processes.js:17:8)
    at Command.listener (/usr/local/lib/node_modules/process-boss/node_modules/commander/index.js:286:8)
    at Command.emit (events.js:98:17)
    at Command.parseArgs (/usr/local/lib/node_modules/process-boss/node_modules/commander/index.js:528:12)
    at Command.parse (/usr/local/lib/node_modules/process-boss/node_modules/commander/index.js:414:21)
    at CLI._setUpCommander (/usr/local/lib/node_modules/process-boss/lib/CLI.js:222:33)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/lib/CLI.js:38:10)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:254:17
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:157:25
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:251:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:615:34
    at CLI._checkBossGroup (/usr/local/lib/node_modules/process-boss/lib/CLI.js:286:12)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:610:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:249:17
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:149:13)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:160:25
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:251:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:615:34
    at CLI._checkBossUser (/usr/local/lib/node_modules/process-boss/lib/CLI.js:232:12)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:610:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:249:17
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:149:13)
    at async.eachSeries (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:165:9)
    at _asyncMap (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:248:13)
    at Object.mapSeries (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:231:23)
    at Object.async.series (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:608:19)
    at CLI.afterPropertiesSet (/usr/local/lib/node_modules/process-boss/lib/CLI.js:32:9)
    at process._tickCallback (node.js:442:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:929:3
    ---- async ----
    at Container.create (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:116:13)
    at Container.createAndRegister (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:88:29)
    at Object.<anonymous> (/usr/local/lib/node_modules/process-boss/index.js:40:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/process-boss/bin/bs:3:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

boss-mdns/build fails

running npm install -g process-boss, I get the following error

> [email protected] install /home/myuserdir/.nvm/v0.10.35/lib/node_modules/process-boss/node_modules/boss-mdns
> node-gyp rebuild

make: entering the directory « /home/myuserdir/.nvm/v0.10.35/lib/node_modules/process-boss/node_modules/boss-mdns/build »
  CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:32:20: fatal error: dns_sd.h : No such a file or directory
compilation finished.
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: leaving the directory « /home/myuserdir/.nvm/v0.10.35/lib/node_modules/process-boss/node_modules/boss-mdns/build »
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/myuserdir/.nvm/v0.10.35/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.11.0-23-generic
gyp ERR! command "node" "/home/myuserdir/.nvm/v0.10.35/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /home/myuserdir/.nvm/v0.10.35/lib/node_modules/process-boss/node_modules/boss-mdns
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]

NB: I had to translate some lines of the above report from French, it might not be the exact terms

Install fails on io.js 1.1.0

When I tried to install boss under io.js 1.1.0, it failed due to the usage module. It seems as if its installation has a bug with io.js 1.1.0.

Any thoughts on this?

Messaging

pm2 uses axon-rpc for message passing between the cli and the daemon, which seems sensible. They pass messages over tcp sockets, and axon doesn't support authentication which is why any old user can kill processes even though pm2 runs as root.

One solution is to use unix sockets instead. Axon uses node's socket api to do the actual network portion, and that supports unix sockets - at that point it's all filesystem privileges so very easy to configure. Problem is visionmedia is thinking of removing unix socket support from Axon as the performance is poor vs tcp (this performance difference is not something we would notice).

Might be worth investigating another library, or just using Axon but isolating it in the codebase so we can easily pull it out later.

An alternative is zeromq but the node module requires a separate install of zmq which is dull. Axon at least is self contained.

Security

For the SSL termination bit, we could store the client's private key in a keyring for boss:

$ bs key add myKey /path/to/key/file
$ bs key list
myKey ===234lkjxx...
anotherKey ===390`hzis...
$ bs key rm anotherKey
$ bs key list
myKey ===234lkjxx...

Connections would be something like:

  1. Client connects to server, sends RSA public key
  2. Server verifies that it has the matching private key dropping the connection if not.

It can then either use the public key to send traffic to the client and the private key to decrypt it, or generate a symmetric key, sign it with the client's public key, send it to the client and use that for all subsequent traffic. The benefit is that symmetric key encryption is a lot cheaper than asymmetric.

If the user has put the client app's private key on the server we could treat that as authentication, much like when you configure ssh to connect to a server without a password.

Can't install [email protected] on raspberry pi

make: Leaving directory '/usr/local/lib/node_modules/process-boss/node_modules/node-inspector/node_modules/v8-profiler/build'
npm ERR! EEXIST, open '/root/.npm/dbc90e16-ersand-version-1-0-2-package-tgz.lock'
File exists: /root/.npm/dbc90e16-ersand-version-1-0-2-package-tgz.lock
Move it away, and try again. 

npm ERR! System Linux 3.12.35+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "process-boss"
npm ERR! cwd /root
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path /root/.npm/dbc90e16-ersand-version-1-0-2-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0

Tried 3 times. Also did an npm cache clear and npm uninstall -g process-boss beforehand.

API

I'd like to see a boss api module that you can say "give me a connection to boss", either tcp or unix socket. The object you get back would implement the same api regardless of network transport. The CLI would use the unix socket version and any remote processes would use the tcp one, which would essentially proxy for the unix socket.

If we use Axon, the tcp connection should act as an ssl termination point and enforce some sort of authentication, otherwise anything can kill processes. There is an issue open against Axon for this but it doesn't look like they think it's a priority.

The unix socket variety should fork two background daemons - one very early in the process to start new processes (avoiding pm2's problem of leaking all of pm2 into every running process) and one to service incoming api requests and manipulate the process starter daemon.

Command failed: which groupadd on OS X

I just installed process-boss v2.6.3 on OS X running Node.js v0.12.0 via Homebrew. Installation went fine, save for a few deprecation warnings (which I suppose were because of Node 0.12), but when I tried to start boss, here's the error I got.

sudo bs -v                                                                                                          
debug: Loaded config from 0=/usr/local/lib/node_modules/process-boss/bossrc
warn: Boss has been configured to start with the group 'boss' but that group does not exist
prompt: create group 'boss' [Y/n]:  (Y) y
debug: Creating group boss
error: Uncaught exception Command failed: which groupadd



error: Error: Command failed: which groupadd

    at checkExecSyncError (child_process.js:1339:13)
    at Object.execSync (child_process.js:1379:13)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/lib/cli/CLI.js:319:28)
    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:316:32


    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/utile/node_modules/async/lib/async.js:142:25
    at assembler (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:313:9)
    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:322:32


    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:597:5
    at Interface.onLine (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/read/lib/read.js:111:5)
    at Interface.emit (events.js:107:17)

I took a quick look at the code, and I see that you're try-catching groupadd (which is a Linux command), and moving on to dscl, which should be used for OS X. I am not entirely sure why the try-catch didn't work, though. Is there some more data I could provide to debug this issue?

install process-boss error, with "node-gyp: Permission denied"

root@ubuntu:~# cnpm i -g process-boss
npm WARN engine [email protected]: wanted: {"node":"<0.11.7"} (current: {"node":"0.11.14","npm":"2.1.10"})

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/posix
> node-gyp rebuild

sh: 1: node-gyp: Permission denied
npm WARN engine [email protected]: wanted: {"node":"0.6.x"} (current: {"node":"0.11.14","npm":"2.1.10"})

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/node_modules/weak
> node-gyp rebuild

sh: 1: node-gyp: Permission denied
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/node_modules/heapdump
> node-gyp rebuild

sh: 1: node-gyp: Permission denied

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/node_modules/usage
> node-gyp rebuild

sh: 1: node-gyp: Permission denied

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/node_modules/node-inspector/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

/
> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/execSync
> node install.js

sh: 1: node: Permission denied

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/node_modules/node-inspector/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build

sh: 1: node-pre-gyp: Permission denied

> [email protected] install /root/.nvm/v0.11.14/lib/node_modules/process-boss/node_modules/boss-local/node_modules/boss-daemon/node_modules/node-inspector/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build

sh: 1: node-pre-gyp: Permission denied
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "node" "/root/.nvm/v0.11.14/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/root/.cnpmrc" "--disturl=https://npm.taobao.org/dist" "--cache=/root/.npm/.cache_cnpm" "--registry=https://registry.npm.taobao.org" "i" "-g" "process-boss"
npm ERR! node v0.11.14
npm ERR! npm  v2.1.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the posix package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls posix
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log

guv-web: Restrict User(s) Per Process

Regarding the guv-web interface:

I see the ability to restrict access for users on a per-host/server basis, but not a per-process basis. I would like to see this implemented (or if it's already possible, explain how it is done as I couldn't find anything in the documentation).

Reason being is I run multiple Ghost blogs on a single server, but want multiple users to be able to log into the web interface to restart, check logs, etc of their Ghost blog (or process). As of right now they have access to everyone else's Ghost blog on that same host.

Heap snapshots under Docker

When you take a heap snapshot of a process running under a dockerised guvnor, there's no easy way to get the actual dump file.

The web interface needs a page that lets you download heap snapshots.

What is guvnor and where do I get it ?

I really like this web interface, more featured than PM2-web, however I cant seem for the life of me to find any information on what guvnor is or how to get it.
Any help greatly appreciated.

How to stop ever-crashing guvnor-web?

I've set up guvnor and had the (bad) idea to start guvnor-web without first configuring it.

Now I have ended up with a running guvnor-web that starts and crashes immediately. Of course it get's restarted and it crashes again. And so on and so on …

How do I stop this?

If I run

$ guv stop guvnor-web

I get:

error: No socket defined

If I try to

$ guv remove guvnor-web

I get:

error: Process undefined is still running

If I try to stop the process by its pid, I'd need to capture the correct PID. But since it gets restarted every few milliseconds, I don't have an idea of how to get the correct one.

The only thing I can do is

$ sudo guv kill

but then everything else is being killed, too. And it still leaves the problem of how to shutdown guvnor-web correctly. If I then run

$ sudo guv list

again, it's up again, and gets restarted forever :-(

What should I do?

Permissions issues when running `bs remoteconfig/useradd/kill `

Specifically:

sudo bs remoteconfig
warn: You do not appear to have sufficient permissions
sudo bs useradd alex
warn: You do not appear to have sufficient permissions
sudo bs kill
warn: You do not appear to have sufficient permissions

boss daemon is running as root, my user is in the boss group.
Any advice?

Picking up wrong node version with node manager "n"

I have the node manager "n" to switch to 0.10.36 and boss still throws and error. I console logged the version boss is seeing around line: https://github.com/tableflip/boss/blob/b41d5d53b3f5e97f16a21b9f9f15700ef9bb8af7/lib/local/LocalDaemon.js#L28

and this is the output I get:

[vagrant@localhost raventracking]$ sudo bs start -n raven -a '-s raven' tracking/index.js 
0.10.22 ### this is from the console.log() I added
error: Failed to start /opt/raventracking/tracking/index.js
error:  message=Script tracking/index.js does not exist, code=INVALID ## Also this is not correct. The file is there. I tabbed to get to it so bash definitely sees it.
[vagrant@localhost raventracking]$ node -v
v0.10.36 ## node -v is saying it higher than the required 0.10.29

Any thoughts?

Logging incorrect process id

Really minor, but the logged pid is not the same as the process pid when using -v

...
info: /Users/alan/Code/project/keystone.js started with pid 3399
debug: Disconnecting from daemon
debug: Disconnected from daemon
debug: Disconnecting from daemon
debug: Disconnected from daemon
$ sudo bs
pid  user group name        uptime        restarts cpu  rss     heap size heap used status  type    
3398 root wheel keystone.js a few seconds 0        0.00 114.3MB 88.3MB    52.6MB    running Process 

[Question] Okay seriously, how do I get to the web interface?

I've followed all the steps on the docs, and after configuring and running guv-web, I only get a JSON response like this when I visit the web URL (https://localhost:<port>/).

{
    "method": "methods",
    "arguments": [
        {
            "findProcessInfoById": "[Function]",
            "getServerStatus": "[Function]",
            "listProcesses": "[Function]",
            "deployApplication": "[Function]",
            "removeApplication": "[Function]",
            "listApplications": "[Function]",
            "switchApplicationRef": "[Function]",
            "listApplicationRefs": "[Function]",
            "updateApplicationRefs": "[Function]",
            "startProcess": "[Function]",
            "removeProcess": "[Function]",
            "_connectToProcess": "[Function]",
            "getDetails": "[Function]"
        }
    ],
    "callbacks": {
        "7yl5gZ-xO": [
            "0",
            "findProcessInfoById"
        ],
        "Qy-9gWbxu": [
            "0",
            "getServerStatus"
        ],
        "XkMqeWblu": [
            "0",
            "listProcesses"
        ],
        "7yQcgZWxu": [
            "0",
            "deployApplication"
        ],
        "mk4cxZbg_": [
            "0",
            "removeApplication"
        ],
        "7yrcx-WeO": [
            "0",
            "listApplications"
        ],
        "XyI9gb-gu": [
            "0",
            "switchApplicationRef"
        ],
        "myv9xZbxd": [
            "0",
            "listApplicationRefs"
        ],
        "7J_9xb-l_": [
            "0",
            "updateApplicationRefs"
        ],
        "XJY9gZbxu": [
            "0",
            "startProcess"
        ],
        "mk5cgWbeu": [
            "0",
            "removeProcess"
        ],
        "7ko9xWWe_": [
            "0",
            "_connectToProcess"
        ],
        "Qkn9gbZld": [
            "0",
            "getDetails"
        ]
    },
    "links": []
}

Am I missing something?

coffeescript support?

hi, thank you for this project!
what would it take to make it run a coffeescript program?
Taking inspiration on what they are doing at node-supervisor, I tried, full of hope, to just replace which node executor by which coffee without much success...
It fails when ProcessWrapper.prototype._startProcess tries to require(script): I guess you can't require a coffeescript module from normal javascript, is that it? If so, it could only work if the whole boss was converted to coffeescript, right?

Uncaught exception group id does not exist

# bs list -v
debug: Loaded config from 0=/etc/boss/bossrc, 1=/usr/local/lib/node_modules/process-boss/bossrc
warn: Boss has been configured to start with the group 'boss' but that group does not exist
prompt: create group 'boss' [Y/n]:  (Y) Y
debug: Creating group boss
debug: /usr/sbin/groupadd boss
Usage: groupadd [options] GROUP

Options:
  -f, --force                   exit successfully if the group already exists,
                                and cancel -g if the GID is already used
  -g, --gid GID                 use GID for the new group
  -h, --help                    display this help message and exit
  -K, --key KEY=VALUE           override /etc/login.defs defaults
  -o, --non-unique              allow to create groups with duplicate
                                (non-unique) GID
  -p, --password PASSWORD       use this encrypted password for the new group
  -r, --system                  create a system account

debug: Will attempt to connect or start daemon
debug: Connecting to daemon on /var/run/boss/user.socket
debug: Socket file did not exist - the daemon is probably not running
debug: Daemon was not running so will start it
debug: Starting daemon
error: Uncaught exception group id does not exist
error: Error: group id does not exist
    at LocalDaemonStarter._startDaemonWithDebugPort (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemonStarter.js:52:22)
    at LocalDaemonStarter.start (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemonStarter.js:33:10)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemon.js:93:32)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/lib/LocalDaemonConnection.js:117:14)
    at D.emit (events.js:117:20)
    at Socket.<anonymous> (/usr/local/lib/node_modules/process-boss/node_modules/boss-local/node_modules/dnode/index.js:65:14)
    at Socket.emit (events.js:117:20)
    at net.js:441:14
    at process._tickCallback (node.js:442:13)
    ---- async ----
    at fireErrorCallbacks (net.js:440:15)
    at Socket._destroy (net.js:476:3)
    at Object.afterConnect [as oncomplete] (net.js:896:10)
    ---- async ----
    at maybeReadMore (_stream_readable.js:440:13)
    at readableAddChunk (_stream_readable.js:168:7)
    at ReadStream.Readable.push (_stream_readable.js:128:10)
    at TTY.onread (net.js:529:21)
    ---- async ----
    at maybeReadMore (_stream_readable.js:440:13)
    at readableAddChunk (_stream_readable.js:168:7)
    at ReadStream.Readable.push (_stream_readable.js:128:10)
    at TTY.onread (net.js:529:21)
    ---- async ----
    at onwrite (_stream_writable.js:266:15)
    at WritableState.onwrite (_stream_writable.js:97:5)
    at WriteStream.Socket._write (net.js:654:5)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at WriteStream.Writable.write (_stream_writable.js:183:11)
    at WriteStream.Socket.write (net.js:616:40)
    at MuteStream.ondata (stream.js:51:26)
    at MuteStream.emit (events.js:95:17)
    at MuteStream.write (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/read/node_modules/mute-stream/mute.js:116:8)
    at Object.cursorTo (readline.js:1113:12)
    at Interface._refreshLine (readline.js:255:11)
    at Interface.prompt (readline.js:175:10)
    at read (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/read/lib/read.js:51:6)
    at EventEmitter.prompt.getInput (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:502:3)
    at get (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:321:12)
    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:280:7
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/utile/node_modules/async/lib/async.js:134:13)
    at Object.async.eachSeries (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/utile/node_modules/async/lib/async.js:150:9)
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:279:11)
    at EventEmitter.prompt.get (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:320:3)
    at CLI._checkBossGroup (/usr/local/lib/node_modules/process-boss/lib/CLI.js:292:20)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:610:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:249:17
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:149:13)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:160:25
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:251:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:615:34
    at CLI._checkBossUser (/usr/local/lib/node_modules/process-boss/lib/CLI.js:232:12)
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:610:21
    at /usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:249:17
    at iterate (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:149:13)
    at async.eachSeries (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:165:9)
    at _asyncMap (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:248:13)
    at Object.mapSeries (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:231:23)
    at Object.async.series (/usr/local/lib/node_modules/process-boss/node_modules/async/lib/async.js:608:19)
    at CLI.afterPropertiesSet (/usr/local/lib/node_modules/process-boss/lib/CLI.js:32:9)
    at process._tickCallback (node.js:442:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:929:3
    ---- async ----
    at Container.create (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:116:13)
    at Container.createAndRegister (/usr/local/lib/node_modules/process-boss/node_modules/wantsit/lib/Container.js:88:29)
    at Object.<anonymous> (/usr/local/lib/node_modules/process-boss/index.js:40:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/process-boss/bin/bs:3:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

error: Cannot call method 'toFixed' of null

After a bs kill, when I start bs and get an initial list of processes with not yet known status ? if I then bs list quickly whilst the processes are starting up I got an error Cannot call method 'toFixed' of null

Is there a no-daemon mode?

E.g., inside of a Docker container, if I want to use guvnor as command, then the Docker container exits as soon as the application has been started, since guvnor itself exits.

pm2 has a --no-daemon parameter for this.

How do I do this with guvnor?

Daemon crash

I use guvnor inside a docker container and run 4 processes. Everything seems fine for about a half day or so. I can see that the memory usage of the Node.js apps go up as the time goes by on the web UI. And next day when I check the the web UI I don't see the server in the list and when I check the server the guvnor daemon is not running. There is nothing special in the /var/log/guvnor directory. Is there any way I can find out what causes the crash? The docker container is limited to use 2G memory. Thanks.

boss starts processes with incorrect group

sh-3.2# NODE_ENV=production bs start /Users/alan/Code/project/keystone.js -u alan -g admin --name project -v
debug: Loaded config from 0=/usr/local/lib/node_modules/process-boss/bossrc
debug: Will attempt to connect or start daemon
debug: Found socket at /var/run/boss/user.socket
debug: Connecting to daemon on /var/run/boss/user.socket
debug: Connected to daemon
debug: Timeoutifying remote method startProcess
debug: Timeoutifying remote method listProcesses
debug: Timeoutifying remote method setClusterWorkers
debug: Timeoutifying remote method findProcessInfoById
debug: Timeoutifying remote method findProcessInfoByPid
debug: Timeoutifying remote method dumpProcesses
debug: Timeoutifying remote method restoreProcesses
debug: Timeoutifying remote method sendSignal
debug: Exposing server user methods
debug: Found socket at /var/run/boss/admin.socket
debug: Connecting to daemon on /var/run/boss/admin.socket
debug: Connected to daemon
debug: Timeoutifying remote method kill
debug: Timeoutifying remote method remoteHostConfig
debug: Timeoutifying remote method addRemoteUser
debug: Timeoutifying remote method removeRemoteUser
debug: Timeoutifying remote method listRemoteUsers
debug: Timeoutifying remote method rotateRemoteUserKeys
debug: Exposing server admin methods
debug: Starting process /Users/alan/Code/project/keystone.js user=alan, group=admin, name=project, argv=[], execArgv=[]
debug: boss:log:debug date=1417004531834, message=Creating process info /Users/alan/Code/project/keystone.js
debug: boss:log:debug date=1417004533485, message=Creating remote process to connect to /var/run/boss/processes/7543
debug: boss:log:debug date=1417004533502, message=Connected to remote
debug: boss:log:debug date=1417004533502, message=Creating remote method startDnodeServer
debug: boss:log:debug date=1417004533502, message=Creating remote method kill
debug: boss:log:debug date=1417004533502, message=Creating remote method restart
debug: boss:log:debug date=1417004533503, message=Creating remote method send
debug: boss:log:debug date=1417004533504, message=Creating remote method reportStatus
debug: boss:log:debug date=1417004533504, message=Creating remote method dumpHeap
debug: boss:log:debug date=1417004533504, message=Creating remote method forceGc
info: /Users/alan/Code/project/keystone.js started with pid 7543
debug: Disconnecting from daemon
debug: Disconnected from daemon
debug: Disconnecting from daemon
debug: Disconnected from daemon
sh-3.2# bs
pid  user group name            uptime    restarts cpu  rss     heap size heap used status  type    
7444 alan staff project 7 minutes 0        0.00 115.1MB 88.3MB    53.1MB    running Process 
sh-3.2# 

boss starts process as root not alan

$ sudo bs start keystone.js -v -u alan
debug: Loaded config from 0=/usr/local/lib/node_modules/process-boss/bossrc
debug: Will attempt to connect or start daemon
debug: Found socket at /var/run/boss/user.socket
debug: Connecting to daemon on /var/run/boss/user.socket
debug: Socket file did not exist - the daemon is probably not running
debug: Daemon was not running so will start it
debug: Starting daemon
debug: Daemon requested config
debug: Daemon process online
debug: Disconnected from Daemon process
debug: Daemon started and listening on undefined
debug: Found socket at /var/run/boss/user.socket
debug: Connecting to daemon on /var/run/boss/user.socket
debug: Connected to daemon
debug: Timeoutifying remote method startProcess
debug: Timeoutifying remote method listProcesses
debug: Timeoutifying remote method setClusterWorkers
debug: Timeoutifying remote method findProcessInfoById
debug: Timeoutifying remote method findProcessInfoByPid
debug: Timeoutifying remote method dumpProcesses
debug: Timeoutifying remote method restoreProcesses
debug: Timeoutifying remote method sendSignal
debug: Exposing server user methods
debug: Found socket at /var/run/boss/admin.socket
debug: Connecting to daemon on /var/run/boss/admin.socket
debug: Connected to daemon
debug: Timeoutifying remote method kill
debug: Timeoutifying remote method remoteHostConfig
debug: Timeoutifying remote method addRemoteUser
debug: Timeoutifying remote method removeRemoteUser
debug: Timeoutifying remote method listRemoteUsers
debug: Timeoutifying remote method rotateRemoteUserKeys
debug: Exposing server admin methods
debug: Starting process /Users/alan/Code/project/keystone.js user=alan, group=wheel, argv=[], execArgv=[]
debug: boss:log:debug date=1416998693714, message=Creating process info /Users/alan/Code/project/keystone.js
debug: boss:log:debug date=1416998695272, message=Creating remote process to connect to /var/run/boss/processes/3628
debug: boss:log:debug date=1416998695293, message=Connected to remote
debug: boss:log:debug date=1416998695293, message=Creating remote method startDnodeServer
debug: boss:log:debug date=1416998695294, message=Creating remote method kill
debug: boss:log:debug date=1416998695295, message=Creating remote method restart
debug: boss:log:debug date=1416998695295, message=Creating remote method send
debug: boss:log:debug date=1416998695295, message=Creating remote method reportStatus
debug: boss:log:debug date=1416998695296, message=Creating remote method dumpHeap
debug: boss:log:debug date=1416998695296, message=Creating remote method forceGc
debug: boss:log:debug date=1416998695444, message=Creating remote process to connect to /var/run/boss/processes/3629
debug: boss:log:debug date=1416998695458, message=Connected to remote
debug: boss:log:debug date=1416998695459, message=Creating remote method startDnodeServer
debug: boss:log:debug date=1416998695459, message=Creating remote method kill
debug: boss:log:debug date=1416998695459, message=Creating remote method restart
debug: boss:log:debug date=1416998695460, message=Creating remote method send
debug: boss:log:debug date=1416998695460, message=Creating remote method reportStatus
debug: boss:log:debug date=1416998695461, message=Creating remote method dumpHeap
debug: boss:log:debug date=1416998695461, message=Creating remote method forceGc
info: /Users/alan/Code/project/keystone.js started with pid 3629
debug: Disconnecting from daemon
debug: Disconnected from daemon
debug: Disconnecting from daemon
debug: Disconnected from daemon

$ bs
pid  user group name        uptime        restarts cpu  rss     heap size heap used status  type    
3628 root wheel keystone.js a few seconds 0        0.00 113.8MB 87.3MB    52.6MB    running Process 

$ ps -u root
  UID   PID TTY           TIME CMD
    0  3628 ??         0:01.80 keystone.js  

Automatic restarts if process uses too much CPU, RAM, …

As guvnor monitors the processes it runs anyway, it would be great if you could assign limits for CPU usage, RAM usage, …

If a process uses more than these limits, it should be restarted.

E.g.: You know that you have a memory leak in your application, but you can't find it. A workaround may be to restart it every time if it uses more than 500 MBytes of memory. Or if it ran longer than 60 minutes. Or ... ;-)

What do you think about this?

Improve cli list formatting

We're seeing values not staying in their columns...

pid   user      group     title          uptime            restarts memory   cpu                 
xxxxx tableflip tableflip Pelican:9008   7863.792523339391 0        98750464 0.010104582428146306
xxxxx dave      dave david:1337     7824.78814920783  0        77725696 0.5709089071902701
xxxxx tableflip tableflip tableflip:2368 7194.145791597664 0        57782272 0

title david:1337 has slipped into the group column.

Start bs-web if installed

I've already typed bs web instead of bs-web - perhaps boss could spawn a boss web if it is installed?

Introduce a process configuration file?

In the context of #53 I had the idea, what if there was a project-specific configuration file?

Basically, something such as guvnor.yml may be a good idea, similar to CircleCI's circle.yml or TravisCI's travis.yml that describes things such as which user has access to the project via guvnor, what the limits are (think #53), and possibly other things…

This would have the advantage that configuration is stored with the application, and it is also automatically versioned, backed up and you have a change log.

What do you think about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.