Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/vdocks
docker cluster proxy using arpanet and mdock
https://github.com/binocarlos/vdocks
Last synced: 11 days ago
JSON representation
docker cluster proxy using arpanet and mdock
- Host: GitHub
- URL: https://github.com/binocarlos/vdocks
- Owner: binocarlos
- License: mit
- Created: 2014-09-01T22:58:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-02T19:31:13.000Z (about 10 years ago)
- Last Synced: 2024-10-30T22:41:42.305Z (20 days ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vdocks
-----A combination of [arpanet](https://github.com/binocarlos/arpanet) and [mdock](https://github.com/binocarlos/mdock).
vdocks is the core code for the [viking](https://github.com/binocarlos/viking) master but without the opinionated PaaS parts around it.
## install
```bash
$ npm install vdocks
```## usage
```js
var http = require('http')
var vdocks = require('vdocks')var options = {
ip:'192.168.8.120',
hostname:'node1',
masters:'192.168.8.120,192.168.8.121,192.168.8.122',
dockerport:2375,
masterport:8791,
etcdport:4001,
etcdpeerport:7001,
etcdpath:'/arpanet'
}var master = vdocks.master(options)
// we can customize using the master.router (which is a routes-router)
master.router.addRoute('/my/custom/route', function(req, res){})
// server is now a (mostly) docker compatable HTTP endpoint
var server = http.createServer(master.router)
server.listen(options.masterport)// this is how non-master nodes are registered onto the network
var slave = vdocks.slave(options)
slave.join(options)
slave.leave()// you can also grab the etcd client
var etcd = vdocks.etcd(options)
```## license
MIT