Prerequisites

  • Ruby 3.0+ (rvm recommended to manage Ruby environments)
  • Python 3.8+ (Anaconda recommended to manage Python environments)
  • Node.js 16.13+
  • Yarn 1.22+

WhatsOpt is a Ruby on Rails application, as such it follows typical installation procedure for such application. A lot of material about RoR applications installation and configuration is available out there.

Development setup

WhatsOpt rails application setup:

  git clone https://github.com/OneraHub/WhatsOpt

WhatsOpt command line interface setup, namely wop:

  pip install wop

The wop package pulls also Python dependencies used by WhatsOpt application, specially the OpenMDAO framework which is currently the execution framework used by WhatsOpt.

Though not stricly required to run WhatsOpt, some features relies also on the following Python packages:

  • SMT: enable design of experiments and metamodels creation
  • SALib: enable sensitivity analysis operations
  • Apache Thrift: enable server creation and remote operations on local network
  • OpenTURNS: enable uncertain variables operations
  pip install smt salib thrift

To enable server code generation, you will have to install Apache Thrift compiler as well.

This is the typical development mode of a Rails application, it is simpler to install than a typical production server (with a full-blown web server and database engine). It will allow you to get started with WhatsOpt in your local environment.

  cd WhatsOpt
  bundle install --without "staging production"
  cp config/configuration.yml.example config/configuration.yml
  cp config/database.yml.example config/database.yml
  RAILS_ENV=development rails db:load:schema
  rails whatsopt:access:user
  Login: whatsopt 
  Email: whatsopt@example.com
  Password: 
  Password Confirmation: 
  rails s -b 0.0.0.0

Then you can visit the http://localhost:3000 url and log in with the default user login/passwd: whatsopt/whatsopt

You can also run tests with:

  rails test

Production setup

Ruby on Rails ecosystem allows various options for application server configuration and deployment. Refer to related Ruby on Rails documentation to know your deployment options.

The guide lines summarized below reflect the deployment of WhatsOpt at ONERA. It relies on:

  • Apache Server
  • Passenger (aka module for rails)
  • MySQL

Once those prerequisites are installed on your server, you have to fit:

  • config/environments/configuration.yml
  • config/environments/database.yml
  • config/environments/production.rb
  • config/environments/ldap.yml (if needed)

For deployment in production, capistrano utility is used, you have to fit to your needs the following files:

  • config/deploy.rb
  • config/deploy/production.rb

then the deployment is one command line away:

  cap production deploy