User Tools

Site Tools


Installing Darshan-Web


This tutorial has been written using Debian “wheezy”. It requires the following software to be installed:

  • Git
  • Ruby (preferably version 2.0 or greater, managed by RVM)
  • Darshan (version 2.3.0 or greater)
  • PostgreSQL (sudo apt-get install postgresql postgresql-client libpq-dev)

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.


1. Checkout Darshan-Web from GIT

  git clone
  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.

2. Create a gemset

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.

3. Install required gems

  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.

4. Setup the database

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

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

5. Upload some logs

  mkdir public/data

Put as many log files (.bz2 files) as you want in the public/data directory.

6. Run the server

  RAILS_ENV=production rvmsudo puma -C config/puma.rb -p 80 -d --pidfile

Check in a web browser, you should see the application running. You can kill the server using:

  sudo kill -s SIGTERM `cat` is the file created by the starting command and contains the pid of the server's master process.

darshanweb.txt · Last modified: 2014/10/17 14:07 by mdorier