diff options
Diffstat (limited to 'portal-gui/README')
-rw-r--r-- | portal-gui/README | 89 |
1 files changed, 43 insertions, 46 deletions
diff --git a/portal-gui/README b/portal-gui/README index c05fadb1..b2c3a825 100644 --- a/portal-gui/README +++ b/portal-gui/README @@ -20,8 +20,8 @@ This is a list of the assumptions the current rpkigui code makes: instance. In rpki parlance, there is one "self-hosted" resource holder, and all the others are "hosted." -2) The myrpki.py command line tool will handle all the heavy lifting, so it must - be present on the installed system. +2) The myrpki.py command line tool will handle all the heavy lifting, so it + must be present on the installed system. 3) All the directories containing the files assosiated with each resource handle must reside in the same directory. That is, the @@ -41,9 +41,9 @@ This is a list of the assumptions the current rpkigui code makes: /entitydb/ ... -=== Installation === +=== Prerequisites === -First, you must install django 1.2 or greater on your system (django 1.1 may +First, you must install Django 1.2 or greater on your system (django 1.1 may work, but you will need to disable to CsrfMiddleware in settings.py). The web interface can be run out of the source directory for testing, or may be @@ -51,52 +51,51 @@ deployed to work with an existing web server. Instructions for using Django with Apache and mod_wsgi can be found at http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/#howto-deployment-modwsgi -==== Configuation === +==== Installation === -The primary configuration file for the portal gui is -$top/portal-gui/rpkigui/settings.py. At a minimum, you will need to change the -default settings for the following variables: +The portal-gui is configured via the use of the supplied "configure" +script. There are several required options: -* DATABASE_NAME - This string variable should contain the full path for the sqlite -database that the portal GUI uses to store information. NOTE: this is a -different database from the one that rpkid uses. + --with-myrpki=DIR + specifies the full path to where the myrpki.py command + line script and the rpki Python module can be located. -* SECRET_KEY - This string value should be set to a unique value for your installation. -There is no required format, but the longer the better. Something suitable -might be generated by running: - $ ps auxwww | sha1sum + CONFDIR=PATH + specify the toplevel directory containing the + subdirectories for each resource holder served by + myrpki. -* TEMPLATE_DIRS - This is directory where the html templates for the various views in the -portal gui. Change the last entry to reflect your installation. +Optional: -* MYRPKI_DATA_DIR - The top level directory under which all the directories for your RPKI -handles are stored. Each directory must have a myrpki.conf file. + --prefix=DIR + use an alternate install tree. Defaults to /usr/local. -* MYRPKI_SRC_DIR - The directory where myrpki.py command line tool can be found. + DATABASE_PATH=PATH + specifies the full pathname for the sqlite database used + to back the portal gui. Defaults to + /usr/local/var/portal-gui/rpkiop. -There is one additional file that needs to be edited: -$top/portal-gui/rpkigui/urls.py. Near the end of the file is a dict entry for -"document_root." You must change the value to the full path for the directory -containing the image files used by the GUI. This can be a path into the -portal-gui source tree. + --with-python=PATH + specifies the full path to the python interpreter to + use. Defaults to python2.6, python2.5, or python, in + order. -=== Initialize === +Example: -The next step is to initialize the sqlite database that the portal-gui uses to -store information. This is done using the "manage.py" wrapper script for -django: - $ cd $top/portal-gui/rpkigui/ - $ python manage.py syncdb + ./configure --with-python=/usr/local/bin/python \ + --with-myrpki=/home/me/src/rpki/rpkid \ + CONFDIR=/home/me/myrpki \ + DATABASE_PATH=/home/me/myrpki/rpkiop -The manage.py script will prompt you to create a superuser. You want to say -"yes" to this prompt. The superuser account can be named whatever you want. -The superuser account is required to set up normal user accounts for managing -resource handles. The superuser is also useful because you can use django's +Once the portal-gui has been configured, the next step is to install it: + + $ make install + +At the end of the installation process, the manage.py script will prompt +you to create a superuser. You want to say "yes" to this prompt. The +superuser account can be named whatever you want. The superuser account +is required to set up normal user accounts for managing resource +handles. The superuser is also useful because you can use django's admin views to inspect the database directly, which may be useful for debugging. @@ -145,16 +144,14 @@ You should run "load_csv" in *each* of your directories for each handle. If you have configured django to use apached and mod_wsgi, you just need to start your web server. -Alternatively, django comes with a test web server which is useful for small +Alternatively, Django comes with a test web server which is useful for small deployments, or for just testing the portal-gui. You can start the test server by running: - $ cd $top/portal-gui/rpkigui/ - $ export PYTHONPATH=$top/rpkid/ - $ python manage.py runserver <ip:port> + $top/portal-gui/scripts/runserver [ IP:PORT ] -where <ip:port> is the address where you want to run the server. If you don't -specify the <ip:port>, the default is 127.0.0.1:8000. +where IP:PORT is the address where you want to run the server. If you don't +specify the IP:PORT, the default is 127.0.0.1:8000. Now you can navigate to http://<ip:port>/myrpki/ to use the GUI. |