0
Deploy  Python  apps     in  5  minutes    with  a  PaaS             Nate  Aune    PyCon  on  the  Charles,  part  1      ...
Jazkarta  (2004-­‐current)
2010-­‐2011• Nothing  equivalent  to  Heroku  for  Django    developers• Built  my  own  PaaS  (“How  hard  can  it  be?”)...
Appsembler  (2012-­‐current)
Agenda• Why  should  I  care?  • What  is  a  PaaS?  What  are  the  advantages?• Which  PaaS  should  I  use?• When  migh...
Where  are  you  deploying/hosTng  today?• Shared  hosTng  (i.e.  WebfacTon)• Running  your  own  servers  (co-­‐located)?...
Meet  Dave
Configuring  a  server         • deciding  what  size  to  get  (memory,  disk)         • ge]ng  all  the  dependencies  in...
Maintaining  the  server1  day   1  day   1  day
Security1  day   1  day   1  day    1  day
Scaling1  day   1  day   1  day   1  day   1  day
Oh  sh*t  moment.
Sysadmin $80ktesed        DBA $90k                       Train new guy                   6
Why  touch  servers  if  you  don’t  have  to?
PaaSIs  it  the  promised  land?
What is a PaaS?  Platform-as-a-service enables developers to createinnovative applications without operational overhead ar...
Layers of infrastructureSource: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/0...
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infog...
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infog...
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infog...
Source: AppFog “Evolution of the Cloud: Toward a NoOps World” Jan 2012http://gigaom.com/cloud/why-2013-is-the-year-of-noop...
Efficient, Elastic, Secure• Lots of applications co-located on a few servers • Drastically reduces resources • Add/remove s...
Let them do    the boring stuff• Patches and updates• Migrating applications• Backups / snapshots• Configuring everything (...
Define  OS  dependencies         www:          type: python          systempackages:            - openoffice.org           ...
Backups5m 5m        https://devcenter.heroku.com/articles/heroku-postgres-fork
SSL5m 5m 5m
Scaling5m 5m 5m 5m              https://openshift.redhat.com/community/developers/scaling
Caching5m 5m 5m 5m 5m
IaaS  vs.  PaaS   IaaS  -­‐  days  PaaS  -­‐  minutes
Which  PaaS?• Hosted• DIY• Hybrid  (public  with  opTon  to  go  private)
Who are the players?• CloudFoundry • Heroku  (open source by VMWare)   (now Salesforce)                                   ...
Who are the players?                  We’ll look at these ones tonight.• CloudFoundry • Heroku • OpenShift  (open source b...
Dotcloudpolyglot from the start, very flexible, most Python centric
Anatomy of a     Django app    on Dotcloudcustomized settings.py for Dotcloudcreatedb.py to create the databasedotcloud.ym...
Heroku
Anatomy of a    Django app    on Herokucustomized settings.py for HerokuProcfile to configure processrequirements.txt to defi...
Stackato                     by ActiveState     Python 3, Run anywhere, New Relic integrationhttp://appsembler.com/blog/dj...
Anatomy ofDjango app on   Stackatocustomized settings filestackato.yml to define serviceswsgi.py to serve using uWSGI
OpenShift                       by Redhat         Open source, Auto-scaling, Jenkins buildshttp://appsembler.com/blog/djan...
Action hooks for running commands   during build, deploy, post-deploy, etc./data/ dir to store uploaded media files     Ana...
Stackato OpenShift Dotcloud                                      HerokuPython           2.7, 3.2 2.6 (2.7) 2.6.5, 2.7.2,  ...
Stackato OpenShift Dotcloud                                      HerokuMemory       Configurable            1.5GB          ...
Why  not  PaaS?• Already  invested  in  your  own  infrastructure.• Need  to  run  on  servers  outside  U.S.• Special  re...
OpenShid  Pricing
Dotcloud  pricing
Heroku pricing
Other resources• Wrap-up from PaaS bake-off  http://appsembler.com/blog/wrap-up-from-paas-bake-off/• Django deployment usi...
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Deploy Python apps in 5 min with a PaaS
Upcoming SlideShare
Loading in...5
×

Deploy Python apps in 5 min with a PaaS

4,982

Published on

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.

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,982
On Slideshare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
37
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Transcript of "Deploy Python apps in 5 min with a PaaS"

  1. 1. Deploy  Python  apps   in  5  minutes with  a  PaaS Nate  Aune PyCon  on  the  Charles,  part  1 Feb.  25,  2013
  2. 2. Jazkarta  (2004-­‐current)
  3. 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
  4. 4. Appsembler  (2012-­‐current)
  5. 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. 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)
  7. 7. Meet  Dave
  8. 8. Configuring  a  server • deciding  what  size  to  get  (memory,  disk) • ge]ng  all  the  dependencies  installed  on  it • SSHing  into  the  machine  to  deploy  stuff   (feels  dirty,  but  he’s  under  Tme  pressure)1  day 1  day
  9. 9. Maintaining  the  server1  day 1  day 1  day
  10. 10. Security1  day 1  day 1  day 1  day
  11. 11. Scaling1  day 1  day 1  day 1  day 1  day
  12. 12. Oh  sh*t  moment.
  13. 13. Sysadmin $80ktesed DBA $90k Train new guy 6
  14. 14. Why  touch  servers  if  you  don’t  have  to?
  15. 15. PaaSIs  it  the  promised  land?
  16. 16. What is a PaaS? Platform-as-a-service enables developers to createinnovative applications without operational overhead around configuration, deployment and management.
  17. 17. Layers of infrastructureSource: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  18. 18. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  19. 19. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  20. 20. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  21. 21. Source: AppFog “Evolution of the Cloud: Toward a NoOps World” Jan 2012http://gigaom.com/cloud/why-2013-is-the-year-of-noops-for-programmers-infographic/
  22. 22. Efficient, 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
  23. 23. Let them do the boring stuff• Patches and updates• Migrating applications• Backups / snapshots• Configuring everything (web servers, load balancers, modules, databases)
  24. 24. Define  OS  dependencies www: type: python systempackages: - openoffice.org - mysql-client-5.15  min
  25. 25. Backups5m 5m https://devcenter.heroku.com/articles/heroku-postgres-fork
  26. 26. SSL5m 5m 5m
  27. 27. Scaling5m 5m 5m 5m https://openshift.redhat.com/community/developers/scaling
  28. 28. Caching5m 5m 5m 5m 5m
  29. 29. IaaS  vs.  PaaS IaaS  -­‐  days PaaS  -­‐  minutes
  30. 30. Which  PaaS?• Hosted• DIY• Hybrid  (public  with  opTon  to  go  private)
  31. 31. Who are the players?• CloudFoundry • Heroku (open source by VMWare) (now Salesforce) • OpenShift (Redhat’s open source PaaS)• AppFog • Dotcloud • App Engine (Google)• Stackato (ActiveState) • Gondor (Python only) • Elastic Beanstalk (Amazon) • Azure (Microsoft)
  32. 32. Who are the players? We’ll look at these ones tonight.• CloudFoundry • Heroku • OpenShift (open source by VMWare) (now Salesforce) (Redhat’s open source PaaS)• AppFog • Dotcloud • App Engine (Google)• Stackato • Gondor (ActiveState) • Elastic Beanstalk (Python only) (Amazon) • Azure (Microsoft)
  33. 33. Dotcloudpolyglot from the start, very flexible, most Python centric
  34. 34. Anatomy of a Django app on Dotcloudcustomized settings.py for Dotcloudcreatedb.py to create the databasedotcloud.yml to store config infomkadmin.py to make the admin usernginx.conf to config URL rewritingpostinstall to run syncdb, collectstaticwsgi.py to serve using uWSGI
  35. 35. Heroku
  36. 36. Anatomy of a Django app on Herokucustomized settings.py for HerokuProcfile to configure processrequirements.txt to define dependencies
  37. 37. Stackato by ActiveState Python 3, Run anywhere, New Relic integrationhttp://appsembler.com/blog/django-deployment-using-stackato/
  38. 38. Anatomy ofDjango app on Stackatocustomized settings filestackato.yml to define serviceswsgi.py to serve using uWSGI
  39. 39. OpenShift by Redhat Open source, Auto-scaling, Jenkins buildshttp://appsembler.com/blog/django-deployment-using-openshift/
  40. 40. Action hooks for running commands during build, deploy, post-deploy, etc./data/ dir to store uploaded media files Anatomy of an OpenShift repo .htaccess to serve up static files application inside of wsgi dir setup.py instead of requirements.txt
  41. 41. Stackato OpenShift Dotcloud HerokuPython 2.7, 3.2 2.6 (2.7) 2.6.5, 2.7.2, 2.7.2 stackato runtimes 3.1.2, 3.2.2PostgreSQL 9.1 8.4 9.0 9.1.6MySQL 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 YesExtensible Yes, apt-get install Yes, DIY cartridge Yes, custom service Yes, buildpacksWebSockets Yes Yes Yes Yes, via Pusher add-on
  42. 42. Stackato OpenShift Dotcloud HerokuMemory Configurable 1.5GB Unlimited RAM sandboxApps Configurable No Yes, 2.8.5 (Yes, via addon)Solr No No Yes, 3.4.0 (Yes, via Websolr)Cron Yes Yes Yes YesExtensible Yes, apt-get install Yes, DIY cartridge Yes, custom service Yes, buildpacksWebSockets Yes ? Yes Yes, via Pusher add-on
  43. 43. Why  not  PaaS?• Already  invested  in  your  own  infrastructure.• Need  to  run  on  servers  outside  U.S.• Special  requirements  not  met  by  PaaS  services
  44. 44. OpenShid  Pricing
  45. 45. Dotcloud  pricing
  46. 46. Heroku pricing
  47. 47. Other resources• Wrap-up from PaaS bake-off http://appsembler.com/blog/wrap-up-from-paas-bake-off/• Django deployment using PaaS http://appsembler.com/blog/django-deployment-using-paas/• django-deployer https://github.com/natea/django-deployer• paasbakeoff - code examples https://github.com/appsembler/paasbakeoff/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×