Slide 1

Slide 1 text

Deploying your django application OBI Uchenna David @othreecodes Software Engineer at Tuteria

Slide 2

Slide 2 text

Introduction

Slide 3

Slide 3 text

What We'll Cover •Introduction to Django • What, Why, Who? •Setting up development environment •Demo project – "The #Covfefe blog" •Deployment

Slide 4

Slide 4 text

What? • Open source Web framework (MTV) • Written in python • Encourages rapid development and clean, pragmatic design

Slide 5

Slide 5 text

Why? • Ridiculously fast (C2L) • Versatile • Easy to work with • Scalable (shared-nothing architecture) • Secure

Slide 6

Slide 6 text

Who? https://www.djangosites.org/

Slide 7

Slide 7 text

Setting up development environment • Being a Python Web framework, Django requires Python. Python includes a lightweight database called SQLite so you won’t need to set up a database just yet. • Get the latest version of Python at https://www.python.org/downloads/ or with your operating system’s package manager. • Virtualenv - virtualenv is a tool to create isolated Python environments • Install django via pip

Slide 8

Slide 8 text

Demo project - thecovfefeblog https://github.com/othreecodes/thecovfefeblog

Slide 9

Slide 9 text

Project Structure

Slide 10

Slide 10 text

Deployment • Choosing a Server • Deployment options • Paas: Heroku, pythonanywhere • VPS: Digitalocean, Linode, Mediatemple • Automating Deployment with Fabric

Slide 11

Slide 11 text

Choosing a server • Application size • Price • Features of your app • Uwsgi vs Gunicorn

Slide 12

Slide 12 text

Paas: Heroku • Define a Procfile • requirements.txt • runtime.txt • Django Whitenoise • SSL via Let's encrypt

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

VPS: DigitalOcean • Cloud Infrastructure provider • Root access • Unlimited number of Droplets • One click installations • Low Prices

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Click to add text DigitalOcean

Slide 18

Slide 18 text

Nginx • is an open source, lightweight, high-performance web server or proxy server. • The Gunicorn "Green Unicorn" is a Python Web Server Gateway Interface (WSGI) • Uwsgi is a server written in C, it is not meant to run stand-alone but has to be placed behind a webserver

Slide 19

Slide 19 text

Fabric • Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

Slide 20

Slide 20 text

Point to note Click to add text • Do not re-invent the wheel • Compare your options and see which works best • Finish at least one complete tutorial on django • Understand before you copy and paste

Slide 21

Slide 21 text

Resources Click to add text • Djangoproject.com • Fullstackpython.com • Thenewboston django youtube tutorials • https://www.facebook.com/notes/4117412688 77125/Getting_Started_Django/740106062707 309/ • Djangobook.com • Djangopy.org

Slide 22

Slide 22 text

Click to add text

Slide 23

Slide 23 text

Click to add text