Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes found during the class today.

  • Loading branch information...
commit 87b5e5c52889d4571f8e53930f9ed87b4fcb14b8 1 parent bedcd0b
@jacobian jacobian authored
View
18 apache/apache2.conf
@@ -19,7 +19,7 @@ Listen *:80
Timeout 60
StartServers 2
-ServerLimit 5
+ServerLimit 4
MinSpareThreads 2
MaxSpareThreads 4
ThreadLimit 10
@@ -66,4 +66,18 @@ DocumentRoot "/home/web/static"
# And finally the app config.
#
-WSGIScriptAlias / "/home/web/myblog/mingus.wsgi"
+WSGIScriptAlias / "/home/web/myblog/mingus.wsgi"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
View
2  chef/cookbooks/web/recipes/default.rb
@@ -8,7 +8,7 @@
package "subversion"
package "mercurial"
-cookbook_file "/etc/apache2/apache2.conf" do
+template "/etc/apache2/apache2.conf" do
source "apache2.conf"
owner "root"
group "root"
View
3  chef/node.json
@@ -1,3 +1,4 @@
{
- "run_list": ["web::default"]
+ "run_list": ["web::default"],
+ "django_settings_module": "mingus.settings"
}
View
10 fabfile.py
@@ -12,7 +12,7 @@
# This is a bit more complicated than needed because I'm using Vagrant
# for the examples.
-env.hosts = ['pycon-web2']
+env.hosts = ['pycon-web2', 'pycon-web1']
env.user = 'vagrant'
env.key_filename = '/Library/Ruby/Gems/1.8/gems/vagrant-0.7.2/keys/vagrant'
@@ -38,7 +38,7 @@ def push():
def update_dependencies():
"Update Mingus' requirements remotely."
put("mingus-config/requirements.txt", "%s/requirements.txt", use_sudo=True)
- sudo("%(root)s/bin/pip install -r %(rot)s/requirements.txt" % env)
+ sudo("%(root)s/bin/pip install -r %(root)s/requirements.txt" % env)
def reload():
"Reload Apache to pick up new code changes."
@@ -95,4 +95,8 @@ def run_chef():
"""
project.rsync_project(local_dir='chef', remote_dir='/tmp', delete=True)
sudo('rsync -ar --delete /tmp/chef/ /etc/chef/')
- sudo('chef-solo')
+ sudo('chef-solo')
+
+
+
+
View
10 mingus-config/mingus.wsgi
@@ -25,4 +25,12 @@ sys.path.append('/home/web/myblog/django-mingus')
# Now do DJANGO_SETTINGS_MODULE and create the WSGI app.
os.environ['DJANGO_SETTINGS_MODULE'] = 'mingus.settings'
import django.core.handlers.wsgi
-application = django.core.handlers.wsgi.WSGIHandler()
+application = django.core.handlers.wsgi.WSGIHandler()
+
+
+
+
+
+
+
+
View
5 nginx/nginx.conf
@@ -34,8 +34,9 @@ http {
# HTTP upstream for load balancers.
upstream mingus {
- server 33.33.33.10:8000;
- #server 33.33.33.11:8000;
+ server 33.33.33.10:8000 weight=2;
+ server 33.33.33.11:8000 weight=3;
+ fair;
}
# The actual HTTP sever.
View
2  notes/pycon2011/script.txt
@@ -33,7 +33,7 @@ Hosts file for easier web-ing::
33.33.33.10 pycon-web1
33.33.33.11 pycon-web2
33.33.33.20 pycon-db1
-
+
1. Getting started
------------------
View
2  postgresql/pg_hba.conf
@@ -4,8 +4,8 @@
local all all trust
# Trust connections from known web servers.
+host all all 33.33.33.10/32 trust
host all all 33.33.33.11/32 trust
-host all all 33.33.33.12/32 trust
# If you'd prefer to use password authentication, you'll want something like:
#
Please sign in to comment.
Something went wrong with that request. Please try again.