diff options
-rw-r--r-- | doc/doc.RPKI.CA.UI.GUI | 65 | ||||
-rw-r--r-- | doc/doc.RPKI.Installation | 7 | ||||
-rw-r--r-- | doc/manual.pdf | bin | 479091 -> 485324 bytes | |||
-rw-r--r-- | rpkid/rpki/gui/app/views.py | 8 |
4 files changed, 66 insertions, 14 deletions
diff --git a/doc/doc.RPKI.CA.UI.GUI b/doc/doc.RPKI.CA.UI.GUI index 6b7cefc9..d52e0a6b 100644 --- a/doc/doc.RPKI.CA.UI.GUI +++ b/doc/doc.RPKI.CA.UI.GUI @@ -1,27 +1,72 @@ ****** GUI Installation ****** -Be sure you have $LANG defined in your environment, as in +These steps assume that you have already installed and configured the other CA +tools. -If you are running FreeBSD, django-admin is actually invoked as django-admin.py +rpki-manage is a shell script wrapper around the django-admin command which +sets $PYTHONPATH and $DJANGO_SETTINGS_MODULE. - export LANG=en_US.UTF-8 +***** Prerequisites ***** -Then create the initial tables +* Django - $ django-admin syncdb --pythonpath /usr/local/etc/rpki --settings=settings +* Django South + +* Apache 2 + +* mod_wsgi 3 + +***** Upgrading from a Previous Release ***** + +If you had previously installed the web portal before the database migration +support was added, you will need to take some additional steps. + +**** Edit settings.py **** + +You will need to edit /usr/local/etc/rpki/settings.py and edit the +INSTALLED_APPS list to include 'south'. + +**** Sync databases **** + + $ rpki-manage syncdb + +**** Database Migration **** + +If you have not previously run the new database migration step, you will need +to run this command. Note that you only need to run this command the first time +you upgrade. + + $ rpki-manage migrate app 0001 --fake + +Now bring your database up to date with the current release: + + $ rpki-manage migrate app + +***** New Installation ***** + +**** Create the initial tables **** + + $ rpki-manage syncdb Answer "yes" when asked if you want to create superuser Enter username for superuser Enter password -If you need to create superuser, you can +If you need to create superuser at a later time, you can run - $ django-admin createsuperuser --pythonpath /usr/local/etc/rpki -- - settings=settings + $ rpki-manage createsuperuser If you need to change superuser's password - $ django-admin changepassword --settings=settings --pythonpath=/usr/local/ - etc/rpki <username> + $ rpki-manage changepassword <username> + +**** Perform Database Migration **** + +If there were any changes to the database schema, this command will bring your +existing database up to date with the current software. + + $ rpki-manage migrate app + +***** Configure Apache ***** Now configure apache, using /usr/local/etc/rpki/apache.conf, e.g. diff --git a/doc/doc.RPKI.Installation b/doc/doc.RPKI.Installation index 1b529615..3fd3f8cf 100644 --- a/doc/doc.RPKI.Installation +++ b/doc/doc.RPKI.Installation @@ -119,6 +119,13 @@ Packages you will need: o FreeBSD: /usr/ports/www/mod_wsgi3 +* http://south.aeracode.org/ Django South. This tool is used to ease the pain + of changes to the web portal database schema. + + o FreeBSD: /usr/ports/databases/py-south + o Ubuntu: python-django-south + o CentOS/RHEL: Django-south + ***** Configure and build ***** Once you have the prerequesite packages installed, you should be able to build diff --git a/doc/manual.pdf b/doc/manual.pdf Binary files differindex 5232cb81..a01fdcaf 100644 --- a/doc/manual.pdf +++ b/doc/manual.pdf diff --git a/rpkid/rpki/gui/app/views.py b/rpkid/rpki/gui/app/views.py index 6de313e3..02f145b3 100644 --- a/rpkid/rpki/gui/app/views.py +++ b/rpkid/rpki/gui/app/views.py @@ -374,12 +374,12 @@ def child_add_asn(request, pk): def add_address_callback(child, form): address_range = form.cleaned_data.get('address_range') - try: - r = resource_range_ipv4.parse_str(address_range) - version = 'IPv4' - except BadIPResource: + if ':' in address_range: r = resource_range_ipv6.parse_str(address_range) version = 'IPv6' + else: + r = resource_range_ipv4.parse_str(address_range) + version = 'IPv4' child.address_ranges.create(start_ip=str(r.min), end_ip=str(r.max), version=version) |