8. ● 100% portable
● Easy API for LXC
● Public Repository
● Lightweight, 1 process (ideal)
● Layers (Union File System)
○ Shares read-only data
○ Incremental
● Volumes (not layered volumes)
9. ● We will only talk about slugs
○ (and twelve-factor later)
“A slug is a bundle of your source,
fetched dependencies, the language
runtime, and compiled/generated output
of the build system - ready for execution.”
17. “Your PaaS. Your Rules.
An open source PaaS that makes it easy to
deploy and manage applications on your
own servers. Deis builds upon Docker and
CoreOS to provide a lightweight PaaS
with a Heroku-inspired workflow.”
18.
19. ● CoresOS + Docker + Ceph + Heroku
● Twelve-Factor
○ for Deis: must be stateless (no wordpress)
● Nginx Router + Wildcard DNS
● First release using Ceph
○ more features coming soon
● Limited
○ twelve-factor
○ only HTTP port (non-http soon)
○ must expose ONLY one port
20. ● Installation:
○ Install CoreOS and ssh keys then:
$ export DEISCTL_TUNNEL=coreos01
$ curl -sSL http://deis.io/deisctl/install.sh | sh
$ git clone https://github.com/deis/deis.git ; cd deis
$ deisctl config platform set
domain=mylocalpaas.com
$ deisctl install platform && deisctl start platform
21. Installation will set the domain in
the distributed database (Etcd)
then load and run the
“init” files (Fleet+Systemd)
into the cluster
Everything else happens by the help of twelve-factor
22. ● Install client * at deis git directory
$ pip install ./client/
$ deis register http://mylocalpaas.com
$ deis keys:add
23. ● Create a
Docker App
# write some “code”
$ mkdir ~/myapp ; cd ~/myapp
$ git init
$ echo "Hello" > index.html
# create the Dockerfile
$ echo 'FROM myregistry/my-tiny-nginx
ADD ./index.html /usr/share/nginx/www/index.html
EXPOSE 80
ENTRYPOINT ["/usr/sbin/nginx"]
CMD ["-c","/etc/nginx/nginx.conf","-p","/etc/nginx","-g","daemon off;"]'
> Dockerfile
# create the app
$ git commit -a -m "initial"
$ deis create myapp
24. ● Deploy it
$ git push deis master
…
-----> Building Docker image
…
-----> Pushing image to private registry
…
-----> Launching...
done, myapp:v1 deployed to Deis
http://myapp.mylocalpaas.com
$ curl http://myapp.mylocalpaas.com
Hello
25. ● 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)
26. ● Deploy a
Heroku App
Available Buildpacks:
● Ruby
● Nodejs
● Java
● Gradle
● Grails
● Play
● Python
● Clojure
● PHP
● Go
● Meteorite
● Perl
● Scala
● Dart
● Nginx
● Apache
27. ● Create it $ git clone https://github.com/deis/example-ruby-sinatra.git
$ cd example-ruby-sinatra
$ deis create myappheroku
Creating application... done, created myappheroku
Git remote deis added
28. ● Deploy it
(suppressed output)
$ git push deis master
-----> Ruby app detected
-----> Compiling Ruby/Rack
-----> Installing dependencies using 1.5.2
Using bundler (1.5.2)
Installing tilt (1.3.6)
Installing rack (1.5.2)
Installing rack-protection (1.5.0)
Installing sinatra (1.4.2)
Your bundle is complete!
-----> Compiled slug size is 12M
-----> Building Docker image
-----> Pushing image to private registry
-----> myappheroku deployed to Deis
http://myappheroku.mylocalpaas.com
$ curl -s http://myappheroku.mylocalpaas.com
Powered by Deis!