This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
import os | |
import shutil | |
import subprocess | |
import sys | |
import tarfile | |
import urllib2 | |
LIBXML2_PREFIX = "libxml2" | |
LIBXSLT_PREFIX = "libxslt" | |
LIBXML2_FTPURL = "ftp://xmlsoft.org/libxml2/" |
""" | |
Taken from (http://djangosnippets.org/snippets/1949/) | |
and made some adjustments for cases when queryset is empty | |
""" | |
import gc | |
def queryset_iterator(queryset, chunksize=1000): | |
''''' | |
Iterate over a Django Queryset ordered by the primary key |
1. pip install -r reqs.pip | |
2. server.py | |
3. open client.html in browser | |
4. redis-cli publish push '123456' | |
5. check browser console |
#! /bin/bash | |
SHOW_COVERAGE=0 | |
if [ "$1" == "-" ] | |
then | |
SHOW_COVERAGE=1 | |
app="" | |
else | |
app=$1 | |
fi |
# dont do this | |
this_function_name(foo, bar | |
baz) | |
# do this | |
cramers_version( | |
foo, bar, baz) | |
# allow this | |
cramers_version(foo, bar, |
[circus] | |
statsd = 1 | |
stats_endpoint = tcp://127.0.0.1:5557 | |
httpd = 1 | |
httpd_host = 127.0.0.1 | |
httpd_port = 8001 | |
endpoint = tcp://127.0.0.1:5555 | |
pubsub_endpoint = tcp://127.0.0.1:5556 | |
check_delay = 5 | |
logoutput = logs/circus.log |
General key themes:
Hiring is really hard. You’re not just hiring a “Rails Engineer” or a “Python Programmer” you’re hiring someone who can help you change the world. Tell them why! Talk about the hard problems you’re solving. 2/3 of these talks give ideas and insight into hiring from sourcing to actual interview processes.
Rewriting systems is hard. People think they are going to replace their broken down horse and buggie with a bullet train and this often ends up in disaster. Successful rewrites require an incremental approach that takes months/years and often runs way over schedule. 2/3 of these talks go over how to handle rewrites not only from a high level technical perspective but a cultural/management perspective as well.