|
Install_Bungeni_Fabric
How to install Bungeni Parliamentary Information System
bungeni-wiki
Pre-requisitesHow to setup the Pre-requisites Build & SetupNOTE: You can use the short-hand script ./fl <action name> which prefixes fab -H localhost to any action Option 1: Installing using the online package indexBungeni can be installed and deployed over the internet -- or locally if you have a local python package index cache. Build & deploy bungeni using the online package index using the following command : fab -H localhost bungeni_install config_ini:bungeni config_supervisord See also Executing Fabric actions Option 2: Installing using the local package indexUse this option only if you have a Bungeni package index running on your local network. Set the fabric parameters for the cached buildout by setting the local_cache parameters appropriately See Using the local_cache parameter Once the parameter has been set correctly the installation command is the same : fab -H localhost bungeni_install config_ini:bungeni config_supervisord See also Executing Fabric actions Folder StructureAt the end of this step your folder structure should look like this : ./bungeni_apps
|-- bungeni
| |-- bin
| |-- buildconf
| |-- cache
| |-- data
| |-- develop-eggs
| |-- eggs
| |-- locales
| |-- logs
| |-- parts
| |-- patch
| |-- src
| |-- templates
| `-- testdatadmp
|-- config
|-- logs
|-- pid
|-- python24
| |-- bin
| |-- include
| |-- lib
| `-- man
`-- python26
|-- bin
|-- include
|-- lib
`-- share
Starting and stopping bungeniSee using supervisor to start / stop Bungeni Setting up the admin passwordThere are 2 parameters in the Fabric setup.ini : [bungeni] ... admin_user = admin admin_password = admin ... Set this appropriately and run : fab -H localhost setup_bungeni_admin You need to have postgres running for this: fab -H localhost start_monitor start_service:postgres Testing the installationAfter this you can run the unit tests provided in the system to check if you have installed correctly Run Bungeni Unit Tests. You can also install some demo data which you can use to test-drive the system : Install demo data sets Next StepsManual Install1. Pre-requisites
2. SSL support for PythonIn ubuntu installing openssl and libssl-dev does not result in Python getting built with ssl support as the default ssl paths for include/ lib referenced by the Python build are different in Ubuntu. To build ssl support into Python on Ubuntu set the CPPFLAGS and LDFLAGS environment variables as follows : CPPFLAGS=-I/usr/include/openssl LDFLAGS=-L/usr/lib/ssl now run ./configure ; make ; make install To test if python has ssl support run this in the python shell : import urllib
f = urllib.urlopen('https://svn.openplans.org')
# if it returns no errors ... the ssl support works.. SetupNote: the python setuptools package (a python egg) is used by buildout, if you have an older version of setuptools, you might need to update it manually first (from http://cheeseshop.python.org/pypi/setuptools/) in the python used for zope. Update instructions at: http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions If you dont have setuptools installed, buildout downloads and installs it automatically. In order to install it, use buildout. These steps should be all you need to setup a Zope instance with all the required products and libraries: $ svn co https://bungeni-portal.googlecode.com/svn/bungeni.buildout/trunk/ --username <username> bungeni $ cd bungeni $ python bootstrap.py # not the system python! The one you use with Zope, i.e. 2.5.x. $ ./bin/buildout # wait a while.. $ ./bin/setup-database # this will setup the postgres db $ ./bin/load-demo-data # this will load the demo data $ ./bin/paster serve debug.ini # this will launch the server in debug mode... On a Mac, you may need to increase shmmax value to get postgresql up and running. The buildout includes DeadlockDebugger, so if you start Zope in debug mode, it will stop at a debugger prompt if an exception is raised. | |