Developer:Installation
From myExperiment
Installing myExperiment
The myExperiment source code is maintained on RubyForge and is available under the BSD licence.
Please contact us with any queries about installation or just to let us know what you're doing and how you get on. We can also assist with running myExperiment virtualised, which is the solution we use on in-house servers.
We have a Contributors License Agreement available following a similar model to the CLA for Taverna.
Debian/Ubuntu
Installation Test System Specification
- Pentium D 2.8GHz
- 1GB RAM
- 250GB Hard Disk
- Debian Lenny (Linux Kernel 2.6.22-3-686 #1 SMP)
- Apache 2.2.8
- MySQL Version 14.12, Distribution 5.0.51a
- Java version 1.5.0
- gij (GNU libgcj) version 4.3.1 20080309 (prerelease)
Installation Instructions
As Root user:
- Use Debian's package installer (i.e. apt-get install) to install the following packages:
apt-get install make ruby libzlib-ruby rdoc irb rubygems
- Install Rails GEM version 1.2.6
gem install rails --version 1.2.6 --include-dependencies
- Then install the following Debian packages:
apt-get install libapache2-mod-fcgid libfcgi-ruby1.8 libmysql-ruby ruby1.8-dev build-essential
- MyExperiment requires the RMagick GEM. This can cause some problems on Debian.
- To resolve this first make sure the following Debian packages are uninstalled:
apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8
- Then install the following Debian packages:
apt-get install graphicsmagick imagemagick librmagick-ruby1.8 libmagick9-dev
- MyExperiment also requires Graphviz because it has dot, which is required to draw workflow images:
apt-get install graphviz
- Now all the GEMs required by MyExperiment can be installed:
gem install builder cgi_multipart_eof_fix daemons dsl_accessor fastthread gem_plugin hoe json mime-types mongrel mongrel_cluster
needle net-sftp net-ssh openid_login_generator RedCloth ruby-yadis solr-ruby xml-simple libxml-ruby oauth ruby-hmac openurl --include-dependencies
- Some of these GEMs will require a version choice. Choose the latest version that is suffixed with (ruby).
- If there is still problems try installing the GEMs in smaller subsets or if needs be, one at a time.
- rmagick needs version 1.15.14 to work properly so also needs to be installed separately with the following command:
gem install rmagick --version=1.15.14
Note: if this doesn't work try:
gem install rmagick -v 1.15.14
- OAuth was originally designed for Rails 2 and therefore some of the code in the GEM will not work in Rails 1.2.6. To fixed this go to GEM_LIBRARY/oauth-0.2.4/lib/oauth/request_proxy/action_controller_request.rb and replace the contents of def request_params with:
unless @request_parameters
@request_parameters = request.request_parameters.dup
request.symbolized_path_parameters.keys.each do |k|
@request_parameters.delete k.to_s
end if request.respond_to? :symbolized_path_parameters
end
@request_parameters
- Unfortunately, the Taverna GEM cannot be installed from a remote source, therefore it is included in the code-base which now needs to be downloaded. The myExperiment code-base is stored within an SVN, so first SVN needs to be installed.
apt-get install subversion
- Before downloading the code base make sure that the terminal is in the correct directory. for this example the directory /var/rails/ will be used.
- Now use the SVN to checkout the code base
svn checkout svn://rubyforge.org/var/svn/myexperiment/trunk
- To ensure that the downloaded file have the correct ownership run the following chown command over the downloaded SVN. (Where username is your username):
chown -R username:www-data /var/rails/
- Now the Taverna gem can then be installed using the following command from trunk/vendor/gems/taverna directory:
gem install taverna-0.5.0.gem
- Check to see which version of ruby has installed:
ruby --version
If this is < v1.86 you will need to compile from source.
- Now load up a mysql shell and create three databases as follows:
create database m2_development; create database m2_production; create database m2_test;
- After exiting mysql switch user back to your username and change directory to /var/rails/myexperiment/trunk/config/ In the directory:
- Copy database.yml.pre to database.yml.
- Edit database.yml adding the appropriate passwords and usernames for the three databases.
- Copy default_settings.yml to settings.yml
- Edit settings.yml. In particular to set the correct details for smtp to allow emails to be sent by MyExperiment. Also make sure solr_enable is set to true so that data in your MyExperiment can be indexed and searched over by users.
- Copy captcha.yml.pre to captcha.yml.
- Edit captcha.yml to set it to the words you want to use in your captchas.
- Change directory back to /var/rails/myexperiment/trunk and run the following command as root:
apt-get install rake
- Now execute the following commands just as a user:
rake db:migrate rake solr:start ./resolr.sh
- ./resolr.sh may take some time to run (i.e. in the 5 minutes range) as it indexes the database to make searching quicker. After this has run the webserver can be started with the following command:
ruby script/server
- This should start a mongrel webserver running on port 3000 of the installation system. To see if this has worked load up a web browser and go to http://localhost:3000.
Windows
Written by Martin Chilvers (Edited by David Newman)
Installation Test System Specification
- Processor?
- RAM?
- Hard Disk Size?
- Microsoft Windows XP Version 2002 Service Pack 3
- Webserver?
- Java version?
Installation Instructions
Install Ruby
Use the One-Click Ruby Installer
- Make sure the "Enable RubyGems" option is checked when displayed
- The installer includes useful packages like irb (interactive prompt), gems (packaging/deployment), rdoc (documentation) etc...
Install Rails version 1.2.6
Rails is the Ruby web-application framework that MyExperiment is written in
gem install rails --version 1.2.6
This will pull down a bunch of other gems required by Rails
Install MySQL
Download from Here
- I selected a "Complete" installation
- Check "Configure the MySQL Server Now"
- Uncheck "Register the MySQL Server Now"
- Just for fun, choose the "Detailed Configuration"
- Accept "Developer Machine"
- Accept "Multifunctional Database"
- Accept defaults for "InnoDB Tablespace" Settings
- Accept "Decision Support (DSS)/OLAP" for number of concurrent users
- Accept defaults to enable TCP/IP and strict mode
- Accept default for character set
- Check the "Include Bin Directory in Windows PATH"
- Create a password for the root user
- Check "Enable root access from remote machines" - just in case!
Install ImageMagick and RMagick (Ruby bindings)
- Download them both together in a .zip file from Here
- These are the Installation Instructions
Install Graphviz
- Download from Here
- Required because it has "dot" which is used to draw workflow images
Install Ruby Gems
The following Gems need to install with the following command. Multiple Gems can be installed with one command by adding the gem name to the end of the command.
gem install <gem>
builder cgi_multipart_eof_fix daemons dsl_accessor gem_plugin hoe json mime-types mongrel mongrel_cluster needle net-sftp openid_login_generator RedCloth ruby-yadis solr_ruby xml-simple libxml-ruby oauth rubyzip
Hack OAuth
It was written for Railes 2 and needs to be hacked to work with Rails 1.2.6. Go to GEM_IBRARY/oauth-0.2.4/lib/oauth/request_proxy/action_controller_request.rb and replace the contents of def request_params with:-
unless @request_parameters
@request_parameters = request.request_parameters.dup
request.symbolized_path_parameters.keys.each do |k|
@request_parameters.delete k.to_s
end if request.respond_to? :symbolized_path_parameters
end
@request_parameters
Checkout MyExperiment
svn checkout svn://rubyforge.org/var/svn/myexperiment/trunk
Install the Taverna gem
cd ...trunk/vendor/gems/taverna gem install taverna --local
Setup MySQL
In a MySQL shell do:
create database m2_development; create database m2_production; create database m2_test;
Configure Rails to get to the databases:
cd .../trunk/config cp database.yml.pre database.yml
Edit database.yml by adding your MySQL usernames and password where appropriate!
Configure the MyExperiment server
cp default_settings.yml settings.yml
- Edit settings.yml
- set "solr_enable" to true
- set the details of an SMTP server (when you register with MyExepriment it needs to send an e-mail to complete the confirmation process, so you will need this!) e.g:
smtp: :address: "mail.myserver.mydomain" :port: 25, :domain: "myserver.mydomain" :authentication: :login :user_name: "your_username" :password: "your_password"
cp captcha.yml.pre to captcha.yml
- Edit captcha.yml to set the words to use in captchas.
Sync the databases
Turn off strict mode while creating the database tables(MyExperiment doesn't like it!)
- edit your mysql server's ini file "...\MySQL\MySQL Server 5.0\my.ini"
- comment out the following line (add a "#")
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
- restart mysql server (I do it using the Windows Services admin tool)
Create the tables
The commands below create the appropriate tables, etc.
cd .../trunk rake db:migrate
Turn strict mode back on
- Edit your mysql server's ini file "...\MySQL\MySQL Server 5.0\my.ini"
- Uncomment the line you commented out!
- Restart MySQL server
Start solr
Remove use of "fork" which is unsupported on Windows
- get the win32/process gems
gem install windows-pr gem install win32-process
cd ...\My Documents\Repositories\MyExperiment\trunk\vendor\plugins\acts_as_solr\lib\tasks
- edit solr.rake
- add require "win32/process"
- Change "fork" to "Process.fork" (2 occurences)
- Start the solr server
rake solr:start
Start a webserver
ruby script/server
Go to http://localhost:3000 to test the server is running
