haibu: dev deployment is fast and easy again

13

Click here to load reader

Upload: gelnior

Post on 02-Jul-2015

1.487 views

Category:

Technology


0 download

DESCRIPTION

These slides explains how to setup quicky a private small PaaS with Haibu. Talk performed @ LyonJS Meetup, April 2013

TRANSCRIPT

Page 1: Haibu: dev deployment is fast and easy again

dev deployment is fast and easy again

Page 2: Haibu: dev deployment is fast and easy again

Node.js is great... but with PHP it was so easier to deploy my apps...

Page 3: Haibu: dev deployment is fast and easy again

do you know Haibu ? 

Install and start any Node.js app from its repo on your server

made by Nodejitsu

Page 4: Haibu: dev deployment is fast and easy again

installation

npm install haibu -g

run server

haibu

Page 5: Haibu: dev deployment is fast and easy again

deploy your web app

curl -XPOST -sSNT app.tgz localhost:9002/deploy/username/appname

Page 6: Haibu: dev deployment is fast and easy again

nice features

use forever to spawn appsfrom a git repo, archive or local folderautomatic port assignationapps isolated through sys users

Page 7: Haibu: dev deployment is fast and easy again

but...

no virtualisationpoor documentationnode.js onlyslow evolution

Page 8: Haibu: dev deployment is fast and easy again

node.js client: install, start, stop, update, removehaibu = require "haibu-api"

client = new haibu.drone.Client host: "localhost" port: 9002

manifest = user: "me" name: "test" repository: branch: "master" type: "git" url: "https://github.com/me/hello.git" scripts: start: "server.js"

client.start manifest, (err, result) -> if err then console.log "Error spawning app!" else console.log "Successfully spawned app!"

Page 9: Haibu: dev deployment is fast and easy again

with commander'program = require 'commander'client = new require(haibu-api).drone.Client ...

program .command("install <app>") .description("Install application in haibu") .action (app) -> manifest = ... name: app repository: url: "https://github.com/me/#{app}.git" client.clean manifest, (err, result) -> client.start manifest, (err, result) -> if err then console.log "Install failed" else console.log "run on port #{result.drone.port}"

program.parse process.argv

Page 10: Haibu: dev deployment is fast and easy again

coffee my_paas install my-app

Page 11: Haibu: dev deployment is fast and easy again

coffee my_paas install my-appcoffee my_paas uninstall my-appcoffee my_paas start my-appcoffee my_paas stop my-app

coffee my_paas update my-app

Page 12: Haibu: dev deployment is fast and easy again
Page 13: Haibu: dev deployment is fast and easy again

[email protected]://blog.cozycloud.cchttps://twitter.com/mycozycloud

Crédits photos: dsmis, Ethan Ableman

License Creative Commons by-3.0

a talk by...