Toni: I see two ways to distribute the software:
-
Semi-manual install using Vagrant. Draft instructions are below, based on Ismael's. All the relevant repositories must be made publicly-readable.
-
Alternatively, distribute a self-contained, pre-ready "Vagrant Box". The latter should be easy and stable (doesn't depend on external downloads disappearing) but I have not tried it yet. There shouldn't be software license problems
Neither of the two works right now, because of some missing initialization.
The following file provides instructions for a local installation of GPCRmd.
The server is based on Vagrant and VirtualBox technology. It will create a headless (no screen) virtual machine, to which you can connect via a web browser. The instructions are provided for Linux, but they should work with minor or no modifications under Windows and OSX.
Make sure you have Vagrant, VirtualBox, and Git installed. Linux distributions may ship with an old version of Vagrant, so you will have to download and install the latest version from the Vagrant website.
For brevity, we show instructions using the https
(as opposed to git
) access protocol and Unix-style paths.
Open up a terminal and type
git clone --recursive https://github.com/GPCRmd/gpcrmd_vagrant.git ~/gpcrmd_vagrant
Clone into the "shared" directory (replace your-username with your read-only GitHub username)
cd ~/gpcrmd_vagrant
git clone https://github.com/your-username/gpcrdb.git shared/sites/protwis
Clone the gpcrmd_data repository in a temporary location. Two files are required:
- The latest dump, named
dump*.backup
- The example trajectories, found compressed under
files
.
Therefore:
cd
git clone https://github.com/GPCRmd/gpcrmd_data
cp gpcrmd_data/dbdumps/[dumpddmmyyyy].backup ~/gpcrmd_vagrant/shared/db/dump.backup
The following should be fixed
- Download from https://github.com/GPCRmd/gpcrmd_data/releases 'files.tar.gz'.
- Extract 'files.tar.gz' into '~/gpcrmd_vagrant/shared/sites/'.
tar -xvzf your/download/folder/files.tar.gz -C ~/gpcrmd_vagrant/shared/sites/
This will build the server and may take a few minutes.
vagrant up
vagrant ssh -c "(cd /protwis/sites/protwis; /env/bin/python3 manage.py runserver 0.0.0.0:8000)"
You're all set up. The webserver will now be accessible from http://localhost:8000.
To stop the server you may use vagrant halt
. To delete the server and reclaim the disk space, usevagrant destroy
(inside the gpcrmd_vagrant
directory).
Use an SSH client, e.g. PuTTY, with the following settings
host: 127.0.0.1
port: 2226
username: vagrant
password: vagrant
The protwis directory is shared between the host machine and the virtual machine, and any changes made on the host machine will be instantly reflected on the server.
To run django commands from the protwis directory, ssh into the VM, and use the "/env/bin/python3" command e.g
cd ~/gpcrmd_vagrant/
vagrant ssh
cd /protwis/sites/protwis
/env/bin/python3 manage.py check protein
The database administration tool Adminer is installed and accessible at http://localhost:8082/adminer. Use the following settings
System: PostgreSQL
Server: localhost
Username: protwis
Password: protwis
If you experience problems with Virtualbox shared folders, use following command in your host machine to update guest additions in the VM:
cd ~/gpcrmd_vagrant/
vagrant plugin install vagrant-vbguest