Skip to content

Vagrant

Dan Bottomly edited this page Jul 31, 2015 · 12 revisions

##Using Vagrant to setup a HitWalker2 instance

####Default Requirements utilized by the Virtual Machine

  • 2 CPUs
  • 10 GB RAM

####Mac/Linux

  1. Install Vagrant
  1. Create a new folder and place at least the following in it:
  • The HitWalker2 codebase e.g. git clone https://github.com/biodev/HitWalker2
  • A Vagranfile cp HitWalker2/Vagrantfile .
  • A Neo4j distribution, currently should be 2.1.8 from here
  • The base Neo4j database, human
  1. Setup Vagrant as follows:
vagrant up --no-provision
vagrant provision --provision-with HitWalker2
   

Optionally, if you wish to build PDF vignettes such as the CCLE md or PDF document you can use the additional provisioner:

vagrant provision --provision-with markdown
vagrant provision --provision-with pdf

Next SSH into the virtual machine and complete the setup:

vagrant ssh
cd HitWalker2
python manage.py syncdb

Make sure to add an admin account at this point by following the prompts.

To start/restart Hitwalker2 using Upstart by sudo [start|stop|restart] HitWalker2

To access the Virtual Machine via the web from the host take note of the VM's IP address via ifconfig.

From the host open up a browser (preferably Firefox) and go to http://{your IP}/HitWalker2. You can then login via your admin account.

You are now ready to add your own data

Restarting e.g. vagrant reload is recommended after loading your own data.

####Troubleshooting

  • For Macs/linux, if there is a conflicting DHCP error message exists you may need to use:

VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0

  • To add a new user from ~/HitWalker2 run python manage.py shell:
from django.contrib.auth.models import User

user = User.objects.create_user('user', 'email@somewhere.com', 'password')
user.save()
cntrl-d
	

####Setting up a nginx proxy on a host server for a HitWalker2 instance

Modify your nginx sites-enabled file to additionally contain something like the following:

 location /HitWalker2 {
                proxy_pass http://172.28.128.3;
                proxy_read_timeout 300s;
        }

 location /static/network {
           proxy_pass http://172.28.128.3;
       }

Note that the IP address in the proxy_pass statement should match that shown by your VM.

Clone this wiki locally