This tutorial has been written using Debian “wheezy”. It requires the following software to be installed:
Darshan can be installed as described in the pre-requisites of Darshan-Ruby's installation, here. There is no need to install Darshan-Ruby yet, it will be installed along with Darshan-Web.
Note: it is strongly advised to create a new user with sudo privileges on your system, rather than using your own account or (for obvious security reasons) the root account. In this tutorial, we will assume that the user is darshanw.
git clone https://gforge.inria.fr/git/darshan-web/darshan-web.git cd darshan-web
Two branches can be used: demo and production. The demo branch corresponds to the production branch, but has help messages integrated in its interface. To get the production branch:
git checkout production
To get the demo branch:
git checkout demo
From now on unless otherwise specified, the working directory is darshan-web and the user is darshanw.
Not mandatory but useful if you use RVM and want a clean install independent of your potential other uses of Ruby. Ignore this step if you're not using RVM.
rvm gemset create darshan-web rvm gemset use darshan-web
Note: when disconnecting and reconnecting, you may need to type rvm gemset use darshan-web again, unless the darshan-web gemset has been set to default.
bundle config build.darshan --with-darshan-dir=$HOME/local bundle install
Change the first line to match the location of your Darshan installation. Make sure all gems are properly installed.
If the current user (darshanw) doesn't have an account in the PostgreSQL database, start by creating one:
sudo -i -u postgres createuser darshanw -d -L -R exit
Replace darshanw with your username if necessary. If you do not use the darshanw username, edit config/database.yml and change the username in the production section to match your username.
Edit the authentication method for the darshanw user by editing pg_hba.conf (usually located in /etc/postgresql/x.y/main/pg_hba.conf, where x.y is the version of PostgreSQL), by adding this line:
local all darshanw trust
Again, change darshanw if necessary. Restart PostgreSQL.
sudo service postgresql restart
Now setup the database.
RAILS_ENV=production rake db:setup
Put as many log files (.bz2 files) as you want in the public/data directory.
RAILS_ENV=production rvmsudo puma -C config/puma.rb -p 80 -d --pidfile puma.pid
Check http://127.0.0.1/ in a web browser, you should see the application running. You can kill the server using:
sudo kill -s SIGTERM `cat puma.pid`
puma.pid is the file created by the starting command and contains the pid of the server's master process.