User Tools

Site Tools


vagrant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vagrant [2014/12/04 17:15] (current)
seilerj created
Line 1: Line 1:
 +====== Runnning GalaxEast with Vagrant ======
  
 +The GalaxEast source code includes some tools that let you run a complete development environment on your local machine that is similar to the production environment of GalaxEast. These tools are based on the Vagrant system.
 +
 +Once you have set up your development environment on your workstation,​ you will be able to run and access a GalaxEast instance running on a virtual machine and based on your version of the source code. You can then perform tests on your own instance and develop new Galaxy tools in the same environment as our production cluster.
 +
 +===== Requirements =====
 +
 +Please make sure you have the following opensource/​free tools installed on your machine :
 +
 +==== Mercurial ====
 +
 +Mercurial is used to download the last version of the GalaxEast source code from Bitbucket.
 +
 +You can download Mercurial from the official website : http://​mercurial.selenic.com/​downloads
 +
 +If you are working on Mac OS X you can install Mercurial through the homebrew package manager (http://​brew.sh)
 +
 +==== VirtualBox ====
 +
 +VirtualBox is used as the virtual machine hypervisor.
 +
 +You can download VirtualBox from the official website : https://​www.virtualbox.org/​wiki/​Downloads  ​
 +Make sure to install the VirtualBox Extension Pack as well.
 +
 +==== Vagrant ====
 +
 +Vagrant is used to create your development environment for GalaxEast.
 +
 +You can download Vagrant from the official website : http://​www.vagrantup.com/​downloads.html
 +
 +===== Setup =====
 +
 +Thera are only two steps required to get your GalaxEast development environment ready. Open a Terminal console and follow these instructions :
 +
 +Get the GalaxEast source code from Bitbucket :
 +
 +<​code>​
 +$ hg clone https://​bitbucket.org/​igbmc/​galaxeast
 +</​code>​
 +
 +This will create a galaxeast directory in your current directory containing the source code of the GalaxEast platform.
 +
 +Run Vagrant to launch your GalaxEast virtual machine :
 +
 +<​code>​
 +$ cd galaxeast
 +$ vagrant up
 +</​code>​
 +
 +After a few minutes, you will be able to access your GalaxEast development instance at http://​localhost:​8080
 +
 +An administrator account is created automatically :  ​
 +Login : admin@galaxeast.fr  ​
 +Password : admin
 +
 +===== What's running on the Vagrant VM ? =====
 +
 +The vagrant command will pick up the Vagrantfile included in the source code and follow these instructions to build a virtual machine running on VirtualBox that will execute the GalaxEast source code present on your system.
 +
 +The virtual machine is running Scientific Linux 6.5 and will be configured to run GalaxEast in a dedicated python virtual environment. The virtual machine included a nginx server and will use SQLite as database system.
 +
 +Vagrant is redirecting the port used by GalaxEast on the port 8080 on your local machine. **Please make sure the 8080 port is available before launching the vagrant command.**
 +
 +===== Usage =====
 +
 +==== Starting / Stopping / Destroying my virtual environment ====
 +
 +To start your development environment :
 +
 +<​code>​
 +$ vagrant up
 +</​code>​
 +
 +To restart your development environment :
 +
 +<​code>​
 +$ vagrant reload
 +</​code>​
 +
 +This will pick up changes in your Vagrantfile.
 +
 +To destroy your development environment :
 +
 +<​code>​
 +$ vagrant destroy
 +</​code>​
 +
 +Your database and files won't be destroyed. This will only destroy the virtual machine.
 +
 +==== Starting / Stopping / Debug GalaxEast ====
 +
 +To start your GalaxEast server :
 +
 +<​code>​
 +$ vagrant ssh -c "sudo service galaxeast start"
 +</​code>​
 +
 +To stop your GalaxEast server :
 +
 +<​code>​
 +$ vagrant ssh -c "sudo service galaxeast stop"
 +</​code>​
 +
 +To follow the GalaxEast log :
 +
 +<​code>​
 +$ vagrant ssh -c "tail -f /​vagrant/​main.log"​
 +</​code>​
 +
 +==== Connecting to development virtual machine ====
 +
 +You can connect to your development virtual machine through SSH with the following command :
 +
 +<​code>​
 +$ vagrant ssh
 +</​code>​
 +
 +===== Where is what ? =====
 +
 +^ What                     ^ Where on the VM                        ^ Where on your host system |
 +| GalaxEast sources ​        | /​vagrant ​                                | galaxeast |
 +| Galaxeast configuration ​  | /​vagrant/​vagrant/​config/​galaxy.ini ​      | galaxeast/​vagrant/​config/​galaxy.ini |
 +| SQLite database  ​   | /​vagrant/​vagrant/​database/​galaxy.sqlite ​ | galaxeast/​vagrant/​database/​galaxy.sqlite |
 +| Dataset files  ​           | /​vagrant/​vagrant/​database/​files ​         | galaxeast/​vagrant/​database/​files |
 +| Software dependencies  ​   | /​vagrant/​vagrant/​database/​software ​      | galaxeast/​vagrant/​database/​software |
 +| Other configurations files| /​vagrant/​vagrant/​config ​                 | galaxeast/​vagrant/​config |
 +| Shed tools                | /​vagrant/​vagrant/​database/​shed_tools ​    | galaxeast/​vagrant/​database/​shed_tools |
 +| Nginx configuration ​      | /​etc/​nginx/​conf.d/​galaxeast.conf ​        | galaxeast/​vagrant/​galaxeast.nginx |
 +| Python environment ​       | /​home/​vagrant/​python-env ​                | Nowhere ! |
vagrant.txt · Last modified: 2014/12/04 17:15 by seilerj