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

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

Post on 02-Jul-2015

417 views

Category:

Internet

3 download

Embed Size (px)

DESCRIPTION

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

TRANSCRIPT

  • 1. A PaaS built with DockerMeetup #3 @Wayra18/Nov/2014

2. BE STRONGflickr.com/gridview 3. Strong Philosophy:Shipping(Portability)flickr.com/wallyonwater54 4. Strong Philosophy:DistributionGrabthar flickr.com/42311564@N00/ 5. Strong Philosophy:ScalabilitySamuel Mann flickr.com/21218849@N03/ 6. Strong Philosophy:Twelve Factorflickr.com/hannahtakespictures 7. Rados Gateway REST Objects(S3 e Swift) RBD Block Storage CephFS POSIX Sharing 8. Confd Confd Confd Confd ConfdEtcdFleetSystemd Systemd Systemd Systemd SystemdFlanneleth0 eth0 eth0 eth0 eth0Node 1 Node 2 Node 3 Node 4 Node 5 9. Fleet 10. FleetDistributedServices[Unit]Description=deis-controllerRequires=deis-store-volume.serviceAfter=deis-store-volume.service[Service]EnvironmentFile=/etc/environmentTimeoutStartSec=20mExecStartPre=/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 -fdeis-controller || true"ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && dockerrun --name deis-controller --rm -p 8000:8000 -e EXTERNAL_PORT=8000 -eHOST=$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-controllerRestart=on-failureRestartSec=5[Install]WantedBy=multi-user.target 11. WWHD(What Would Heroku Do) Limitations 12. $ deisctl config platform set domain=mylocalpaas.com$ deisctl install platform$ deisctl start platform Installation 13. $ pip install deis$ deis register http://mylocalpaas.com$ deis keys:add Install client 14. Simpler deploy$ mkdir myapp ; cd myapp$ deis create myapp$ deis pull rochacon/ifconfigmeCreating build... done, v2$ curl myapp.mylocalpaas.com192.168.20.219 15. Docker deployInstead 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 Deishttp://myapp.mylocalpaas.com# use it$ curl http://myapp.mylocalpaas.comHello 16. Scale it$ deis scale cmd=5Scaling processes... but first, coffee!..odone 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) 17. Heroku AppAvailable Buildpacks: Ruby Nodejs Java Gradle Grails Play Python Clojure PHP Go Meteorite Perl Scala Dart Nginx Apache 18. using deisdeis config 19. using deisdeis run ( runs in an ephemeral container!) 20. using deisdeis limits 21. using deisdeis releases / deis rollbacks 22. using deisdeis logs 23. using deisdeis domains 24. Thanks!lorieri@againstty0ft.@rochaconflickr.com/time-to-look