0.1.1 • Published 10 years ago

karjiang v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

karjiang

poor man's puppet

Generate shell scripts to install and manage stuff on your server.

The idea is simple: Define your server configuration using a JS DSL and compile to a shell script that easily can be executed on your server.

NB: This project is extremely alpha. Things will change.

Usage

A typical karjiang project can have a directory structure like

files
└── authorized_keys
scripts
└── nginx.sh
servers
├── server1.js
└── server2.js
templates

and in the server.js files you can define the server config

var karjiang = require('karjiang');
var server = karjiang();

server.use(file('/home/deployer/.ssh/authorized_keys', fs.readFileSync('files/authorized_keys')));
server.use(script('nginx.sh'));

Now generate the shell script karjiang servers/server1.js.

See karjiang/example for a more thorough example on how one might use it.

Deploying

See karjiang/fabfile for an example of how to use Fabric to deploy karjiang to your servers. Since the output is a pure shell script, you can of course also deploy manually.

License

MIT