karjiang

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i karjiang

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • hkkoren