deis, a paas built with docker, docker meetup sao paulo #3 @wayra

25
A PaaS built with Docker Meetup #3 @Wayra 18/Nov/2014

Upload: leo-lorieri

Post on 02-Jul-2015

425 views

Category:

Internet


3 download

DESCRIPTION

Docker Meetup São Paulo #3 @ Wayra Deis, a PaaS built with Docker ft. @rochacon

TRANSCRIPT

Page 1: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

A PaaS built with Docker

Meetup #3 @Wayra18/Nov/2014

Page 2: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

BE STRONG

flickr.com/gridview

Page 3: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Strong Philosophy:Shipping

(Portability)

flickr.com/wallyonwater54

Page 4: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Strong Philosophy:Distribution

Grabthar flickr.com/42311564@N00/

Page 5: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Strong Philosophy:Scalability

Samuel Mann flickr.com/21218849@N03/

Page 6: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Strong Philosophy:Twelve Factor

flickr.com/hannahtakespictures

Page 7: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Rados Gateway○ REST Objects

(S3 e Swift)

● RBD○ Block Storage

● CephFS○ POSIX Sharing

Page 8: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Node 1 Node 2 Node 3 Node 4 Node 5

Fleet

Systemd Systemd Systemd Systemd Systemd

Etcd

Confd Confd Confd Confd Confd

Flannel

eth0 eth0 eth0 eth0 eth0

Page 9: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Fleet

Page 10: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Fleet

Distributed“Services”

[Unit]

Description=deis-controllerRequires=deis-store-volume.serviceAfter=deis-store-volume.service

[Service]

EnvironmentFile=/etc/environmentTimeoutStartSec=20m

ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker history $IMAGE >/dev/null || docker pull $IMAGE"ExecStartPre=/bin/sh -c "docker inspect deis-controller >/dev/null && docker rm -f deis-controller || true"

ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker run --name deis-controller --rm -p 8000:8000 -e EXTERNAL_PORT=8000 -e HOST=$COREOS_PRIVATE_IPV4 -v /var/run/fleet.sock:/var/run/fleet.sock -v /var/lib/deis/store:/data $IMAGE"

ExecStopPost=-/usr/bin/docker rm -f deis-controller

Restart=on-failureRestartSec=5

[Install]WantedBy=multi-user.target

Page 11: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

WWHD (What Would Heroku Do)

● Limitations

Page 12: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

$ deisctl config platform \

set domain=mylocalpaas.com

$ deisctl install platform

$ deisctl start platform

● Installation

Page 13: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

$ pip install deis

$ deis register http://mylocalpaas.com

$ deis keys:add

● Install client

Page 14: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Simpler deploy

$ mkdir myapp ; cd myapp$ deis create myapp

$ deis pull rochacon/ifconfigmeCreating build... done, v2

$ curl myapp.mylocalpaas.com192.168.20.219

Page 15: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Docker deploy

Instead of “docker build”

# create the app

$ deis create myapp

# push it

$ git push deis master

-----> Building Docker image

-----> Pushing image to private registry

-----> Launching...

done, myapp:v1 deployed to Deis

http://myapp.mylocalpaas.com

# use it

$ curl http://myapp.mylocalpaas.com

Hello

Page 16: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Scale it

$ deis scale cmd=5

Scaling processes... but first, coffee!

..o

done in 25s

=== myapp Processes

--- cmd:

cmd.1 up (v13)

cmd.2 up (v13)

cmd.3 up (v13)

cmd.4 up (v13)

cmd.5 up (v13)

Page 17: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra
Page 18: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● Heroku App

Available Buildpacks:

● Ruby● Nodejs● Java● Gradle● Grails● Play● Python● Clojure● PHP● Go● Meteorite● Perl● Scala● Dart● Nginx● Apache

Page 19: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis config

Page 20: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis run ( runs in an ephemeral container!)

Page 21: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis limits

Page 22: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis releases / deis rollbacks

Page 23: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis logs

Page 24: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

● using deis

deis domains

Page 25: Deis, a PaaS built with Docker,  Docker Meetup Sao Paulo #3 @Wayra

Thanks!

lorieri @againstty0

ft. @rochacon

flickr.com/time-to-look