How to bootstrap a startup using Django. Philipp Wassibauer philw ) & Jannis Leidel

Similar documents
DISQUS. Continuous Deployment Everything. David

django-app-metrics Documentation

dj-libcloud Documentation

#jenkinsconf. Managing jenkins with multiple components project. Jenkins User Conference Israel. Presenter Name Ohad Basan

Deployability. of Python. web applications

Gunnery Documentation

Agile CI/CD with Jenkins and/at ZeroStack. Kiran Bondalapati CTO, Co-Founder & Jenkins Admin ZeroStack, Inc. (

The Long Road from Capistrano to Kubernetes

DevOps Course Content

django-telegram-bot Documentation

WELCOME

Django IPRestrict Documentation

withenv Documentation

CLOUD WORKLOAD SECURITY

TPS Documentation. Release Thomas Roten

Developing Enterprise Cloud Solutions with Azure

Django Wordpress API Documentation

nacelle Documentation

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

django-cron Documentation

Application Deployment

O Reilly RailsConf,

Garment Documentation

django-reinhardt Documentation

CogniFit Technical Security Details

Use Case: Scalable applications

Design Patterns for Scalable LAMP Infrastructure. Jon Topper Mike Griffiths

AirBespoke Inventory Tracking System

Introduction to cloud computing

Technical Comparison Sheet: ez Platform Cloud vs Other Hosting Approaches

LaunchStation Controller

django-idioticon Documentation

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

DNS Zone Test Documentation

Think Small to Scale Big

chatterbot-weather Documentation

LAB EXERCISE: RedHat OpenShift with Contrail 5.0

A Cloud-based Architecture for Processing 3D Mars Terrain

Overview of load testing with Taurus in Jenkins pipeline

BriCS. University of Bristol Cloud Service Simulation Runner. User & Developer Guide. 1 October John Cartlidge & M.

Panoptes: A Network Telemetry Ecosystem - Part Deux

Python wrapper for Viscosity.app Documentation

EdgeConnect for Amazon Web Services (AWS)

django-private-chat Documentation

Using DC/OS for Continuous Delivery

School Navigator Documentation

AWS 101. Patrick Pierson, IonChannel

This tutorial provides a basic understanding of the infrastructure and fundamental concepts of managing an infrastructure using Chef.

django-cas Documentation

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

open-helpdesk Documentation

The OpenStack Project Continuous Integration System. Elizabeth K.

django-stored-messages Documentation

Netflix OSS Spinnaker on the AWS Cloud

Poulpe Documentation. Release Edouard Klein

DEVOPSIFYING NETWORK SECURITY. An AlgoSec Technical Whitepaper

Software Development I

CloudCenter for Developers

Biostar Central Documentation. Release latest

Amazon Web Services (AWS) Training Course Content

Roman Numeral Converter Documentation

DEVOPS COURSE CONTENT

Python Project Example Documentation

Deccansoft Software Services

TangeloHub Documentation

Niv Mizrahi. VP github.com/nivm

Security as Code: The Time is Now. Dave Shackleford Founder, Voodoo Security Sr. Instructor, SANS

BEYOND CLOUD HOSTING. Andrew Melck, Regional Manager DACH,

Orchestrating Big Data with Apache Airflow

70-532: Developing Microsoft Azure Solutions

Testing in the Cloud. Not just for the Birds, but Monkeys Too!

Daiquiri an VO ready solution for medium size data providers. Anastasia Galkin Jochen Klar Gal Matievic Harry Enke

Aldryn Installer Documentation

Scaling with Continuous Deployment

pydrill Documentation

Introduction to AngularJS

django-teamwork Documentation

Developing Microsoft Azure Solutions (70-532) Syllabus

TM DevOps Use Case TechMinfy All Rights Reserved

Python State Machine Documentation

Developing Solutions for Google Cloud Platform (CPD200) Course Agenda

Maintaining Spatial Data Infrastructures (SDIs) using distributed task queues

"Stupid Easy" Scaling Tweaks and Settings. AKA Scaling for the Lazy

Genesys Mobile Services Deployment Guide. Setting ORS Dependencies

Python simple arp table reader Documentation

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Continuous Delivery for Cloud Native Applications

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0

DevOps on AWS Deep Dive on Continuous Delivery and the AWS Developer Tools

Chef Server on the AWS Cloud

Automating ArcGIS Deployments Using Chef

Securing Amazon Web Services (AWS) EC2 Instances with Dome9. A Whitepaper by Dome9 Security, Ltd.

PyCRC Documentation. Release 1.0

Event Driven network automation

django-users2 Documentation

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

Simplified CICD with Jenkins and Git on the ZeroStack Platform

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Python State Machine Documentation

Transcription:

How to bootstrap a startup using Django Philipp Wassibauer (@ philw ) & Jannis Leidel (@jezdez)

The idea Gidsy is a place where anyone can explore, book and offer things to do.

Why we chose Django Big community Network Language Many problems already solved The admin

Why Django is a good choice Proven technology by similar use cases Stable APIs in a well-defined release process Good documentation with focus on prose Huge community of 3rd party components

Search Haystack Customizable search abstraction Indexing, filtering, faceting, More like this Spatial search and sorting

API Tastypie Highly customizable Web API library Hooks for auth, throtteling, caching, etc. Backbone.js compatible

Task queues Celery Async code execution, cronjobs Thumbnails, search index updates, caching, etc. Collect stats without blocking

Caching Memcache Periodic cache refreshing for high traffic sites Fragment caching with dates and cache version Cache warming during deployment

Workflow Main branch is always deployable Development happens in feature branches Code reviews via pull requests Shared responsibility

Testing Separation of fast and slow tests Full test suite via Jenkins, soon Travis CI Fast tests locally via tox

Releasing Virtualenv(wrapper) + pip Localshop for in-house software releases django-setcon for Django configuration Foreman for process management

Scaling up Initially infrastructure and deployments are simple or

Scaling up Each server downloads dependencies External services could be down (PyPI, Github,...) Which server is in charge of migrations, collectstatic?

Scaling up Central deployment server that builds releases Other servers download.tar package from there

Deploy system Builds are virtualenvs Atomic and orchestrated releases Collectstatic, migrate & other commands centralized Web interface for deploying, rollback Keeps information on who deployed what Will be open sourced

Deploy system Notifies the team and services when deploys happen Deploy New Relic Hipchat (or IRC)

Provisioning servers Follows DRY principle Chef/Puppet/Salt Documents infrastructure and change Place to share and store secure data Roles can be on many or one servers Challenge is separating deployment from app

Chef configuration Staging Environment Chef Environment Chef Role { } "run_list": [ "recipe[ssh_config]", "recipe[sudo]", "recipe[users::sysadmins]", "recipe[pg_bouncer]", "recipe[nginx::default]", "recipe[gidsy_common]", "recipe[gidsy_web]", "recipe[new_relic]", "recipe[hostname]", "recipe[papertrail]" ],... "name": "web", "json_class": "Chef::Role" Chef Role { } "run_list": [ "recipe[ssh_config]", "recipe[sudo]", "recipe[users::sysadmins]", "recipe[pg_bouncer]", "recipe[gidsy_common]", "recipe[gidsy_celery]", "recipe[new_relic]", "recipe[hostname]", "recipe[papertrail]" ],... "name": "celery", "json_class": "Chef::Role" { } "name": "staging", "cookbook_versions": { "gidsy_common": "0.0.3" }, "override_attributes": { "gidsy": { "DISABLE_QUERYSET_CACHE": "False", "COMPRESS_ENABLED": "True", "EMAIL_HOST_PASSWORD": "*****", "BROKER_URL": "redis://14.21.12.18:6379/5", "HAYSTACK_URL": "http://10.24.15.21:9200/" }, "databases": { "gidsy": "host=11.21.17.34 dbname=gidsy", }, },... "json_class": "Chef::Environment", "chef_type": "environment"

Provisioning servers Starting a new web server using chef knife ec2 server create -N staging-web1 -r "role[web]" -G staging-web -E staging -I ami-95dde2e1 -f m1.small -Z eu-west-1a Running commands on all web servers knife ssh role:web sudo chef-client Deleting a web server knife ec2 server delete i-1234567

Working with cloud servers ec2-ssh before ssh ubuntu@ec2-42-11-12-11.eu-west-1.compute.amazonaws.com -i ~/.ssh/gidsy.pem after ec2-ssh phil@production-web2 Simple syntax Name never changes, unlike url on reboot of server

Working with cloud servers pychef Access node data and manipulate it with python Use it in fabric

Operations, metrics, maintenance Log everything you could need for debugging If you deploy often then you need immediate feedback Use services if you can (Mixpanel, NewRelic, Librato, Papertrail, Pagerduty) Show the metrics on a screen in the office

Operations, metrics, maintenance django-app-metrics Push data to the services (mixpanel, librato, log, db) App-metrics -> librato or mixpanel Logging -> papertrail -> librato Extended it to send one metric to many backends

Operations, metrics, maintenance Papertrail log of celery tasks sent Logs can be graphed by librato Set alerts on logs that send to pagerduty/hipchat/webhook...

Operations, metrics, maintenance Librato/Graphite Logs can be graphed by librato Set alerts on logs that send to pagerduty/hipchat/webhook...

Things we learned To bootstrap your startup quickly Only scale when you need to, but be prepared Be pragmatic, use the best tool to do the job Automate as much as you can Continuous Integration and Continuous Deployment Make routine tasks as easy as possible Use services Display metrics

Want to work with us? Engineering Web development Engineering Backend and Operations https://gidsy.com/jobs/

Questions? @gidsynews http://laboratory.gidsy.com/