README.md 5.78 KB
Newer Older
1
# ROOMLIST
Daniel W Bond's avatar
Daniel W Bond committed
2

3
Roomlist is a secure, privacy-oriented service for Mason studens to find their on-campus neighbors.
Daniel W Bond's avatar
Daniel W Bond committed
4

5
## On Contributing
Daniel W Bond's avatar
Daniel W Bond committed
6

7
Roomlist welcomes all the help it can get. Even if you don't feel like you can be helpful the more technical aspects, we definitely need designers, technical writers, and testers.
Daniel W Bond's avatar
Daniel W Bond committed
8
9
10

There are many things that can be done with this project (see the "To Do" section), but sometimes it's the small things that count, so don't be afraid of contributing just a small spelling mistake.

Jason D Yeomans's avatar
Jason D Yeomans committed
11
If you need help at all please contact a SRCT member. We want people to contribute, so if you are struggling, or just want to learn we are more than willing to help.
Daniel W Bond's avatar
Daniel W Bond committed
12

13
The project manager for this project is [Jason Yeomans](jyeoman2@gmu.edu), and a lead developer is [Daniel Bond](dbond2@gmu.edu).
Daniel W Bond's avatar
Daniel W Bond committed
14
15
16

Please visit the [SRCT Wiki](http://wiki.srct.gmu.edu/) for more information on this and other SRCT projects, along with other helpful links and tutorials.

17
## Setting everything up for development
Daniel W Bond's avatar
Daniel W Bond committed
18

19
These instructions are for Ubuntu and Debian, or related Linux distributions. (If you'd like to help write the instructions for Mac's OSX, please do!)
Daniel W Bond's avatar
Daniel W Bond committed
20

21
### Prerequisities
Daniel W Bond's avatar
Daniel W Bond committed
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
### Package Installation

First, install python, pip, and git on your system. Python is the programming language used for Django, the web framework used by Roomlist. 'Pip' is the python package manager. Git is the version control system used for SRCT projects.

Open a terminal and run the following commands.

`sudo apt-get update`

This retrieves links to the most up-to-date and secure versions of your packages. Next, with

`sudo apt-get install python python-dev python-pip git`

you install python and git.

We're using Postgres for our database, so run

`sudo apt-get install postgresql postgresql-contrib python-psycopg2`.

### Copying Down the Source Code

43
Now, we're going to copy down a copy of the Roomlist codebase from git.gmu.edu, the SRCT code respository.
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

Configure your ssh keys by following the directions at git.gmu.edu/help/ssh/README.

Now, on your computer, navigate to the directory in which you want to download the project (perhaps one called development/ or something similar), and run

`git clone git@git.gmu.edu:srct/roomlist.git`

### The Virtual Environment

Virtual environments are used to keep separate project packages from the main computer, so you can use different versions of packacages across different projects and also ease deployment server setup.

It's often recommended to create a special directory to store all of your virtual environments together, but some prefer keeping their virtual environment in the top level of their project's director. If you choose the latter, make sure to keep the virtual environment folders out of version control.

(For example, `mkdir ~/venv`, `cd ~/venv`)

Run `sudo pip install virtualenv`

to install virtualenv system-wide, and then run

`virtualenv roomlist`

in your virtual environment directory to create your virtual environment. Activate it by typing

67
`source roomlist/bin/activate`
68
69
70
71
72

If you ever need to exit your virtual environment, simply run

`deactivate`

73
Now, the packages you need to install for Roomlist are in in the top level of the project's directory structure. Run
74
75
76
77
78
79
80
81

`pip install -r requirements.txt`

to in install all of the packages needed for the project.

Next, run `python manage.py makemigrations`, `python manage.py migrate`, then `python manage.py runserver`.

### Creating the Database
Daniel W Bond's avatar
Daniel W Bond committed
82

83
84
To set up the PostgreSQL database, open a terminal and type in the following commands:

85
86
First, we must install some dependencies for PostgreSQL.

87
``$ sudo apt-get install libpq-dev python-dev``
88
89
90

Next, we need to install PostgreSQL.

91
``$ sudo apt-get install postgresql postgresql-contrib``
92
93
94

Now, we need to become the postgres user, create our database, and create our user.

95
96
``$ sudo su - postgres``
``$ createdb roomlist``
97
98
99
100
101
102
103
104
105

Choose your username, and execute the next command without the quotes.

``$ createuser -P "your_username"``

You'll then be prompted to twice enter your password. Choose a strong passphrase for production. For local development, password strength is less important.

Finally, we need to enter the PostgreSQL command line interface to grant permissions.

106
107
``$ psql``
``postgres=# GRANT ALL PRIVILEGES ON DATABASE roomlist TO django;``
108

109
110
Your PostgreSQL database should now be set up to work with the Roomlist project.

111
112
Type ``\q`` and hit enter to exit the PostgreSQL shell.

113
Copy the secret.py.template and config.py.template to secret.py and config.py respectively. For each, follow the comment instruction provided in each file.
114

Daniel W Bond's avatar
Daniel W Bond committed
115
116
Run `python manage.py syncdb` to set up the empty database tables. When you're prompted, say 'y' to setting up the superuser, but use your mason username and full mason email address (@masonlive.gmu.edu) for the account. This is because we use Mason's Central Authentication for our user signin, and your admin account needs to manage your CAS account.

117
## Starting up the test server
118

119
120
121
With your virtual environment active, run

`python manage.py runserver` in the directory with `manage.py`
Daniel W Bond's avatar
Daniel W Bond committed
122
123
124

Head over to localhost:8000 and see the site!

125
126
127
128
129
130
131
132
## Deployment

### Docker

For server deployment, not for most local work

## To-do

133
The list of to-do items is kept track of on the gitlab Roomlist issues page. https://git.gmu.edu/srct/roomlist/issues
134
135

Each issue includes details about the bugs and features, and links to documentation and tutorials to help with fixing that specific issue.
Daniel W Bond's avatar
Daniel W Bond committed
136

137
Contact the project manager or any of its developers if you'd like help picking an unassigned issue.
Daniel W Bond's avatar
Daniel W Bond committed
138

139
## About Mason SRCT
Daniel W Bond's avatar
Daniel W Bond committed
140
141

**S**tudent - **R**un **C**omputing and **T**echnology (*SRCT*, pronounced "circuit") is a student organization at George Mason University which enhances student computing at Mason. SRCT establishes and maintains systems which provide specific services for Mason's community.