Commit 53375c7d authored by Kroustouris Stauros's avatar Kroustouris Stauros

upgrade docs

parent 85109173
......@@ -26,7 +26,7 @@ Currently the source code is availiable at code.grnet.gr and github and can be c
git clone https://code.grnet.gr/git/djnro
git clone https://github.com/grnet/djnro.git
The Greek eduroam webpage is a living example of DjNRO: `eduroam|gr <http://www.eduroam.gr>`_
The Greek eduroam webpage is a living example of DjNRO: [eduroam|gr](http://www.eduroam.gr)
## Features
......
......@@ -238,13 +238,13 @@ In DjNRO the NRO sets the environment for the institution eduroam admins. Theref
## Exporting Data
DjNRO can export data in formats suitable for use by other software.
XML documents conforming to the `eduroam database <https://monitor.eduroam.org/database.php>`_ schemata are exported at the following URLs, as required for harvesting by eduroam.org::
XML documents conforming to the [eduroam database](https://monitor.eduroam.org/database.php>) schemata are exported at the following URLs, as required for harvesting by eduroam.org:
/general/realm.xml
/general/institution.xml
/usage/realm_data.xml
A list of institution administrators can be exported in CSV format or a plain format suitable for use by a mailing list (namely `Sympa <http://www.sympa.org/manual/parameters-data-sources#include_remote_file>`_). This data is available through:
A list of institution administrators can be exported in CSV format or a plain format suitable for use by a mailing list (namely [Sympa](http://www.sympa.org/manual/parameters-data-sources#include_remote_file>). This data is available through:
* a management comand `./manage.py contacts`, which defaults to CSV output (currently with headers in Greek!) and can switch to plain output using `--mail-list`.
......@@ -354,9 +354,9 @@ The closest point API allows for development of location aware-applications.
Pebduroam is a Pebble watch application that fetches the closest eduroam access point plus walking instructions on how to reach it.
Installing the application on your Pebble watch can be done in 2 ways:
* You can install the application via the Pebble App Store: `pebduroam <https://apps.getpebble.com/applications/5384b2119c84af48350000c7>`_
* You can install the application via the Pebble App Store: [pebduroam](https://apps.getpebble.com/applications/5384b2119c84af48350000c7>)
* You can install the application and contribute to its development via github: `pebduroam github repo <https://github.com/leopoul/pebduroam>`_.
* You can install the application and contribute to its development via github: [pebduroam github repo](https://github.com/leopoul/pebduroam>).
* You need to have a Cloudpebble account to accomplish this.
......
# Upgrading DjNRO from 0.8 to 1.0 or later
DjNRO 0.8 was developed with django 1.2. Version 1.0 was developed with django 1.4.2.
Dumpdata with the help of south (always keep a backup):
./manage.py dumpdata --indent=4 --natural --exclude=contenttypes --exclude=auth.Permission > /tmp/eduroam_0.8.json
## Install DjNro
Install DjNRO >= v1.0 by following the instructions.
## Patch widgets.py
Patch widgets.py (there is a bug in tinymce)
--- widgets.py
+++ widgets.py
@@ -11,7 +11,7 @@
from django.contrib.admin import widgets as admin_widgets
from django.core.urlresolvers import reverse
from django.forms.widgets import flatatt
-from django.forms.util import smart_unicode
+from django.utils.encoding import smart_unicode
from django.utils.html import escape
from django.utils import simplejson
from django.utils.datastructures import SortedDict
## Migrate
We have to introduce south the the models of social auth:
./manage.py migrate default 0001_initial --fake
And then run the real migration:
./manage.py migrate
# Loading old data to a new instance
In case you want to load data to a new database one has to follow these extra
steps.
In the old installation of DjNRO:
- install and add 'fixture_magic' to INSTALLED_APPS in settings.py
- run:
./manage.py reorder_fixtures --settings='settings' /tmp/eduroam_0.8.json edumanage.name_i18n edumanage.url_i18n edumanage.contact edumanage.realm edumanage.realmdata edumanage.institution edumanage.institutiondetails edumanage.institutioncontactpool edumanage.serviceloc edumanage.instserver edumanage.instrealm edumanage.instrealmmon edumanage.monlocalauthnparam edumanage.monproxybackclient > /tmp/eduroam_0.8.ordered.json
Now in the new installation:
- run `./manage.py loaddata --settings='settings' /tmp/eduroam_0.8.ordered.json`
- Continue with the `Migrate` step from above.
......@@ -8,6 +8,4 @@ pages:
- 'Installation':
- 'Requirements': 'installation/requirements.md'
- 'Installing DjNRO': 'installation/install.md'
# - 'Debian': 'installation/debian_wheezy.md'
# - 'Red Hat': 'installation/redhat.md'
# - 'Configuration': 'configuration.md'
- 'Upgrading from 0.8': 'installation/upgrading-from-0.8.md'
packages:
- apache 2.2 (web-server::apache2-worker) (first remove nginx)
- memcached
- mysql-server (mysql::server)
- mysql-client
- libapache2-mod-wsgi
- libapache2-mod-shib2
# (major) packages instead of pip
- python-memcache
- python-mysqldb
- python-django-auth-ldap (and therefore python-django)
- python-lxml
- python-yaml
# for PSA
- python-httplib2
- python-oauth2
- python-openid
# djnro requirements
#- libxml2-dev ***not necessary***
#- libxslt1-dev ***not necessary***
- gettext (for translation dev)
# to use pip/venv
- python-pip
- python-virtualenv
#- python-dev ***not necessary***
# irrelevant
- ipython
- patch
- mercurial
- winpdb
djnro-old virtualenv:
- Django==1.2.3
- South==0.7.5 (due to issue affecting migration edumanage:0028 https://lists.grnet.gr/wws/arc/djnro/2013-02/msg00001.html )
- django-extensions==0.5
- django-registration==0.7
- django-tinymce==1.5 ***with patch[1]***
- django-fixture-magic==0.0.7 (order fixtures with forward references)
#- httplib2==0.9.1 ***not necessary***
- ipaddr==2.1.11
- oauth==1.0.1
#- python-openid==2.2.4 ***not necessary***
- ipython (for shell_plus, some conflict with deb version)
- yolk
djnro-new virtualenv:
- South==1.0
- django-registration==1.0
- django-tinymce==1.5.3
- ipaddr==2.1.11
- longerusername==0.4
- python-social-auth==0.2.10
- requests==2.7.0 (also required by PSA)
- yolk
** virtualenv creation (relocatable):
- virtualenv --python=/usr/bin/python2.7 --system-site-packages /venvpath
- patch[3] /venvpath/bin/activate
- virtualenv --relocatable /venvpath
procedure
- install venv djnro-old
- patch[1] tinymce/widgets.py
- checkout branch oldstable
- patch[2] manage.py
- adjust paths/imports in settings.py/urls.py/django.wsgi
- create database:
create database eduroam character set = 'utf8' collate = 'utf8_unicode_ci';
- manage.py syncdb --setings='settings'
- manage.py migrate --setings='settings'
- (on network.grnet.gr) manage.py dumpdata --indent=4 --natural --exclude=contenttypes --exclude=auth.Permission > /tmp/eduroam_production.json
- add 'fixture_magic' to INSTALLED_APPS in settings.py
- manage.py reorder_fixtures --settings='settings' /tmp/eduroam_production.json edumanage.name_i18n edumanage.url_i18n edumanage.contact edumanage.realm edumanage.realmdata edumanage.institution edumanage.institutiondetails edumanage.institutioncontactpool edumanage.serviceloc edumanage.instserver edumanage.instrealm edumanage.instrealmmon edumanage.monlocalauthnparam edumanage.monproxybackclient > /tmp/eduroam_production.ordered.json
- manage.py loaddata --settings='settings' /tmp/eduroam_production_20150927b.ordered.json
- apache setup vhost
### confirm working oldstable
- install venv djnro-new
- checkout manage.py
- checkout branch master
- adjust djnro/local_settings.py
- manage.py migrate default 0001_initial --fake
(add accounts/migrations/0004_migrate_google_accounts.py)
- manage.py migrate
- apache setup vhost
[1] patch:
Index: widgets.py
===================================================================
--- widgets.py
+++ widgets.py
@@ -11,7 +11,7 @@
from django.contrib.admin import widgets as admin_widgets
from django.core.urlresolvers import reverse
from django.forms.widgets import flatatt
-from django.forms.util import smart_unicode
+from django.utils.encoding import smart_unicode
from django.utils.html import escape
from django.utils import simplejson
from django.utils.datastructures import SortedDict
[2] patch:
diff --git a/manage.py b/manage.py
index bcdd55e..5e78ea9 100755
--- a/manage.py
+++ b/manage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
[3] patch:
--- a/activate 2015-09-28 03:12:24.000000000 +0300
+++ b/activate 2015-09-28 03:12:57.000000000 +0300
@@ -37,7 +37,16 @@
# unset irrelavent variables
deactivate nondestructive
-VIRTUAL_ENV="/venvpath"
+if [ -n "$BASH" ]; then
+ VIRTUAL_ENV=$(readlink -f "${BASH_SOURCE}" | sed 's#/bin/activate[^/]*$##')
+elif [ -n "$ZSH_VERSION" ]; then
+ VIRTUAL_ENV=$(readlink -f "${(%):-%N}" | sed 's#/bin/activate[^/]*$##')
+else
+ return 1
+fi
+if [ -z "$VIRTUAL_ENV" ]; then
+ return 1
+fi
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment