Skip to content

Commit

Permalink
Licensing. README formatting updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
ojarva committed Jul 17, 2014
1 parent 3c26d57 commit 7ae301f
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 21 deletions.
15 changes: 15 additions & 0 deletions LICENSE.md
@@ -0,0 +1,15 @@
BSD 3-clause license

Copyright (c) 2014, Futurice Ltd

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67 changes: 46 additions & 21 deletions README → README.md
@@ -1,68 +1,90 @@
DATA MIGRATION
==============
You'll need a MySQL server where you can import the old fum3 database (/scripts/fum.sql; checkout ee92c90 or earlier)
Default username and password can be found from the script (/scripts/data_migration.py)

sh ./sync_data.sh


INSTALL
=======

# Ubuntu packages:
build-essential python-setuptools python-dev libldap2-dev libsasl2-dev libssl-dev

```
apt-get install build-essential python-setuptools python-dev libldap2-dev libsasl2-dev libssl-dev
pip install -r requirements.txt
npm install

python manage.py runserver --nostatic
- add REMOTE_USER=username in front to test "SSO" authentication locally
```

Add `REMOTE_USER=username` in front to simulate authentication performed by web server.

`python manage.py collectstatic` # rest_framework css/js

Background processes
--------------------

python manage.py collectstatic # rest_framework css/js
LESS/JS bunding, and moving of APP/static to /static:

# BACKGROUND PROCESSES
## LESS/JS bunding, and moving of APP/static to /static
python watcher.py
`python watcher.py`

# TESTING
python manage.py test --settings=fum.settings.test
Testing:

`python manage.py test --settings=fum.settings.test`

SEARCH (Haystack + SOLR)
========================

get solr and unzip:

```
wget http://www.nic.funet.fi/pub/mirrors/apache.org/lucene/solr/3.6.2/apache-solr-3.6.2.zip
unzip apache-solr-3.6.2.zip
```

update solr schema:

```
python manage.py build_solr_schema > schema.xml
```

drop the schema to solr's conf folder:

```
cp schema.xml apache-solr-3.6.2/example/solr/conf/
```

create stopwords_en.txt:

```
cp apache-solr-3.6.2/example/solr/conf/stopwords.txt apache-solr-3.6.2/example/solr/conf/stopwords_en.txt
```

add the schema location to you PATH:

```
export PATH=$PATH:/../../apache-solr-3.6.2/example/solr/conf/
```

start solr:

```
java -jar /apache-solr-3.6.2/example/start.jar
```

update indexes:

```
python ./manage.py update_index
```

and start searching :-)
and start searching.


DEPLOY
======

```
fab production <COMMAND>
deploy
reset_and_sync
```

PRODUCTION SERVER SETUP
=======================

```
apt-get install \
build-essential python-setuptools python-dev \
git git-core curl \
Expand All @@ -85,13 +107,16 @@ apt-get install python-software-properties python g++ make
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs

```

CRON REMINDERS
==============

Check for expiring passwords:

```
python manage.py remind (--dry-run)
```

This should be ran once a day and sends a reminder at 30 days, 2 weeks and every day for the last week.
A final notice is sent once the password has expired.
Expand Down

0 comments on commit 7ae301f

Please sign in to comment.