Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra
-
Upload
leo-lorieri -
Category
Internet
-
view
424 -
download
3
description
Transcript of Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra
![Page 1: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/1.jpg)
A PaaS built with Docker
Meetup #3 @Wayra18/Nov/2014
![Page 2: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/2.jpg)
BE STRONG
flickr.com/gridview
![Page 3: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/3.jpg)
Strong Philosophy:Shipping
(Portability)
flickr.com/wallyonwater54
![Page 4: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/4.jpg)
Strong Philosophy:Distribution
Grabthar flickr.com/42311564@N00/
![Page 5: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/5.jpg)
Strong Philosophy:Scalability
Samuel Mann flickr.com/21218849@N03/
![Page 6: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/6.jpg)
Strong Philosophy:Twelve Factor
flickr.com/hannahtakespictures
![Page 7: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/7.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/9.jpg)
Fleet
![Page 10: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/10.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/11.jpg)
WWHD (What Would Heroku Do)
● Limitations
![Page 12: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/12.jpg)
$ 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/13.jpg)
$ 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/14.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/15.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/16.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/17.jpg)
![Page 18: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/18.jpg)
● 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/19.jpg)
● using deis
deis config
![Page 20: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/20.jpg)
● using deis
deis run ( runs in an ephemeral container!)
![Page 21: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/21.jpg)
● using deis
deis limits
![Page 22: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/22.jpg)
● using deis
deis releases / deis rollbacks
![Page 23: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/23.jpg)
● using deis
deis logs
![Page 24: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/24.jpg)
● using deis
deis domains
![Page 25: Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra](https://reader034.fdocuments.us/reader034/viewer/2022052622/559442471a28abf32f8b45c0/html5/thumbnails/25.jpg)
Thanks!
lorieri @againstty0
ft. @rochacon
flickr.com/time-to-look