Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
727 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ static/* | |
chef/cookbooks/palewire/files/default/users/* | ||
chef/node.json | ||
newrelic.ini | ||
fabfile/env.py |
35 changes: 14 additions & 21 deletions
35
chef/cookbooks/palewire/files/default/apache/apache2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,28 @@ | ||
ServerName elections.latimes.com | ||
LockFile ${APACHE_LOCK_DIR}/accept.lock | ||
ServerName datadesk | ||
Mutex file:${APACHE_LOCK_DIR} default | ||
PidFile ${APACHE_PID_FILE} | ||
Timeout 60 | ||
KeepAlive Off | ||
StartServers 2 | ||
MinSpareThreads 2 | ||
MaxSpareThreads 4 | ||
ThreadLimit 10 | ||
ThreadsPerChild 10 | ||
MaxClients 160 | ||
MaxRequestsPerChild 10000 | ||
StartServers 2 | ||
MinSpareThreads 2 | ||
MaxSpareThreads 4 | ||
ThreadLimit 10 | ||
ThreadsPerChild 10 | ||
MaxRequestWorkers 160 | ||
MaxConnectionsPerChild 10000 | ||
User ${APACHE_RUN_USER} | ||
Group ${APACHE_RUN_GROUP} | ||
AccessFileName .htaccess | ||
<Files ~ "^\.ht"> | ||
Order allow,deny | ||
Deny from all | ||
Satisfy all | ||
</Files> | ||
DefaultType text/plain | ||
HostnameLookups Off | ||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
LogLevel warn | ||
Include mods-enabled/*.load | ||
Include mods-enabled/*.conf | ||
Include httpd.conf | ||
Include ports.conf | ||
Include sites-enabled/* | ||
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O" common | ||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %b" common | ||
LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost | ||
LogFormat "%{Referer}i -> %U" referer | ||
LogFormat "%{User-agent}i" agent | ||
Include conf.d/ | ||
Include sites-enabled/ | ||
LogFormat "%{User-agent}i" agent |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
39 changes: 3 additions & 36 deletions
39
chef/cookbooks/palewire/files/default/postgresql/create_postgis_template.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,11 @@ | ||
#!/bin/bash | ||
|
||
GEOGRAPHY=0 | ||
POSTGIS_SQL=postgis.sql | ||
|
||
# For Ubuntu 8.x and 9.x releases. | ||
if [ -d "/usr/share/postgresql-8.3-postgis" ] | ||
then | ||
POSTGIS_SQL_PATH=/usr/share/postgresql-8.3-postgis | ||
POSTGIS_SQL=lwpostgis.sql | ||
fi | ||
|
||
# For Ubuntu 10.04 | ||
if [ -d "/usr/share/postgresql/8.4/contrib" ] | ||
then | ||
POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib | ||
fi | ||
|
||
# For Ubuntu 10.10 (with PostGIS 1.5) | ||
if [ -d "/usr/share/postgresql/8.4/contrib/postgis-1.5" ] | ||
then | ||
POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib/postgis-1.5 | ||
GEOGRAPHY=1 | ||
fi | ||
|
||
# For Ubuntu 11.10 / Linux Mint 12 (with PostGIS 1.5) | ||
if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ] | ||
then | ||
POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib/postgis-1.5 | ||
GEOGRAPHY=1 | ||
fi | ||
POSTGIS_SQL_PATH=/usr/share/postgresql/9.4/contrib/postgis-2.1 | ||
|
||
createdb -E UTF8 template_postgis && \ | ||
( createlang -d template_postgis -l | grep plpgsql || createlang -d template_postgis plpgsql ) && \ | ||
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" && \ | ||
psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \ | ||
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \ | ||
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" && \ | ||
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" | ||
|
||
if [ $GEOGRAPHY -eq 1 ] | ||
then | ||
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" | ||
fi | ||
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" && \ | ||
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 1 addition & 15 deletions
16
chef/cookbooks/palewire/templates/default/apache/ports.conf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1 @@ | ||
NameVirtualHost *:<%= @apache_port %> | ||
Listen <%= @apache_port %> | ||
|
||
<IfModule mod_ssl.c> | ||
# If you add NameVirtualHost *:443 here, you will also have to change | ||
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl | ||
# to <VirtualHost *:443> | ||
# Server Name Indication for SSL named virtual hosts is currently not | ||
# supported by MSIE on Windows XP. | ||
Listen 443 | ||
</IfModule> | ||
|
||
<IfModule mod_gnutls.c> | ||
Listen 443 | ||
</IfModule> | ||
Listen <%= @apache_port %> |
13 changes: 10 additions & 3 deletions
13
chef/cookbooks/palewire/templates/default/apache/vhost.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
<VirtualHost *:<%= @apache_port %>> | ||
ServerName <%= @server_name %> | ||
ServerAlias <%= @server_name %> | ||
WSGIScriptAlias / /apps/<%= @app_name %>/project/apache/django.wsgi | ||
WSGIDaemonProcess <%= @app_name %> user=<%= @apps_user %> display-name=%{GROUP} processes=2 threads=15 | ||
WSGIScriptAlias / /apps/<%= @app_name %>/repo/project/wsgi_prod.py | ||
WSGIDaemonProcess <%= @app_name %> user=<%= @apps_user %> processes=2 threads=15 display-name=%{GROUP} python-path=/apps/<%= @app_name %>/lib/python2.7/site-packages/:/apps/<%= @app_name %>/repo/ | ||
WSGIProcessGroup <%= @app_name %> | ||
WSGIApplicationGroup %{GLOBAL} | ||
</VirtualHost> | ||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
<Directory /apps/<%= @app_name %>/repo/project/> | ||
<Files wsgi_prod.py> | ||
Require all granted | ||
</Files> | ||
</Directory> | ||
</VirtualHost> |
Oops, something went wrong.