2
2
Setting up the development environment
3
3
======================================
9
to setup and test your development environment. If you haven't used
10
pip before or setup its download cache, you may want to do the
11
following first so that you don't need to download eggs for each
12
branch or project that you work on:
5
This branch sets up its own development environment using fabric and
6
virtualenv. You can ensure all the required packages are installed on
7
your development machine with:
9
$ sudo apt-get install fabric python-virtualenv postgresql-server-dev-9.1 python-dev unzip
11
(python-dev and postgresql-server-dev-9.1 are required for building
12
the psycopg driver on Oneiric).
14
To bootstrap your development environment:
17
And to verify that all tests are passing in your development environment:
20
If you haven't used pip before or setup its download cache, you may want to do
21
the following first so that you don't need to download eggs for each branch or
22
project that you work on:
14
24
$ mkdir -p ~/.pip/cache
15
25
$ echo -e "[global]\ndownload_cache = ~/.pip/cache" > ~/.pip/pip.conf
17
If you will also be testing against postgres, you'll also need
18
the postgres debversion package (for your version of postgres).
77
84
>>> response = api.submit_review(review=request)
87
====================================
88
Testing and developing with Postgres
89
====================================
91
Currently our production servers run postgresql-8.4 on lucid,
92
but until we provide a virtual machine or bootstrap an lx-container
93
matching our production OS, we need to satisfy dependencies for
94
a dev environment in Oneiric, which means using postgresql-9.1
95
(as the debversion plugin is only available for 9.1 in oneiric).
97
$ sudo apt-get install postgresql-9.1 postgresql-9.1-debversion
99
then edit the postgres authentication file to allow trusted access
100
to the postgres user (note: obvious security risk for any net-facing
101
machine - if you're using a publicly accessible machine, then you should
102
know a more secure way of enabling access :P):
104
$ sudo vim /etc/postgresql/9.1/main/pg_hba.conf
106
find the line that looks like:
109
# Database administrative login by Unix domain socket
110
local all postgres peer
113
and change peer to trust, save, then restart postgres with:
115
$ sudo service postgresql restart
117
Finally, for postgres, we need to ensure that the rnr database
121
postgres=# create database rnr;
125
You can now verify your setup with:
80
129
========================
81
130
Updating a remote server
82
131
========================