How can you avoid servers and get back to coding? Platform-as-a-service (PaaS) makes deployment easy. But which PaaS do you choose and how do you get started? This talk will examine several of the leading PaaS providers and discuss their pros/cons. We'll also give examples for how to deploy the same app to each of them to see the differences.
3. 2010-Ââ2011
⢠Nothing  equivalent  to  Heroku  for  Django Â
developers
⢠Built  my  own  PaaS  (âHow  hard  can  it  be?â)
⢠Shut  down  last  year.  Increased  compeTTon Â
from  big  corps  meant  a  race  to  the  boUom
5. Agenda
⢠Why  should  I  care? Â
⢠What  is  a  PaaS?  What  are  the  advantages?
⢠Which  PaaS  should  I  use?
⢠When  might  I  not  want  to  use  a  PaaS?
6. Where  are  you Â
deploying/hosTng  today?
⢠Shared  hosTng  (i.e.  WebfacTon)
⢠Running  your  own  servers  (co-Ââlocated)?
⢠Using  an  IaaS  provider  (i.e.  AWS  or  Rackspace)
⢠Already  using  a  plaZorm-Ââas-Ââa-Ââservice  (PaaS)
9. ConďŹguring  a  server
⢠deciding  what  size  to  get  (memory,  disk)
⢠ge]ng  all  the  dependencies  installed  on  it
⢠SSHing  into  the  machine  to  deploy  stuďŹ Â
(feels  dirty,  but  heâs  under  Tme  pressure)
1 Â day 1 Â day
17. What is a PaaS?
Platform-as-a-service enables developers to create
innovative applications without operational overhead
around conďŹguration, deployment and management.
18. Layers of infrastructure
Source: EngineYard âPaaS - State of the Market Surveyâ May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
19. Source: EngineYard âPaaS - State of the Market Surveyâ May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
20. Source: EngineYard âPaaS - State of the Market Surveyâ May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
21. Source: EngineYard âPaaS - State of the Market Surveyâ May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
22. Source: AppFog âEvolution of the Cloud: Toward a NoOps Worldâ Jan 2012
http://gigaom.com/cloud/why-2013-is-the-year-of-noops-for-programmers-infographic/
23. EfďŹcient, Elastic, Secure
⢠Lots of applications co-located on a few servers
⢠Drastically reduces resources
⢠Add/remove servers depending on load
⢠All secured using SELinux or LXC
24. Let them do
the boring stuff
⢠Patches and updates
⢠Migrating applications
⢠Backups / snapshots
⢠ConďŹguring everything (web servers, load
balancers, modules, databases)
37. Anatomy of a
Django app
on Dotcloud
customized settings.py for Dotcloud
createdb.py to create the database
dotcloud.yml to store conďŹg info
mkadmin.py to make the admin user
nginx.conf to conďŹg URL rewriting
postinstall to run syncdb, collectstatic
wsgi.py to serve using uWSGI
41. Anatomy of a
Django app
on Heroku
customized settings.py for Heroku
ProcďŹle to conďŹgure process
requirements.txt to deďŹne dependencies
42. Stackato
by ActiveState
Python 3, Run anywhere, New Relic integration
http://appsembler.com/blog/django-deployment-using-stackato/
43.
44.
45. Anatomy of
Django app on
Stackato
customized settings ďŹle
stackato.yml to deďŹne services
wsgi.py to serve using uWSGI
46. OpenShift
by Redhat
Open source, Auto-scaling, Jenkins builds
http://appsembler.com/blog/django-deployment-using-openshift/
47.
48. Action hooks for running commands
during build, deploy, post-deploy, etc.
/data/ dir to store uploaded media ďŹles
Anatomy of an
OpenShift repo
.htaccess to serve up static ďŹles
application inside of wsgi dir
setup.py instead of requirements.txt
49. Stackato OpenShift Dotcloud Heroku
Python 2.7, 3.2 2.6 (2.7) 2.6.5, 2.7.2, 2.7.2
stackato runtimes
3.1.2, 3.2.2
PostgreSQL 9.1 8.4 9.0 9.1.6
MySQL 5.5 5.1 5.1 (Yes, via RDS)
Persisted FS Yes Yes Yes (Yes, via S3)
Redis Yes, 2.4 No Yes, 2.4.11 (Yes, via addon)
MongoDB Yes, 2.0 Yes, 2.2 Yes, 2.2.1 (Yes, via addon)
Memcached Yes, 1.4 No Yes (Yes, via addon)
RabbitMQ Yes, 2.4 No Yes, 2.8.5 (Yes, via addon)
Solr No No Yes, 3.4.0 (Yes, via Websolr)
Cron Yes Yes Yes Yes
Extensible Yes, apt-get install Yes, DIY cartridge Yes, custom service Yes, buildpacks
WebSockets Yes Yes Yes Yes, via Pusher add-on
50. Stackato OpenShift Dotcloud Heroku
Memory ConďŹgurable 1.5GB Unlimited
RAM sandbox
Apps ConďŹgurable No Yes, 2.8.5 (Yes, via addon)
Solr No No Yes, 3.4.0 (Yes, via Websolr)
Cron Yes Yes Yes Yes
Extensible Yes, apt-get install Yes, DIY cartridge Yes, custom service Yes, buildpacks
WebSockets Yes ? Yes Yes, via Pusher add-on
51. Why  not  PaaS?
⢠Already  invested  in  your  own  infrastructure.
⢠Need  to  run  on  servers  outside  U.S.
⢠Special  requirements  not  met  by  PaaS  services