Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Patrick Pfeiffer
committed
Dec 14, 2012
1 parent
5a19b3d
commit e19ddbf
Showing
8 changed files
with
235 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.o | ||
mon.log | ||
mon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# nexus-config(1) -- Manage nexus configuration | ||
|
||
## SYNOPSIS | ||
|
||
nexus config | ||
|
||
## DESCRIPTION | ||
|
||
you can pass a string or an object to the nexus-constructor or use the (`-c`) | ||
option with the cli. if you pass a string it will will be `require(string)`'ed. | ||
|
||
* `var nexus = require('nexus')('/some/path/to/a/file.json/or/file.js')` | ||
* `var nexus = require('nexus')({prefix:__dirname})` | ||
* `nexus -c /some/path/to/../file.json/or/file.js` | ||
|
||
if you dont pass any config-option the nexus-cli will create a | ||
`~/.nexus`-directory if it doesnt exist and put all the configs and logs there. | ||
it will try to `require('~/.nexus/config.js')` per default. | ||
|
||
the default config is (which gets overwritten by the config you pass to nexus): | ||
|
||
``` javascript | ||
{ prefix : process.env.HOME+'/.nexus' // is be used to prefix defaults | ||
, apps : prefix+'/apps' // nexus will install apps into that directory | ||
, tmp : prefix+'/tmp' // apps will be installed here temporarily | ||
, logs : prefix+'/logs' // this is where log-files will be put | ||
, key : null // path to key-file - if set, the nexus-server uses tls | ||
, cert : null // path to cert-file - if set, the nexus-server uses tls | ||
, ca : null // every file in that directory will be read into the ca | ||
, db : prefix+'/nexus.db' // nexus stores information about running processes there | ||
, port : 0xf00 // the nexus-server will listen on that port | ||
// remote nexus-cli can connect (see -r option) | ||
, host : '0.0.0.0' // if a port is set the net/tls-server will be bound to it | ||
, socket : null // path to unix-socket, if set the server will also listen on it | ||
, remotes : {} // can be used with the cli: `nexus -r` | ||
// a remote is either a socket or a port | ||
// (optional in combination with key, cert, host) | ||
, error : null // if set (a string) it will be executed when a program exits | ||
// CWD will be set to prefix, and ENV.NEXUS_MONITOR contains | ||
// JSON.stringify'ed information about the chrashed program | ||
} | ||
``` | ||
|
||
## EXAMPLES | ||
|
||
your config may look like this: | ||
|
||
``` javascript | ||
{ apps : '/path/to/directory' | ||
, socket : '/path/to/socket' | ||
, port : 12345 | ||
, host : '0.0.0.0' | ||
, key : '/path/to/key.pem' | ||
, cert : '/path/to/cert.pem' | ||
, ca : '/path/to/ca' | ||
, error : 'echo "it crashed" > email' | ||
, remotes : | ||
{ foo : { port:12346, key:<key>, cert:<cert>, host:'foo.com' } | ||
, bar : { port:12347, key:<key>, cert:<cert>, host:'bar.com' } | ||
} | ||
} | ||
``` | ||
|
||
now you can access the remote nexus-server `foo` with `nexus -r foo <command>` | ||
|
||
or more simple - this will install all the things into `/var/nexus`: | ||
|
||
``` | ||
{ prefix : '/var/nexus', port : 12345 } | ||
``` | ||
|
||
the nexus-server will then listen on port `0.0.0.0:12345`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# nexus-log(1) -- Access and manage nexus-logs | ||
|
||
## SYNOPSIS | ||
|
||
nexus logs <command> [<options>] | ||
|
||
## DESCRIPTION | ||
|
||
Access and manage nexus-logs | ||
|
||
## COMMANDS | ||
|
||
### list | ||
|
||
### cleanup | ||
|
||
### tail | ||
|
||
nexus tail <appId> [<options>] | ||
|
||
#### OPTIONS | ||
|
||
* `-f` - follow | ||
* `-n <n>` - last `<n>` lines | ||
|
||
## EXAMPLES | ||
|
||
Print the last `50` lines of the log-file corresponding to the application | ||
with the id `idY` | ||
|
||
nexus tail idY -n 50 | ||
|
||
Print the last `50` lines of the log-file corresponding to the application | ||
with the id `idY` running on a remote nexus `remoteX` and follow the output: | ||
|
||
nexus -r remoteX tail idY -n 50 -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.