BISD Inventory

Install in-house inventory system based on web2py

Requires

web2py Service

Cluster Database Service

Recommends

Cluster Database Management Service

Cluster Load Balancer Service

Runs on ubuntu-monitor.bullardisd.net with a database on ubuntu-db1.bullardisd.net and load balanced by ubuntu-lb1.bullardisd.net.

Install Software

First we want to create our database. On the database server, run:

mysql -u<user> -p -e "create database inventory;"

Next we want to remove the example applications:

cd /var/web2py/applications
sudo rm -Rf examples/ welcome/

Now we install the inventory software:

sudo git clone http://github.com/korylprince/pyInventory.git
sudo mv pyInventory init

Note: the init application is automatically run if no application is specified in the URL.

Next we need to patch web2py as currently Active Directory groups do not work by default:

cd /tmp
wget https://raw.github.com/korylprince/web2py/master/gluon/contrib/login_methods/ldap_auth.py
sudo mv ldap_auth.py /var/web2py/gluon/contrib/login_methods/ldap_auth.py
sudo rm /var/web2py/gluon/contrib/login_methods/ldap_auth.pyc
sudo chmod -R 755 /var/web2py
sudo chown -R www-data:www-data /var/web2py/
sudo service uwsgi restart

Finally you will want to edit /var/web2py/applications/init/models/db.py to add your configuration details.

It is usually a good idea to compile your application after getting everything working as it will make performance better. You can do this from the web2py admin interface.

Troubleshooting Database Issues

If you are installing this for a new database, you need to set migrate=True in the model db.py. After the tables are created set migrate back to False.

If you are installing over an existing database, but your database metadata got deleted, set migrate=False,fake_migrate_all=True to create metadata then remove the fake_migrate_all.

Table Of Contents

Previous topic

Cluster Load Balancer Service

Next topic

Moodle

This Page