SlideShare a Scribd company logo
1 of 76
Django
deployment revisited
       Nate Aune, @natea
      Appsembler & Jazkarta

        November 15, 2012
    Django Boston Users Group
A brief history of /me

• Jazkarta (2004-Current) AWS)
  first taste of cloud platforms (GAE,

• DjangoZoom -(2010-2011) it be!?”
  built my own PaaS “how hard can

• Appsembler (2012-Current) SaaS apps
  leveraging PaaS, make it easy to launch
What’s on the menu

• Where are you deploying Django apps today?
• What is a PaaS?
• Why you might want to use a PaaS?
• What are the different PaaS players?
• How do they compare?
Where are you
deploying Django today?
• Shared hosting (i.e. Webfaction)
• Running your own servers (co-located)?
• Using an IaaS provider (i.e. AWS or Rackspace)
• Already using a platform-as-a-service (PaaS)
What is a PaaS?
  Platform-as-a-service enables developers to create
innovative applications without operational overhead
 around configuration, deployment and management.
Layers of infrastructure




Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
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/
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
Let them do
      the boring stuff
• Let the PaaS provider do the boring stuff
 • Patches and updates
 • Migrating applications
 • Backups / snapshots
 • Configuring everything (web servers, load
    balancers, modules, databases)
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)
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)
Stackato
                     by ActiveState
     Python 3, Run anywhere, New Relic integration




http://appsembler.com/blog/django-deployment-using-stackato/
Stackato
Secure using Linux Containers (LXC)
New Relic integration
Consistent deployment at all stages of the lifecycle
Stackato for Django
1. Download the Stackato client
  http://www.activestate.com/stackato/download_client

2. Create a wsgi.py file
3. Create a requirements.txt file
  (if you don’t already have one)
4. Edit the DATABASES and MEDIA_ROOT
   settings in settings.py file
5. Create a stackato.yml file to persist the
   configuration (optional)
wsgi.py file
requirements.txt
Django==1.4.2

psycopg2==2.4.5
-e git+git@github.com:yourname/django-awesome.git#egg=django-awesome


           Or you can just reference another
            requirements file in your repo


-r requirements/project.txt
Database overrides
MEDIA_ROOT
Target and login

$ stackato target api.appsembler.net

$ stackato login --email user@domain.com

