presentation dokku

11
1 Dokku: Docker powered mini-Heroku Yannick De Turck 10/09/2015

Upload: yannick-de-turck

Post on 13-Jan-2017

516 views

Category:

Software


0 download

TRANSCRIPT

1

Dokku: Docker powered mini-HerokuYannick De Turck

10/09/2015

2

What is Heroku?

Cloud PaaS running on top of Amazon Web Services Users deploy their application via git push Various plugins available for logging, caching, monitoring,… Perform commands via Heroku toolbelt in a terminal

3

What is Heroku?

4

What is Dokku?

Docker powered mini-Heroku in around 200 lines of Bash Your own PaaS Build out of

- Docker: Container runtime for Linux- Buildstep: Buildstep uses Docker and Buildpacks to build applications like

Heroku- Gitreceive: Provides you with a git user that you can push repositories to

and triggers a script to handle the push

5

How does Dokku work?

Install Dokku on an Ubuntu server or use a cloud IaaS provider such as DigitalOcean which offers Dokku ready made VMs

Initialize Git on the project root of your application if necessary Add a new remote via git remote add Perform a Git push

- Dokku runs a deployment script via a post-commit hook based on the process type detected

Sit back and relax!

6

Demo

Deploying an application on a VM with Dokku installed

7

Demo: Basic setup (part 1)

Create a new VM in Virtual Box- Install Ubuntu 14.04

Install Git- $ sudo apt-get install git

Install OpenSSH-Server- $ sudo apt-get install openssh-server

Download Dokku- $ wget https://raw.github.com/progrium/dokku/v0.3.22/bootstrap.sh

Install Dokku- $ sudo DOKKU_TAG=v0.3.22 bash bootstrap.sh

8

Demo: Basic setup (part 2)

Perform the necessary stuff in order to transfer our public key- $ sudo visudo- Add at the bottom:

yannickdeturck ALL = (ALL:ALL) ALL%yannickdeturck ALL = (ALL) NOPASSWD: NOPASSWD: ALL

In the meantime prepare a keypair and transfer the public key- $ cat ~/.ssh/yannickdeturck.pub | ssh -p 3022

yannickdeturck@localhost "sudo sshcommand acl-add dokku [description]"

Edit ssh config- host localhost

user dokku hostname localhost port 3022 identityfile ~/.ssh/yannickdeturck

9

Demo: Basic setup (part 3)

Create a new application and initialize Git (optional: define buildpack)- $ activator new demo-join

$ git init$ git add -A && git commit -m "Intial commit"

Optional: Use a different buildpack by creating a .env-file and commit it- $ export BUILDPACK_URL=https://github.com/heroku/heroku-

buildpack-scala

Add our Dokku as remote- $ git remote add dokku dokku@localhost:demo-join

Perform the push- $ git push dokku master

Verify on server that the app was deployed- $ dokku apps

10

What’s next?

Check out the documentation at- http://progrium.viewdocs.io/dokku/

Presentation available at- http://www.slideshare.net/YannickDeTurck/presentation-dokku

11

Thanks for your attention! Questions?