• Stars
    star
    426
  • Rank 101,884 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

nodebot-workshop

A nodeschool workshop on how to get your ardunio alive with johnny-five
JavaScript
207
star
2

react-native-select-multiple

β˜‘οΈ A customiseable FlatList that allows you to select multiple rows
JavaScript
190
star
3

react-native-toaster

Simple top-pop toast feedback messages for React Native, also Redux compatible
JavaScript
85
star
4

react-responsive-embed

βš›οΈ Embed iframes responsively
JavaScript
40
star
5

ipfs-fuse

Mount IPFS MFS as a FUSE volume using Node.js
JavaScript
39
star
6

ipfs-pubsub-chat-example

An example pubsub app that uses window.ipfs, provided by the IPFS Companion web extension
JavaScript
31
star
7

lasercat-workshop

A step by step guide to building your own internet controllable laser turret and cat dazzler...
JavaScript
28
star
8

postmsg-rpc

Tiny RPC over window.postMessage library
JavaScript
27
star
9

ipld-explorer-cli

πŸ”Ž Explore the IPLD directed acyclic graph with your keyboard
JavaScript
22
star
10

meteor-sass-bootstrap4

Meteor 1.3 + sass + bootstrap4 the npm way.
JavaScript
19
star
11

ipfs-peer-bw-example

A list of peers eating your bandwidth
JavaScript
18
star
12

ipfs-peer-map-example

A map of IPv4 IPFS peers that uses window.ipfs
JavaScript
17
star
13

mozjpeg-stream

🚿 The awesome JPEG minifying power of mozjpeg wrapped up as a `.pipe` friendly stream.
JavaScript
16
star
14

tableflip

How to (β•―Β°β–‘Β°οΌ‰β•―οΈ΅TABLEFLIP
12
star
15

git-days

πŸ“ˆ How many days did you work on that project?
JavaScript
12
star
16

react-native-meteor-oauth

Oauth2 login to a Meteor server in React Native
JavaScript
12
star
17

nodebots-library

The NodeBots Esoteric Hardware Library & Exchange Program
CSS
11
star
18

zonefile-pegjs

A PEG.js grammar for parsing zonefile DNS configuration
JavaScript
9
star
19

i18n-browserify

An example of i18n as a browserify transform
JavaScript
7
star
20

sandstorm-appstore

Appstore for Sandstorm.io
HTML
6
star
21

pull-postmsg-stream

A pull source and sink for pulling over postMessage
JavaScript
5
star
22

ipfs-friends

get by with a little help from your friends
JavaScript
5
star
23

share-via-ipfs

Share files with friends over IPFS
JavaScript
4
star
24

how-to

❓ How to TABLEFLIP and other stories
4
star
25

dnsify

Simplify your dns config
JavaScript
4
star
26

react-copy-text

Copy text to the clipboard like it's 1999
JavaScript
3
star
27

sumo

A johnny-five sumo-bot
JavaScript
3
star
28

slug-cli

Fix bad filenames with slugify
JavaScript
3
star
29

pull-file-reader

Read an HTML5 File object (from e.g. HTML5 drag and drops) as a pull stream source.
JavaScript
3
star
30

london-tensorflow

Intro slides for London TensorFlow
JavaScript
3
star
31

landexplorer

πŸ—Ί The land explorer frontend
JavaScript
3
star
32

raw-collections-example

Example methods which use Meteor's rawCollections capability
JavaScript
2
star
33

flow-router-patterns

Some useful patterns for working with Flow Router
JavaScript
2
star
34

tabs

πŸ”¨ TABLEFLIP Automated Build System
JavaScript
2
star
35

footballbot-workshop

A step by step guide to building your own footballbot
JavaScript
2
star
36

post

πŸ’Œ The TABLEFLIP contact form handler
JavaScript
2
star
37

i18nify

Browserify transform for build time i18n using browserify
JavaScript
2
star
38

makelunch-infrastructure

πŸ”ͺ πŸ’Ύ Ansible scripts for deploying makelunch
Nginx
2
star
39

apollo-next-example

An example app using apollo, next.js and some other things
JavaScript
2
star
40

react-data-dam

🌊 Holds back your data until you're ready to see the updates.
JavaScript
2
star
41

async-each-series-throttle

Iterate through items in series but throttle iteratee execution
JavaScript
2
star
42

resize-jpeg

🌈 Resize your jpeg and preserve it's original quality
JavaScript
2
star
43

react-provide

React Components for putting a value in context and fishing it out
JavaScript
2
star
44

brandnewweddings

πŸ’’ πŸ€– Website for brandnewweddings.co.uk
HTML
2
star
45

zonefile-parser

A zonefile dns configuration parser
JavaScript
2
star
46

meteor-tachyons

How to make the web look nice with Tachyons from the comfort of a Meteor.
HTML
2
star
47

make-dat-lunch

p2p lunch rota
JavaScript
2
star
48

podcasts

TABLEFLIP round the table - with a mic
1
star
49

interavatar

Claim back your identity from the hashy anonymity, add an avatar to your IPFS peer ID.
JavaScript
1
star
50

scrabble-score-keeper

Module for keeping track of scrabble scores
JavaScript
1
star
51

responsible

Dealing with images responsibly
JavaScript
1
star
52

tars

:shipit: TABLEFLIP Automated Release System
JavaScript
1
star
53

tableflip-www

πŸ€– ‴️ The TABLEFLIP website
HTML
1
star
54

tutorwire

Find someone to help you learn
JavaScript
1
star
55

ipfs-gui-review-2018-q2

Highlights of the IPFS GUI work in Q2 2018.
HTML
1
star
56

lunchtray

🍴 Tray application for makelunch
JavaScript
1
star
57

ipfs-filexp

Web based file manager for use with IPFS.
JavaScript
1
star
58

smartsurvey-client

A simple JavaScript client to the SmartSurvey REST API
JavaScript
1
star
59

tune-infrastructure

🎺 πŸ’Ύ Infrastructure project for Tune
Nginx
1
star
60

joi-ipfs-config

Validate JS-IPFS config
JavaScript
1
star
61

tableflip-blog

πŸ“œ The TABLEFLIP blog
CSS
1
star
62

joi-multiaddr

Multiaddr validation with Joi
JavaScript
1
star
63

scrabble-score

Map words to their scrabble score
JavaScript
1
star
64

piggybacker

Async keyed job runner, piggyback on results from running jobs with the same key
JavaScript
1
star
65

meteor-near

Finding cities $near clicks with Meteor & Mongo
JavaScript
1
star
66

ssb-mongo-connect

Connect ssb messages to mongo collections.
JavaScript
1
star
67

react-native-uploadcare-image

Uploadcare image wrapper for react native
JavaScript
1
star
68

noisy-circles

Uses the webaudio API to react to sound input
JavaScript
1
star
69

meteor-popmotion

A 12kb JavaScript motion engine, packaged for Meteor
JavaScript
1
star
70

landexplorer-api

πŸ—ΊοΈ A graphql api for the landexplorer data
Shell
1
star
71

meteor-method-promises

A simple example of using ES6 promises to handle async actions in Meteor methods
JavaScript
1
star
72

monitor-infrastructure

Infrastructure for the TABLEFLIP monitor
Nginx
1
star
73

chatbot

Mk 1 chatbot
JavaScript
1
star
74

ipld.io

Official website for IPLD
HTML
1
star
75

mem-storage-area

A WebExtension like StorageArea in memory
JavaScript
1
star
76

react-dropdown

A React dropdown menu with a fancy menu arrow and no dependencies
JavaScript
1
star