Vagrant files and scripts for setting up a local testing and development instance of OpenTreeMap (OTM)
NOTE: This repository is intended only for development and testing. It is not intended for setting up a production OTM server.
To get started, do the following steps:
- Install Vagrant and VirtualBox
- Clone this repository
- Create a Google Maps API key and add a line to
GOOGLE_MAPS_API_KEY = 'the-api-key-you-just-created'
- Run the script
- Run the command
This will give you a working installation of OTM, but without any maps.
To create a map do the following steps:
- Create a user from your web browser (the URL should be
localhost:7070). The email will be written to a file in
/usr/local/otm/emails/inside the VM
- SSH into the vagrant VM with
- Read the email with your user activation link (
cat /usr/local/otm/emails/*) and activate the user by pasting the URL in it into your browser
- Change to the opentreemap directory using
- Create a tree map using the
create_instancemanagement command, passing the username you created above. For example, to create a tree map with name "Philadelphia", url name
philly, and admin user "sue", centered at longitude -75.1 and latitude 40.0:
./manage.py create_instance Philadelphia --url_name=philly --user=sue --center=-75.1,40.0
For further help on how to use
./manage.py create_instance -h
To run on Windows you must install Cygwin (including
openssh) and start a Unix shell like
bash to run the install scripts.
On Windows the OTM source code is shared with the virtual machine via a one-way
rsync from Windows host to Ubuntu guest. When you update source code files you must run
vagrant rsync from your Windows Unix shell. See also vagrant rsync-auto.