Attempting to login to [https://api.appsembler.net]

Password: ********

Successfully logged into [https://api.appsembler.net]
Initial push

$ stackato push
Would you like to deploy from the current directory ? [Yn]:
Would you like to use 'paasbakeoff' as application name ? [Yn]:
Detected a Python Application, is this correct ? [Yn]:
Framework:       python
Runtime:         <framework-specific default>
Application Deployed URL [paasbakeoff.appsembler.net]:
Application Url: paasbakeoff.appsembler.net
Enter Memory Reservation [128M]:
Creating Application [paasbakeoff]: OK
Create services to bind to 'paasbakeoff' ? [yN]: y
Bind services
What kind of service ?
1. filesystem
2. memcached
3. mongodb
4. mysql
5. postgresql
6. rabbitmq
7. redis
Choose: 5
Specify the name of the service [postgresql-cf691]:
Creating Service: OK
Binding Service: OK
Create another ? [yN]:
Would you like to save this configuration? [yN]: y
Uploading Application [paasbakeoff]:
  Checking for bad links: 29 OK
  Copying to temp space: 28 OK
  Checking for available resources: 44022 OK
  Packing application: OK
  Uploading (20K): 100% OK
Push Status: OK
Staging Application [paasbakeoff]:
Auto-generated
                 stackato.yml file
name: paasbakeoff
instances: 1
framework:
  type: python
mem: 128
services:
  postgresql-cf691: postgresql



 Let’s add some other requirements to be installed
requirements:                           requirements:
  pypm:                                   pypm:
    - pillow                     -OR-       - pillow
    - psycopg2                            pip:
                                            - psycopg2
Running syncdb manually
$ stackato update -n
$ stackato start
$ stackato logs
$ stackato run python mywebsite/manage.py syncdb --noinput
Creating tables ...
...
Creating table django_comments
Creating table django_comment_flags

Creating default account (username: admin / password: default) ...



Creating default Site 127.0.0.1:8000 ...



Creating initial content (About page, Blog, Contact form, Gallery) ...

Installed 18 object(s) from 3 fixture(s)
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Handling static assets
$ stackato run python mywebsite/manage.py collectstatic --noinput
...
Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/rtl.css'
Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/ie.css'
Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/forms.css'


554 static files copied.




      Make sure they were copied to the right place
framework:
  type: python
  home-dir: app

processes:
  web: $STACKATO_UWSGI --static-map /static=$HOME/mywebsite/static
Run management
 commands automatically
hooks:
  post-staging:
    - python mywebsite/manage.py syncdb --noinput
    - python mywebsite/manage.py collectstatic --noinput
    - python mywebsite/manage.py migrate --noinput




    Make sure you add South to the requirements
requirements:
  pypm:
    - pillow
    - psycopg2
    - south
Persisted filesystem for
         file uploads
services:
  postgresql-cf691: postgresql
  filesystem-paasbakeoff: filesystem




Remember to set the MEDIA_ROOT in settings.py:

MEDIA_ROOT = os.environ['STACKATO_FILESYSTEM']
stackato.yml file
Directory layout
OpenShift
                       by Redhat
         Open source, Auto-scaling, Jenkins builds




http://appsembler.com/blog/django-deployment-using-openshift/
Install the rhc client
  $ sudo gem install rhc
  $ rhc setup
  ...
  $ rhc domain status
  7 tests, 12 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
  100% passed




You may need to add the SSH key and start the SSH agent

  $ ssh-add ~/.ssh/id_rsa
  $ ssh-agent
Quick ‘n dirty
                   instructions
$   rhc app create -a mezzanineopenshift -t python 2.6
$   rhc cartridge add -c mysql-5.1 -a mezzanineopenshift
$   cd mezzanineopenshift
$   git remote add paasbakeoff git://github.com/appsembler/paasbakeoff.git
$   git fetch paasbakeoff
$   git merge paasbakeoff/openshift
$   git push
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
/wsgi/application
setup.py
STATIC_ROOT and MEDIA_ROOT
/wsgi/static/.htaccess
.openshift/action_hooks/deploy
.openshift/action_hooks/build
Create and bind the database
 $ rhc cartridge add -c mysql-5.1 -a mezz
 Password: ******

 Adding 'mysql-5.1'   to application 'mezz'
 Success
 mysql-5.1
 =========
   Properties
   ==========
     Connection URL   =   mysql://127.12.26.129:3306/
     Database Name    =   mezz
     Password         =   **********
     Username         =   admin



                      Similar for PostgreSQL
 $ rhc cartridge add -c postgresql-8.4 -a mezz
Git push to deploy
$ git push
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 498 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: restart_on_add=false
remote: Waiting for stop to finish
remote: Done
remote: restart_on_add=false
remote: ~/git/mezz.git ~/git/mezz.git
remote: ~/git/mezz.git
remote: Running .openshift/action_hooks/pre_build
remote: setup.py found.      Setting up virtualenv
remote: New python executable in /var/lib/openshift/x/python-2.6/virtenv/bin/python
remote: Installing setuptools............done.
remote: Installing pip...............done.
...
remote: Running .openshift/action_hooks/deploy
remote: hot_deploy_added=false
remote: MySQL already running
remote: Done
remote: Running .openshift/action_hooks/post_deploy
To ssh://0e94a6186e07430f8d9b989fdf702362@mezz-natea.rhcloud.com/~/git/mezz.git/
      03605bf..e05607c   master -> master
More resources

• Getting started with Django on OpenShift
  https://openshift.redhat.com/community/get-started/django

• openshift-django-example
  https://bitbucket.org/mdoglio/openshift-django-sample

• Rapid Python and Django app deployment
  https://openshift.redhat.com/community/blogs/rapid-python-
   and-django-app-deployment-to-the-cloud-with-a-paas
Dotcloud
polyglot from the start, very flexible, most Python centric
Install the Dotcloud
                  client
$ sudo pip install dotcloud
$ dotcloud setup
dotCloud username or email: natea@jazkarta.com
Password:
==> dotCloud authentication is complete!
You are recommended to run `dotcloud check` now.

$ dotcloud check
==> Checking the authentication status
==> Client is authenticated as natea
Create and push an app
$ dotcloud create mezz
==> Creating a sandbox application named "mezz"
==> Application "mezz" created.
Connect the current directory to "mezz"? [Y/n]:
==> Connecting with the application "mezz"
==> Connected with default push options: --rsync

$ dotcloud push
==> Pushing code with rsync from "./" to application mezz
building file list ... done
14:17:51: [www.0] Migrating stateful data located in ~/data
14:18:05: [www.0] Launching...
14:18:07: [www.0] Re-routing traffic to the new build...
14:18:08: [www.0] Successfully installed build revision rsync instance #0
14:18:08: [www.0] Installation successful for service (www) instance #0
14:18:08: --> Application (mezz) fully installed
==> Application is live at http://mezz-natea.dotcloud.com

$ dotcloud open
==> Opening service "www" in a browser: http://mezz-natea.dotcloud.com
Anatomy of a
     Django app
    on Dotcloud
customized settings.py for Dotcloud

createdb.py to create the database
dotcloud.yml to store config info
mkadmin.py to make the admin user
nginx.conf to config URL rewriting
postinstall to run syncdb, collectstatic

wsgi.py to serve using uWSGI
dotcloud.yml
DATABASE in
 settings.py
STATIC_ROOT and
MEDIA_ROOT in settings.py
nginx.conf
postinstall
createdb.py and
               mkadmin.py
                          createdb.py
https://github.com/dotcloud/django-on-dotcloud/blob/master/createdb.py


                          mkadmin.py
More resources
• Dotcloud Python docs
   http://docs.dotcloud.com/0.9/services/python/

• Dotcloud Django docs
  http://docs.dotcloud.com/0.9/tutorials/python/django/

• django-on-dotcloud
  https://github.com/dotcloud/django-on-dotcloud/

• python-on-dotcloud
   https://github.com/kencochrane/python-on-dotcloud
Heroku
Install the Heroku toolbelt
Download the Heroku Toolbelt
http://toolbelt.herokuapp.com/osx/download

$ heroku login
Enter your Heroku credentials.
Email: someone@example.com
Password: ******
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/someone/.ssh/id_rsa.pub
Create app and DB
$ heroku create paasbakeoff
Creating paasbakeoff... done, stack is cedar
http://paasbakeoff.herokuapp.com/ | git@heroku.com:paasbakeoff.git
Git remote heroku added

$ heroku addons:add heroku-postgresql:dev
Adding heroku-postgresql:dev on paasbakeoff... done, v3 (free)
Attached as HEROKU_POSTGRESQL_GREEN_URL
Database has been created and is available
Use `heroku addons:docs heroku-postgresql:dev` to view documentation.

$ heroku pg:info
=== HEROKU_POSTGRESQL_GREEN_URL
Plan:        Dev
Status:      available
Connections: 0
PG Version: 9.1.6
Created:     2012-11-15 20:59 UTC
Data Size:   5.9 MB
Tables:      0
Rows:        0/10000 (In compliance)
Fork/Follow: Unavailable
Set DB env variables

$ heroku config
=== paasbakeoff Config Vars
HEROKU_POSTGRESQL_GREEN_URL: postgres://x:y@z.com:5432/d2b3c9ichbauv0

$ heroku pg:promote HEROKU_POSTGRESQL_GREEN
Promoting HEROKU_POSTGRESQL_GREEN_URL to DATABASE_URL... done

$ heroku config
=== paasbakeoff Config Vars
DATABASE_URL:                postgres://x:y@z.com:5432/d2b3c9ichbauv0
HEROKU_POSTGRESQL_GREEN_URL: postgres://x:y@z.com:5432/d2b3c9ichbauv0
Add to settings.py




Set the RACK_ENV environment variable to production

 $ heroku config:set RACK_ENV=production
Use S3 for serving
static and media files




 And Sendgrid for sending emails
Procfile
$ git push heroku master
Counting objects: 8, done.
Delta compression using up to 2 threads.




             Deploy with git push
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 616 bytes, done.

Total 6 (delta 3), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing Python interpreter (2.7.2)
-----> Creating Virtualenv version 1.7.2
       New python executable in .heroku/venv/bin/python2.7

       ...
       Running virtualenv with interpreter /usr/local/bin/python2.7
-----> Activating virtualenv
-----> Installing dependencies using pip version 1.1
       Downloading/unpacking Django==1.4.2 (from -r requirements.txt (line 1))
       ...
       Cleaning up...

-----> Collecting static files
       0 static files copied.
-----> Discovering process types
       Procfile declares types             -> (none)
       Default types for Python/Django -> web
-----> Compiled slug size: 9.4MB

-----> Launching... done, v7
       http://djangosample.herokuapp.com deployed to Heroku


To git@heroku.com:djangosample.git
   af73905..3046deb     master -> master
More Heroku
                resources
• Getting Started with Django on Heroku
  https://devcenter.heroku.com/articles/django

• Heroku Hackers Guide ($10 eBook)
  http://theherokuhackersguide.com


• Developers Guide to Running Django
  Applications on Heroku
  http://kencochrane.net/blog/2011/11/developers-guide-for-running-django-apps-on-heroku/
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
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/

More Related Content

What's hot

Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forwardMark Roden
 
Trying out DC/OS (what?)
Trying out DC/OS (what?)Trying out DC/OS (what?)
Trying out DC/OS (what?)nota-ja
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesJimmy Angelakos
 
Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Mirantis
 
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치OpenStack Korea Community
 
An Introduction to OpenStack
An Introduction to OpenStackAn Introduction to OpenStack
An Introduction to OpenStackScott Lowe
 
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangSwift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangHui Cheng
 
OpenStack: running manually installed components on VirtualBox
OpenStack: running manually installed components on VirtualBoxOpenStack: running manually installed components on VirtualBox
OpenStack: running manually installed components on VirtualBoxIan Choi
 
OpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKOpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKRama Krishna B
 
OpenStack Introduction
OpenStack IntroductionOpenStack Introduction
OpenStack Introductionopenstackindia
 
Openstackoverview-DEC2013
Openstackoverview-DEC2013Openstackoverview-DEC2013
Openstackoverview-DEC2013Michael Lessard
 
Mirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 OverviewMirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 OverviewMirantis
 
Vancouver open stack meetup presentation
Vancouver open stack meetup presentationVancouver open stack meetup presentation
Vancouver open stack meetup presentationSean Winn
 
OpenStack Best Practices and Considerations - terasky tech day
OpenStack Best Practices and Considerations  - terasky tech dayOpenStack Best Practices and Considerations  - terasky tech day
OpenStack Best Practices and Considerations - terasky tech dayArthur Berezin
 
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStackContainers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStackOpenStack
 
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...OpenShift Origin
 
OpenStack 101: Introduction & Technical Overview
OpenStack 101: Introduction & Technical OverviewOpenStack 101: Introduction & Technical Overview
OpenStack 101: Introduction & Technical OverviewThang Man
 

What's hot (20)

Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
 
Trying out DC/OS (what?)
Trying out DC/OS (what?)Trying out DC/OS (what?)
Trying out DC/OS (what?)
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013
 
Hadoop on Windows 8
Hadoop on Windows 8Hadoop on Windows 8
Hadoop on Windows 8
 
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치
[OpenStack Day in Korea 2015] Track 1 - Triple O를 이용한 빠르고 쉬운 OpenStack 설치
 
An Introduction to OpenStack
An Introduction to OpenStackAn Introduction to OpenStack
An Introduction to OpenStack
 
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangSwift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex Yang
 
OpenStack: running manually installed components on VirtualBox
OpenStack: running manually installed components on VirtualBoxOpenStack: running manually installed components on VirtualBox
OpenStack: running manually installed components on VirtualBox
 
CloudStack and BigData
CloudStack and BigDataCloudStack and BigData
CloudStack and BigData
 
OpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKOpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaK
 
OpenStack Introduction
OpenStack IntroductionOpenStack Introduction
OpenStack Introduction
 
Openstackoverview-DEC2013
Openstackoverview-DEC2013Openstackoverview-DEC2013
Openstackoverview-DEC2013
 
Mirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 OverviewMirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 Overview
 
Vancouver open stack meetup presentation
Vancouver open stack meetup presentationVancouver open stack meetup presentation
Vancouver open stack meetup presentation
 
OpenStack Best Practices and Considerations - terasky tech day
OpenStack Best Practices and Considerations  - terasky tech dayOpenStack Best Practices and Considerations  - terasky tech day
OpenStack Best Practices and Considerations - terasky tech day
 
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStackContainers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
Containers and OpenStack: Marc Van Hoof, Kumulus: Containers and OpenStack
 
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
 
SFScon16 - Michele Baldessari: "OpenStack – An introduction"
SFScon16 - Michele Baldessari: "OpenStack – An introduction"SFScon16 - Michele Baldessari: "OpenStack – An introduction"
SFScon16 - Michele Baldessari: "OpenStack – An introduction"
 
OpenStack 101: Introduction & Technical Overview
OpenStack 101: Introduction & Technical OverviewOpenStack 101: Introduction & Technical Overview
OpenStack 101: Introduction & Technical Overview
 

Viewers also liked

PyCon talk: Deploy Python apps in 5 min with a PaaS
PyCon talk: Deploy Python apps in 5 min with a PaaSPyCon talk: Deploy Python apps in 5 min with a PaaS
PyCon talk: Deploy Python apps in 5 min with a PaaSAppsembler
 
Spinnaker VLDB 2011
Spinnaker VLDB 2011Spinnaker VLDB 2011
Spinnaker VLDB 2011sandeep_tata
 
Spinnaker - Bay Area AWS Meetup - 20160726
Spinnaker - Bay Area AWS Meetup - 20160726Spinnaker - Bay Area AWS Meetup - 20160726
Spinnaker - Bay Area AWS Meetup - 20160726Adam Jordens
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryJoshua Long
 
A Survey of XBlocks for extending Open edX
A Survey of XBlocks for extending Open edXA Survey of XBlocks for extending Open edX
A Survey of XBlocks for extending Open edXAppsembler
 
Open edX & Interoperability: Making Open edX play nicely with others
Open edX & Interoperability: Making Open edX play nicely with othersOpen edX & Interoperability: Making Open edX play nicely with others
Open edX & Interoperability: Making Open edX play nicely with othersAppsembler
 
What's new: Open edX Dogwood release
What's new: Open edX Dogwood releaseWhat's new: Open edX Dogwood release
What's new: Open edX Dogwood releaseAppsembler
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Djangojeff_croft
 
Scaling Open edX with Kubernetes
Scaling Open edX with KubernetesScaling Open edX with Kubernetes
Scaling Open edX with KubernetesAppsembler
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixDiana Tkachenko
 
Open edX for Corporate Learning - Open edX Conference 2016
Open edX for Corporate Learning - Open edX Conference 2016Open edX for Corporate Learning - Open edX Conference 2016
Open edX for Corporate Learning - Open edX Conference 2016Appsembler
 
Eucalyptus Release of Open edX
Eucalyptus Release of Open edXEucalyptus Release of Open edX
Eucalyptus Release of Open edXAppsembler
 
Open edX Conference 2016 Review
Open edX Conference 2016 ReviewOpen edX Conference 2016 Review
Open edX Conference 2016 ReviewAppsembler
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
 
Introduction to PaaS
Introduction to PaaSIntroduction to PaaS
Introduction to PaaSChris Haddad
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesSamuel Terburg
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 

Viewers also liked (20)

PyCon talk: Deploy Python apps in 5 min with a PaaS
PyCon talk: Deploy Python apps in 5 min with a PaaSPyCon talk: Deploy Python apps in 5 min with a PaaS
PyCon talk: Deploy Python apps in 5 min with a PaaS
 
Django Deployment
Django DeploymentDjango Deployment
Django Deployment
 
Spinnaker VLDB 2011
Spinnaker VLDB 2011Spinnaker VLDB 2011
Spinnaker VLDB 2011
 
Spinnaker Microsrvices
Spinnaker MicrosrvicesSpinnaker Microsrvices
Spinnaker Microsrvices
 
Spinnaker - Bay Area AWS Meetup - 20160726
Spinnaker - Bay Area AWS Meetup - 20160726Spinnaker - Bay Area AWS Meetup - 20160726
Spinnaker - Bay Area AWS Meetup - 20160726
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud Foundry
 
A Survey of XBlocks for extending Open edX
A Survey of XBlocks for extending Open edXA Survey of XBlocks for extending Open edX
A Survey of XBlocks for extending Open edX
 
Open edX & Interoperability: Making Open edX play nicely with others
Open edX & Interoperability: Making Open edX play nicely with othersOpen edX & Interoperability: Making Open edX play nicely with others
Open edX & Interoperability: Making Open edX play nicely with others
 
What's new: Open edX Dogwood release
What's new: Open edX Dogwood releaseWhat's new: Open edX Dogwood release
What's new: Open edX Dogwood release
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Django
 
Scaling Open edX with Kubernetes
Scaling Open edX with KubernetesScaling Open edX with Kubernetes
Scaling Open edX with Kubernetes
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch Fix
 
Open edX for Corporate Learning - Open edX Conference 2016
Open edX for Corporate Learning - Open edX Conference 2016Open edX for Corporate Learning - Open edX Conference 2016
Open edX for Corporate Learning - Open edX Conference 2016
 
Eucalyptus Release of Open edX
Eucalyptus Release of Open edXEucalyptus Release of Open edX
Eucalyptus Release of Open edX
 
Open edX Conference 2016 Review
Open edX Conference 2016 ReviewOpen edX Conference 2016 Review
Open edX Conference 2016 Review
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flask
 
Introduction to PaaS
Introduction to PaaSIntroduction to PaaS
Introduction to PaaS
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 

Similar to Django deployment with PaaS

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
What’s new in cas 4.2
What’s new in cas 4.2 What’s new in cas 4.2
What’s new in cas 4.2 Misagh Moayyed
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventJohn Schneider
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Amazon Web Services
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersBurr Sutter
 
Continuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukMarcinStachniuk
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGIMike Pittaro
 
PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpNathan Handler
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Pierre Joye
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) serverDmitry Lyfar
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfLuca Mattia Ferrari
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunSaiyam Pathak
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 

Similar to Django deployment with PaaS (20)

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Heroku pycon
Heroku pyconHeroku pycon
Heroku pycon
 
What’s new in cas 4.2
What’s new in cas 4.2 What’s new in cas 4.2
What’s new in cas 4.2
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java Developers
 
Continuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin Stachniuk
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at Yelp
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Django deployment with PaaS

  • 1. Django deployment revisited Nate Aune, @natea Appsembler & Jazkarta November 15, 2012 Django Boston Users Group
  • 2. A brief history of /me • Jazkarta (2004-Current) AWS) first taste of cloud platforms (GAE, • DjangoZoom -(2010-2011) it be!?” built my own PaaS “how hard can • Appsembler (2012-Current) SaaS apps leveraging PaaS, make it easy to launch
  • 3. What’s on the menu • Where are you deploying Django apps today? • What is a PaaS? • Why you might want to use a PaaS? • What are the different PaaS players? • How do they compare?
  • 4. Where are you deploying Django today? • Shared hosting (i.e. Webfaction) • Running your own servers (co-located)? • Using an IaaS provider (i.e. AWS or Rackspace) • Already using a platform-as-a-service (PaaS)
  • 5. What is a PaaS? Platform-as-a-service enables developers to create innovative applications without operational overhead around configuration, deployment and management.
  • 6. Layers of infrastructure Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  • 7. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  • 8. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  • 9. Source: EngineYard “PaaS - State of the Market Survey” May 2012 - http://venturebeat.com/2012/07/05/engine-yard-paas-infographic/
  • 10. 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/
  • 11. 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
  • 12. Let them do the boring stuff • Let the PaaS provider do the boring stuff • Patches and updates • Migrating applications • Backups / snapshots • Configuring everything (web servers, load balancers, modules, databases)
  • 13. 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)
  • 14. 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)
  • 15. Stackato by ActiveState Python 3, Run anywhere, New Relic integration http://appsembler.com/blog/django-deployment-using-stackato/
  • 17.
  • 18. Secure using Linux Containers (LXC)
  • 20. Consistent deployment at all stages of the lifecycle
  • 21. Stackato for Django 1. Download the Stackato client http://www.activestate.com/stackato/download_client 2. Create a wsgi.py file 3. Create a requirements.txt file (if you don’t already have one) 4. Edit the DATABASES and MEDIA_ROOT settings in settings.py file 5. Create a stackato.yml file to persist the configuration (optional)
  • 23. requirements.txt Django==1.4.2 psycopg2==2.4.5 -e git+git@github.com:yourname/django-awesome.git#egg=django-awesome Or you can just reference another requirements file in your repo -r requirements/project.txt
  • 26. Target and login $ stackato target api.appsembler.net $ stackato login --email user@domain.com Attempting to login to [https://api.appsembler.net] Password: ******** Successfully logged into [https://api.appsembler.net]
  • 27. Initial push $ stackato push Would you like to deploy from the current directory ? [Yn]: Would you like to use 'paasbakeoff' as application name ? [Yn]: Detected a Python Application, is this correct ? [Yn]: Framework: python Runtime: <framework-specific default> Application Deployed URL [paasbakeoff.appsembler.net]: Application Url: paasbakeoff.appsembler.net Enter Memory Reservation [128M]: Creating Application [paasbakeoff]: OK Create services to bind to 'paasbakeoff' ? [yN]: y
  • 28. Bind services What kind of service ? 1. filesystem 2. memcached 3. mongodb 4. mysql 5. postgresql 6. rabbitmq 7. redis Choose: 5 Specify the name of the service [postgresql-cf691]: Creating Service: OK Binding Service: OK Create another ? [yN]: Would you like to save this configuration? [yN]: y Uploading Application [paasbakeoff]: Checking for bad links: 29 OK Copying to temp space: 28 OK Checking for available resources: 44022 OK Packing application: OK Uploading (20K): 100% OK Push Status: OK Staging Application [paasbakeoff]:
  • 29. Auto-generated stackato.yml file name: paasbakeoff instances: 1 framework: type: python mem: 128 services: postgresql-cf691: postgresql Let’s add some other requirements to be installed requirements: requirements: pypm: pypm: - pillow -OR- - pillow - psycopg2 pip: - psycopg2
  • 30. Running syncdb manually $ stackato update -n $ stackato start $ stackato logs $ stackato run python mywebsite/manage.py syncdb --noinput Creating tables ... ... Creating table django_comments Creating table django_comment_flags Creating default account (username: admin / password: default) ... Creating default Site 127.0.0.1:8000 ... Creating initial content (About page, Blog, Contact form, Gallery) ... Installed 18 object(s) from 3 fixture(s) Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s)
  • 31. Handling static assets $ stackato run python mywebsite/manage.py collectstatic --noinput ... Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/rtl.css' Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/ie.css' Copying '/app/python/lib/python2.7/site-packages/django/contrib/admin/static/admin/css/forms.css' 554 static files copied. Make sure they were copied to the right place framework: type: python home-dir: app processes: web: $STACKATO_UWSGI --static-map /static=$HOME/mywebsite/static
  • 32. Run management commands automatically hooks: post-staging: - python mywebsite/manage.py syncdb --noinput - python mywebsite/manage.py collectstatic --noinput - python mywebsite/manage.py migrate --noinput Make sure you add South to the requirements requirements: pypm: - pillow - psycopg2 - south
  • 33. Persisted filesystem for file uploads services: postgresql-cf691: postgresql filesystem-paasbakeoff: filesystem Remember to set the MEDIA_ROOT in settings.py: MEDIA_ROOT = os.environ['STACKATO_FILESYSTEM']
  • 36. OpenShift by Redhat Open source, Auto-scaling, Jenkins builds http://appsembler.com/blog/django-deployment-using-openshift/
  • 37.
  • 38. Install the rhc client $ sudo gem install rhc $ rhc setup ... $ rhc domain status 7 tests, 12 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed You may need to add the SSH key and start the SSH agent $ ssh-add ~/.ssh/id_rsa $ ssh-agent
  • 39. Quick ‘n dirty instructions $ rhc app create -a mezzanineopenshift -t python 2.6 $ rhc cartridge add -c mysql-5.1 -a mezzanineopenshift $ cd mezzanineopenshift $ git remote add paasbakeoff git://github.com/appsembler/paasbakeoff.git $ git fetch paasbakeoff $ git merge paasbakeoff/openshift $ git push
  • 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
  • 43.
  • 48. Create and bind the database $ rhc cartridge add -c mysql-5.1 -a mezz Password: ****** Adding 'mysql-5.1' to application 'mezz' Success mysql-5.1 ========= Properties ========== Connection URL = mysql://127.12.26.129:3306/ Database Name = mezz Password = ********** Username = admin Similar for PostgreSQL $ rhc cartridge add -c postgresql-8.4 -a mezz
  • 49. Git push to deploy $ git push Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 498 bytes, done. Total 3 (delta 1), reused 0 (delta 0) remote: restart_on_add=false remote: Waiting for stop to finish remote: Done remote: restart_on_add=false remote: ~/git/mezz.git ~/git/mezz.git remote: ~/git/mezz.git remote: Running .openshift/action_hooks/pre_build remote: setup.py found. Setting up virtualenv remote: New python executable in /var/lib/openshift/x/python-2.6/virtenv/bin/python remote: Installing setuptools............done. remote: Installing pip...............done. ... remote: Running .openshift/action_hooks/deploy remote: hot_deploy_added=false remote: MySQL already running remote: Done remote: Running .openshift/action_hooks/post_deploy To ssh://0e94a6186e07430f8d9b989fdf702362@mezz-natea.rhcloud.com/~/git/mezz.git/ 03605bf..e05607c master -> master
  • 50. More resources • Getting started with Django on OpenShift https://openshift.redhat.com/community/get-started/django • openshift-django-example https://bitbucket.org/mdoglio/openshift-django-sample • Rapid Python and Django app deployment https://openshift.redhat.com/community/blogs/rapid-python- and-django-app-deployment-to-the-cloud-with-a-paas
  • 51. Dotcloud polyglot from the start, very flexible, most Python centric
  • 52.
  • 53.
  • 54. Install the Dotcloud client $ sudo pip install dotcloud $ dotcloud setup dotCloud username or email: natea@jazkarta.com Password: ==> dotCloud authentication is complete! You are recommended to run `dotcloud check` now. $ dotcloud check ==> Checking the authentication status ==> Client is authenticated as natea
  • 55. Create and push an app $ dotcloud create mezz ==> Creating a sandbox application named "mezz" ==> Application "mezz" created. Connect the current directory to "mezz"? [Y/n]: ==> Connecting with the application "mezz" ==> Connected with default push options: --rsync $ dotcloud push ==> Pushing code with rsync from "./" to application mezz building file list ... done 14:17:51: [www.0] Migrating stateful data located in ~/data 14:18:05: [www.0] Launching... 14:18:07: [www.0] Re-routing traffic to the new build... 14:18:08: [www.0] Successfully installed build revision rsync instance #0 14:18:08: [www.0] Installation successful for service (www) instance #0 14:18:08: --> Application (mezz) fully installed ==> Application is live at http://mezz-natea.dotcloud.com $ dotcloud open ==> Opening service "www" in a browser: http://mezz-natea.dotcloud.com
  • 56. Anatomy of a Django app on Dotcloud customized settings.py for Dotcloud createdb.py to create the database dotcloud.yml to store config info mkadmin.py to make the admin user nginx.conf to config URL rewriting postinstall to run syncdb, collectstatic wsgi.py to serve using uWSGI
  • 62. createdb.py and mkadmin.py createdb.py https://github.com/dotcloud/django-on-dotcloud/blob/master/createdb.py mkadmin.py
  • 63. More resources • Dotcloud Python docs http://docs.dotcloud.com/0.9/services/python/ • Dotcloud Django docs http://docs.dotcloud.com/0.9/tutorials/python/django/ • django-on-dotcloud https://github.com/dotcloud/django-on-dotcloud/ • python-on-dotcloud https://github.com/kencochrane/python-on-dotcloud
  • 65.
  • 66.
  • 67. Install the Heroku toolbelt Download the Heroku Toolbelt http://toolbelt.herokuapp.com/osx/download $ heroku login Enter your Heroku credentials. Email: someone@example.com Password: ****** Could not find an existing public key. Would you like to generate one? [Yn] Generating new SSH public key. Uploading ssh public key /Users/someone/.ssh/id_rsa.pub
  • 68. Create app and DB $ heroku create paasbakeoff Creating paasbakeoff... done, stack is cedar http://paasbakeoff.herokuapp.com/ | git@heroku.com:paasbakeoff.git Git remote heroku added $ heroku addons:add heroku-postgresql:dev Adding heroku-postgresql:dev on paasbakeoff... done, v3 (free) Attached as HEROKU_POSTGRESQL_GREEN_URL Database has been created and is available Use `heroku addons:docs heroku-postgresql:dev` to view documentation. $ heroku pg:info === HEROKU_POSTGRESQL_GREEN_URL Plan: Dev Status: available Connections: 0 PG Version: 9.1.6 Created: 2012-11-15 20:59 UTC Data Size: 5.9 MB Tables: 0 Rows: 0/10000 (In compliance) Fork/Follow: Unavailable
  • 69. Set DB env variables $ heroku config === paasbakeoff Config Vars HEROKU_POSTGRESQL_GREEN_URL: postgres://x:y@z.com:5432/d2b3c9ichbauv0 $ heroku pg:promote HEROKU_POSTGRESQL_GREEN Promoting HEROKU_POSTGRESQL_GREEN_URL to DATABASE_URL... done $ heroku config === paasbakeoff Config Vars DATABASE_URL: postgres://x:y@z.com:5432/d2b3c9ichbauv0 HEROKU_POSTGRESQL_GREEN_URL: postgres://x:y@z.com:5432/d2b3c9ichbauv0
  • 70. Add to settings.py Set the RACK_ENV environment variable to production $ heroku config:set RACK_ENV=production
  • 71. Use S3 for serving static and media files And Sendgrid for sending emails
  • 73. $ git push heroku master Counting objects: 8, done. Delta compression using up to 2 threads. Deploy with git push Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 616 bytes, done. Total 6 (delta 3), reused 0 (delta 0) -----> Heroku receiving push -----> Python/Django app detected -----> Preparing Python interpreter (2.7.2) -----> Creating Virtualenv version 1.7.2 New python executable in .heroku/venv/bin/python2.7 ... Running virtualenv with interpreter /usr/local/bin/python2.7 -----> Activating virtualenv -----> Installing dependencies using pip version 1.1 Downloading/unpacking Django==1.4.2 (from -r requirements.txt (line 1)) ... Cleaning up... -----> Collecting static files 0 static files copied. -----> Discovering process types Procfile declares types -> (none) Default types for Python/Django -> web -----> Compiled slug size: 9.4MB -----> Launching... done, v7 http://djangosample.herokuapp.com deployed to Heroku To git@heroku.com:djangosample.git af73905..3046deb master -> master
  • 74. More Heroku resources • Getting Started with Django on Heroku https://devcenter.heroku.com/articles/django • Heroku Hackers Guide ($10 eBook) http://theherokuhackersguide.com • Developers Guide to Running Django Applications on Heroku http://kencochrane.net/blog/2011/11/developers-guide-for-running-django-apps-on-heroku/
  • 75. 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
  • 76. 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/

Editor's Notes

  1. \n
  2. I started Jazkarta, a web consulting firm in 2004. AWS for our own website, before EBS. Connexions @ Rice University. GAE project for Aprigo, now known as ClockLock. Founded DZ to provide GAE-like capabilities to Django devs. Appsembler helps developers SaaSify their apps. Tried lots of PaaS providers and hope to share some of that knowledge w/ you tonight.\n
  3. \n
  4. How many are ... ? Who still hasn&amp;#x2019;t deployed Django onto a server?\n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. Lucas argues that over the years, the costs of hosting apps has exponentially decreased, while the productivity has exponentially increased.\n
  11. \n
  12. \n
  13. Two open source options (CloudFoundry and OpenShift). CloudFoundry given birth to AppFog/Stackato. Big companies moved into this space within the last couple years (Redhat, VMWare, Salesforce through acquisitions). Amazon, Microsoft and Google built their own cloud platforms.\n
  14. Two open source options (CloudFoundry and OpenShift). CloudFoundry given birth to AppFog/Stackato. Big companies moved into this space within the last couple years (Redhat, VMWare, Salesforce through acquisitions). Amazon, Microsoft and Google built their own cloud platforms.\n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. First company to bet on polyglot.\n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n