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 replace the
GOOGLE_MAPS_KEY
inconfigs/etc/init/otm-unicorn.conf
with the key you created - Create a Esri API credentials and replace the
ESRI_CLIENT_ID
andESRI_CLIENT_SECRET
inconfigs/etc/init/otm-unicorn.conf
with the credentials you created - Run the script
get-repos.sh
- Run the command
vagrant up
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
vagrant ssh
- 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
cd /usr/local/otm/app/opentreemap
- Create a tree map using the
create_instance
management command, passing the username you created above. For example, to create a tree map with name "Philadelphia", url namephilly
, 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 create_instance
, run ./manage.py create_instance -h
To run on Windows you must install Cygwin (including rsync
and 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.