Before getting started
Prerequisites: You’ll need the lastest version of both ODK Collect and OpenMapKit on your Android device. The OMK currently supports Android version 4.2 and higher. You will also need install OpenMapKit Server in order manage surveys and OSM data, deploy them to your Android devices and submit surveys back to OSM.
Once ODK Collect and OpenMapKit are on your Android device, install OpenMapKit Server on an environment of your choosing.
For an actual deployment of OpenMapKit Server, it is recommended to use posm-build to install your instance. posm-build is a lightweight shell build system used for POSM servers. OpenMapKit Server is designed to be a part of a POSM server, however, the posm-build allows you to be modular regarding what gets installed, so you can and should use it if you want to install a standalone OpenMapKit Server.
The advantage is that in a few lines, you can have OpenMapKit Server installed and integrated as an Upstart service in Ubuntu Linux. This means that if OpenMapKit Server crashes or is restarted, the API will restart automatically. Also, posm-build only gets the dependencies you need and downloads only the files you need, so the entire repo does not need to be cloned with git.
Instructions for installing OMK Server on your development environment can be found here.
- Amazon EC2 Ubuntu Server 14.04 LTS
- Instance Type: t2.nano
- vCPUs: 1
- Memory: 500 MB
- Storage: 8 GB
- Open Ports: 22, 80, 3210
OpenMapKit Server is intended to be as light-weight as possible, so you don’t have to throw much hardware at it.
Download and extract posm-build.
sudo -s wget -q -O - https://github.com/AmericanRedCross/posm-build/archive/master.tar.gz | tar -zxf - -C /root --strip=2
/root/etcwith the following content:
Replace the IP address for
posm_ip with the actual public IP or your server. If you are on Amazon, this should be your Elastic IP.
bootstrap.shand tell it to only install NGINX and OpenMapKit Server.
/root/scripts/bootstrap.sh base virt nodejs nginx omk
Let the installation churn. That’s it!
You can start / stop / restart the
omk-service like any Ubuntu Upstart service.
sudo service omk-server stop sudo service omk-server start sudo service omk-server restart
All of your data are stored in
You can scp / sftp the
from the server to backup and access your data. There is no database, so all of your data are in these files.
This is also included in the Walkthrough Tutorial.