Merge ~pappacena/launchpad:enabling-gunicorn-in-tests into launchpad:master

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: d141aa797265b80e83991e369ea68df5e7d401e0
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:enabling-gunicorn-in-tests
Merge into: launchpad:master
Prerequisite: ~pappacena/launchpad:enabling-gunicorn-in-development
Diff against target: 81 lines (+31/-0)
6 files modified
configs/replicated-development/gunicorn.conf.py (+6/-0)
configs/replicated-development/launchpad-lazr.conf (+4/-0)
configs/test-playground/gunicorn.conf.py (+12/-0)
configs/test-playground/launchpad-lazr.conf (+4/-0)
configs/testrunner-appserver/launchpad-lazr.conf (+3/-0)
configs/testrunner/launchpad-lazr.conf (+2/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+396770@code.launchpad.net

Commit message

Using gunicorn when running tests

To post a comment you must log in.
d141aa7... by Thiago F. Pappacena

Merge branch 'enabling-gunicorn-in-development' into enabling-gunicorn-in-tests

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/configs/replicated-development/gunicorn.conf.py b/configs/replicated-development/gunicorn.conf.py
0new file mode 1006440new file mode 100644
index 0000000..b667109
--- /dev/null
+++ b/configs/replicated-development/gunicorn.conf.py
@@ -0,0 +1,6 @@
1bind = [":8085", ":8086", ":8087", ":8088", ":8089"]
2workers = 2
3threads = 10
4max_requests = 1000
5log_level = "DEBUG"
6reload = True
diff --git a/configs/replicated-development/launchpad-lazr.conf b/configs/replicated-development/launchpad-lazr.conf
index 364d5e6..750c283 100644
--- a/configs/replicated-development/launchpad-lazr.conf
+++ b/configs/replicated-development/launchpad-lazr.conf
@@ -8,3 +8,7 @@ extends: ../development/launchpad-lazr.conf
8[database]8[database]
9rw_main_master: dbname=launchpad_dev_master port=54339rw_main_master: dbname=launchpad_dev_master port=5433
10rw_main_slave: dbname=launchpad_dev_slave port=543310rw_main_slave: dbname=launchpad_dev_slave port=5433
11
12[launchpad]
13devmode: true
14use_gunicorn: true
diff --git a/configs/test-playground/gunicorn.conf.py b/configs/test-playground/gunicorn.conf.py
11new file mode 10064415new file mode 100644
index 0000000..ba22ec1
--- /dev/null
+++ b/configs/test-playground/gunicorn.conf.py
@@ -0,0 +1,12 @@
1import os
2config_dir = os.path.dirname(__file__)
3log_dir = os.path.join(config_dir, '..', '..', 'logs')
4
5bind = [":8085", ":8087"]
6workers = 1
7threads = 10
8log_level = "DEBUG"
9
10log_file = os.path.join(log_dir, 'gunicorn.log')
11error_logfile = os.path.join(log_dir, 'gunicorn-error.log')
12access_logfile = os.path.join(log_dir, 'gunicorn-access.log')
diff --git a/configs/test-playground/launchpad-lazr.conf b/configs/test-playground/launchpad-lazr.conf
index 8790cb6..77818e4 100644
--- a/configs/test-playground/launchpad-lazr.conf
+++ b/configs/test-playground/launchpad-lazr.conf
@@ -8,3 +8,7 @@ extends: ../development/launchpad-lazr.conf
8[database]8[database]
9rw_main_master: dbname=launchpad_ftest_playground9rw_main_master: dbname=launchpad_ftest_playground
10rw_main_slave: dbname=launchpad_ftest_playground10rw_main_slave: dbname=launchpad_ftest_playground
11
12[launchpad]
13devmode: true
14use_gunicorn: true
diff --git a/configs/testrunner-appserver/launchpad-lazr.conf b/configs/testrunner-appserver/launchpad-lazr.conf
index 80faefb..3653a4d 100644
--- a/configs/testrunner-appserver/launchpad-lazr.conf
+++ b/configs/testrunner-appserver/launchpad-lazr.conf
@@ -12,6 +12,9 @@ launch: False
12launch: False12launch: False
1313
14[launchpad]14[launchpad]
15# Make this work a little more like production.
16devmode: false
17use_gunicorn: true
15openid_provider_root: http://testopenid.test:8085/18openid_provider_root: http://testopenid.test:8085/
16internal_macaroon_secret_key: internal-dev-macaroon-secret19internal_macaroon_secret_key: internal-dev-macaroon-secret
1720
diff --git a/configs/testrunner/launchpad-lazr.conf b/configs/testrunner/launchpad-lazr.conf
index e5a0ad8..1e930d6 100644
--- a/configs/testrunner/launchpad-lazr.conf
+++ b/configs/testrunner/launchpad-lazr.conf
@@ -101,6 +101,8 @@ public_https: True
101max_scaling: 2101max_scaling: 2
102102
103[launchpad]103[launchpad]
104devmode: true
105use_gunicorn: true
104basic_auth_password: test106basic_auth_password: test
105max_attachment_size: 1024107max_attachment_size: 1024
106geoip_database: lib/lp/services/geoip/tests/data/test.mmdb108geoip_database: lib/lp/services/geoip/tests/data/test.mmdb