Development environment for Protwis using Vagrant and Puppet.
This guide describes how to set up a ready-to-go virtual machine with Virtualbox and Vagrant.
Works on Linux, Mac, and Windows.
- Vagrant
- Virtualbox
- Git
- GitHub account
Install Vagrant, VirtualBox, and Git, and create a GitHub account (if you don't already have one).
Make sure you have the latest version of all three. On Ubuntu (and this may also apply to other Linux distros), the package manager installs an old version of Vagrant, so you will have to download and install the latest version from the Vagrant website.
Open up a terminal and type
git clone --recursive https://github.com/protwis/protwis_vagrant.git ~/protwis_vagrant
cd ~/protwis_vagrant
Go to https://github.com/protwis/protwis and click "Fork" in the top right corner
Clone into the "shared" directory (replace your-username with your GitHub username)
cd ~/protwis_vagrant
git clone https://github.com/your-username/protwis.git shared/sites/protwis
This may take a few minutes
vagrant up
vagrant ssh
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
Open up a shell and type
git clone --recursive https://github.com/protwis/protwis_vagrant.git .\protwis_vagrant
cd .\protwis_vagrant
Go to https://github.com/protwis/protwis and click "Fork" in the top right corner
Clone into the "shared" directory (replace your-username with your GitHub username)
cd ~/protwis_vagrant
git clone https://github.com/your-username/protwis.git .\shared\sites\protwis
This may take a few minutes
vagrant up
Use an SSH client, e.g. PuTTY, with the following settings
host: 127.0.0.1
port: 2226
username: vagrant
password: vagrant
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
The protwis directory is now 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 ~/protwis_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:8001/adminer. Use the following settings
System: PostgreSQL
Server: localhost
Username: protwis
Password: protwis