Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lots of deployment changes.

  • Loading branch information...
commit 205368256c849bec95e78629d9ba0226bf82bd84 1 parent 95dcb6d
@ericholscher ericholscher authored
View
2  deploy/cookbooks/main/files/default/memcached.conf
@@ -21,4 +21,4 @@ logfile /var/log/memcached.log
# Specify which IP address to listen on. The default is to listen on all IP addresses
# This parameter is one of the only security measures that memcached has, so make sure
# it's listening on a firewalled interface.
--l 10.177.72.204
+-l 0.0.0.0
View
8 deploy/cookbooks/main/files/default/readthedocs.vcl
@@ -21,6 +21,7 @@ director doubleteam round-robin {
acl purge {
"localhost";
"192.0.2.14";
+ "10.177.72.204";
}
sub vcl_recv {
@@ -53,9 +54,12 @@ sub vcl_recv {
}
sub vcl_fetch {
- set beresp.ttl = 2m;
+ set beresp.ttl = 1m;
set req.grace = 5m;
if (req.http.host != "readthedocs.org") {
- set beresp.ttl = 10m;
+ set beresp.ttl = 7d;
+ }
+ if (req.http.host ~ "(.+).rtfd.org") {
+ set beresp.ttl = 10s;
}
}
View
2  deploy/cookbooks/main/files/default/varnish.conf
@@ -6,7 +6,7 @@ stop on runlevel [!2345]
kill timeout 20
script
-exec varnishd -F -f /etc/varnish/readthedocs.vcl
+exec varnishd -F -f /etc/varnish/readthedocs.vcl -T localhost:60001
end script
respawn
View
0  deploy/cookbooks/main/files/default/varnishlog.conf 100755 → 100644
File mode changed
View
12 deploy/cookbooks/main/recipes/nginx.rb
@@ -1,5 +1,13 @@
-package "nginx" do
- :upgrade
+script "Install Nginx" do
+ interpreter "bash"
+ code <<-EOH
+ nginx=stable # use nginx=development for latest development version
+ echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/nginx-$nginx-$(lsb_release -cs).list
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
+ apt-get update
+ apt-get install nginx
+ EOH
+ not_if "nginx -V |grep 0.8"
end
service "nginx" do
View
10 deploy/cookbooks/main/recipes/postgres.rb
@@ -0,0 +1,10 @@
+package "postgresql" do
+ :upgrade
+end
+
+service "postgresql-8.4" do
+ enabled true
+ running true
+ supports :status => true, :restart => true
+ action [:enable, :start]
+end
View
1  deploy/cookbooks/main/recipes/readthedocs.rb
@@ -62,5 +62,4 @@
code <<-EOH
/home/docs/sites/readthedocs.org/bin/pip install -r /home/docs/sites/readthedocs.org/checkouts/readthedocs.org/deploy_requirements.txt
EOH
- not_if { true }
end
View
21 deploy/cookbooks/main/templates/default/readthedocs
@@ -104,28 +104,25 @@ server {
server {
listen 8000;
- server_name www.sphinxdocs.com sphinxdocs.com www.readthedocs.com readthedocs.com www.readthedocs.org djangowoodies.com;
+ server_name rtfd.org sphinxdocs.com www.readthedocs.com readthedocs.com www.readthedocs.org djangowoodies.com;
rewrite ^(.*) http://readthedocs.org$1;
}
server {
listen 8000;
- server_name rtfd.org;
- rewrite ^/(\w+)$ http://$1.readthedocs.org/;
- rewrite ^(.*)$ http://readthedocs.org/;
-}
-
-server {
- listen 9998;
- listen 8000;
- server_name django.rtfd.org;
+ server_name ~^(?P<domain>.+).rtfd.org;
location / {
- proxy_pass http://127.0.0.1:9999;
+ proxy_pass http://127.0.0.1:8888;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Deity <%= node.hostname %>;
}
- #rewrite ^(.*)$ http://$domain.readthedocs.org$1?rtfd;
+}
+
+server {
+ listen 8000;
+ server_name rtfd.org;
+ rewrite ^(.*)$ http://$domain.readthedocs.org/;
}
View
2  deploy/node.json
@@ -3,6 +3,6 @@
"json_class": "Chef::Role",
"description": "Web Server",
"chef_type": "role",
- "run_list": [ "role[default]", "main::memcached", "main::nginx", "main::readthedocs", "main::gunicorn"],
+ "run_list": [ "role[default]", "main::memcached", "main::nginx", "main::readthedocs", "main::gunicorn", "main::celery"],
"default_attributes": {}
}
View
7 deploy/roles/all.json
@@ -0,0 +1,7 @@
+{
+ "json_class": "Chef::Role",
+ "description": "Web Server",
+ "chef_type": "role",
+ "run_list": [ "role[default]", "main::postgres", "main::memcached", "main::nginx", "main::readthedocs", "main::gunicorn", "main::celery"],
+ "default_attributes": {}
+}
View
4 deploy/roles/default.json
@@ -13,14 +13,14 @@
"pip_python_packages": {"virtualenv": "1.5.1", "mercurial": "1.7"},
"users": {
"docs": {
- "id": 1001,
+ "id": 1005,
"full_name": "Docs User",
"key": "redacted"
}
},
"groups": {
"docs": {
- "gid": 201,
+ "gid": 205,
"members": ["docs"]
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.