Skip to content

Commit 6b56f3c

Browse files
committed
Tweaks to setup
1 parent 7bb8ac4 commit 6b56f3c

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

README.md

+35-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
CURRENTLY A MOVING TARGET
2-
--------------
3-
4-
This is currently in a pretty unstable state, as I'm just fleshing
5-
out features. Let me know if you want to help out!
6-
71
PyCon Program Committee Web App
82
-------------------------------
93

@@ -12,17 +6,13 @@ PyCon talk submissions. The program committee's job is extensive and daunting,
126
and I'm trying to knock together a simple web app to allow the work to proceed
137
as efficiently and effectively as I can. Requiring large groupings of
148
busy professionals to come together at the same time to chat on IRC is hard,
15-
and doesn't feel very scalable. This is my first step towards understanding how
9+
and doesn't feel very scalable. This is my first step toward understanding how
1610
to scale the whole thing.
1711

1812

1913

2014
Configuring the Applications
2115
------------------------
22-
As currently configured, the application connects to a local postgresql
23-
database, with username, password, and database name 'test'. The unit tests
24-
will create the tables for you, or I presume you can do something like
25-
`psql test < tables.sql`.
2616

2717
The application picks up configuration from environment variables. I like to
2818
use the envdir tool, but you can set them however you like. A complete set of
@@ -33,6 +23,28 @@ those.
3323
You can install envdir via `brew install daemontools` on OS X, and `apt-get
3424
install daemontools` on Ubuntu and Debian.
3525

26+
As configured by the values in `dev-config`, the application connects to a local
27+
postgresql database, with username, password, and database name 'test'.
28+
29+
Configuring the Database
30+
---------------------
31+
32+
The application uses a Postgresql database. If you're not familiar with setting
33+
up Postgresql, I've included `setup_db.sql` for you. Getting to the point where
34+
you're able to execute those commands is going to depend on your system. If
35+
you're on a Ubuntu-like system, and you've installed postgresql via something
36+
like `apt-get install postgresql`, you can probably run the `psql` command via
37+
something like `sudo -U postgres psql`. On OSX, if you've installed postgresql
38+
via brew, with something like `brew install postgresql`, you can probably just
39+
type `psql`.
40+
41+
You can create the test database and test user via
42+
`psql template1 < setup_db.sql`.
43+
44+
The unit tests will create the tables for you, or you can do something like
45+
`psql -U test test < tables.sql` to create empty tables from scratch.
46+
47+
3648

3749

3850
Running the Application
@@ -46,7 +58,16 @@ script `envdir dev-config ./fill_db_with_fakes.py`. You can then log in with
4658
an email from the sequence `user{0-24}@example.com`, and a password of `abc123`.
4759
`[email protected]` is an administrator.
4860

49-
To turn on Batch, `echo 1 > dev-config/THIS_IS_BATCH`.
61+
62+
63+
Deployment
64+
----------
65+
66+
You'll need deploy-config in your root directory, which should have all the
67+
appropriate secrets. From the deployment directory, you can run
68+
`ansible-playbook -i hosts prod.yaml`.
69+
70+
5071

5172
Understanding The PyCon Talk Review Process
5273
------------
@@ -60,3 +81,5 @@ The second part of the process is "batch". In batch, talks are
6081
moved into groups, and those groups are then reviewed one at a time, with
6182
a winner or two picked from every group. Some groups feel weak enough that no
6283
winners are picked.
84+
85+
To turn on Batch, `echo 1 > dev-config/THIS_IS_BATCH`.

setup_db.sql

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DROP DATABASE IF EXISTS test;
2+
DROP USER IF EXISTS test;
3+
4+
CREATE USER test WITH UNENCRYPTED PASSWORD 'test';
5+
CREATE DATABASE test WITH OWNER = test;

0 commit comments

Comments
 (0)