Functional Genomics Center Zurich

Sushi Documentation — Download and Install

Please follow the download and installation instructions closely.

Download Locations

Hard- and software requirements

The sushi framework has been successfully deployed and run on Max OSX 10.9 and on the Linux distribution Debian 7. We do not have experience with Windows OS. If you experience problems please contact Hubert.Rehrauer/at/fgcz.uzh.ch.

Installation Steps

  1. Install Ruby
  2. Install bundle (gem install)
  3. Install workflow_manager (gem install)
  4. Download sushi_20xxxxxx.tgz (Ruby on Rails application)
  5. Install required libraries (bundle install)
  6. Setup database (rake db:migrate)
  7. Run (rails server)

Install Ruby

Check if Ruby 1.9.3 is installed on your computer
  $ ruby -v
If Ruby is NOT installed or Ruby version is either under 1.9 or over 2.0, then follow the instructions to download and install Ruby version 1.9.3 from https://www.ruby-lang.org/en/downloads/
  • Mac OSX: Needs XCode or at least the command-line tools found here: https://developer.apple.com/downloads/
Typical commands to install Ruby
  $ wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p551.tar.gz
  $ tar zxvf ruby-1.9.3-p551.tar.gz
  $ cd ruby-1.9.3-p551
  $ ./configure
  $ make
  $ sudo make install
Note
  • Usually Ruby interpreter is installed in /usr/local/bin
  • If you want to change the installation directory, set --prefix option to ./configure as follows
  •   $ ./configure --prefix=$HOME/bin/ruby-1.9.3
      $ make
      $ make install
      
  • wget is not installed in Mac OSX as a default. You can use 'curl' command instead.

Install bundler

Check if bundle command is installed on your system.
  $ which bundle
If it is not installed, if the command answers bundle is not found, you need to install bundler RubyGem library as follows:
  $ gem install bundler
Note
  • RubGem(gem) is a Ruby library manager, and it downloads and installs a library from http://rubygems.org/
  • bundler is a Ruby library version manager that manages specific library versions for an application
  • All gem installations may need sudo permissions (if you installed Ruby in a system directory but you can change the gem directory with setting GEM_HOME environmental variable. see below.)
  • Gem library installtion directory can be set with the environment variable:
  •     GEM_HOME = $HOME/.gems
      

Install workflow_manager

  $ gem install workflow_manager

Run

  $ workflow_manager
  mode = development
` druby://localhost:12345

Note
  • Ignore the warning:
    /usr/local/lib/ruby/1.9.1/yaml.rb:84:in `<top (required)>':
    It seems your ruby installation is missing psych (for YAML output).
    To eliminate this warning, please install libyaml and reinstall your ruby.
    
  • WorkflowManager client commands will installed under $GEM_HOME/bin directory. If workflow_manager command is not available, please check your $PATH setting, and add $GEM_HOME/bin to $PATH environmental variable.

Download Sushi (Ruby on Rails code)

  $ wget http://fgcz-sushi.uzh.ch/sushi_20150612.tgz
or
  $ curl -O http://fgcz-sushi.uzh.ch/sushi_20150612.tgz

Tar and bundle install

  $ tar zxvf sushi_20140814.tgz
  $ cd sushi
  $ bundle install

Note
  • If you want to install the gem libraries in the local directory, you can use --path option to set the install location:
    $ bundle install --path vendor/bundler
    

Set up database for Ruby on Rails

Go to the Sushi directory, then

  $ bundle exec rake db:migrate RAILS_ENV=production

Start Ruby on Rails server

  $ rails server -e production

Note
  • And then, try to access http://localhost:3000
  • If you can see the top menu of Sushi, it scceeded in installing.
  • Ctrl + C, to stop the server.

Configuration

  1. make a symbolic link to public/gstore/projects directory
  2. workflow manager configuration
  3. sushi server configuration

Symbolic link to projects folder

After test running of sushi server, a new directory
  public/gstore/projects
  
is created. Next, make a symbolic link to public/gstore/projects in public folder:
    $ cd public
    $ ln -s gstore/projects
  
This anable you to see a static file in gstore directory.

Workflow Manager configuration

After the running of workflow_manager, the following default configuration file is created.
  • config/environments/development.rb
  WorkflowManager::Server.configure do |config|
    config.log_dir = 'logs'
    config.db_dir = 'dbs'
    config.interval = 30
    config.resubmit = 0
    config.cluster = WorkflowManager::LocalComputer.new('local_computer')
  end
Note
  • dir_log: workflow manager log directory
  • db_log: workflow manager database directory
  • interval: the interval (second) to check a submitted job if it is running/finished/failed
  • resubit: the number of resumit times when a submitted job failed
  • cluster: cluster class
  • As a default, the sushi server computer becomes the calculation server, in other words, a subitted job runs on the same computer as the sushi (Ruby on Rails) server is running.
  • A new cluster, i.e. another calculation server, requires a new definition of the Cluster class.

Sushi configuration

Default Sushi configuration file is located at

  • config/environments/development.rb
  • config/environments/production.rb
If you want to change parameters from the default (below), add some of the followings:
  config.workflow_manager = 'druby://localhost:12345'
  config.gstore_dir = File.join(Dir.pwd, 'public/gstore/projects')
  config.sushi_app_dir = Dir.pwd
  config.scratch_dir = '/tmp/scratch'

Note
  • workflow_manager: Workflow Manager druby address
  • gstore_dir: the directory where the result of job is stored
  • sushi_app_dir: Sushi application directory
  • scratch_dir: working directory when a job is running. The final ouput is copied from scratch_dir to gstore_dir.