Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 2.28 KB

posm-build-installation.md

File metadata and controls

68 lines (43 loc) · 2.28 KB

POSM Build Installation

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.

Tested On

  • 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.

Steps

  1. 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
    
  2. Create a settings.local file in /root/etc with the following content:

     posm_ip="54.191.109.128"
    

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.

  1. Execute bootstrap.sh and 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!

Upstart

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

Your Data

All of your data are stored in /opt/omk/OpenMapKitServer/data.

You can scp / sftp the

forms /opt/omk/OpenMapKitServer/data/forms

deployments /opt/omk/OpenMapKitServer/data/deployments

submissions /opt/omk/OpenMapKitServer/data/submissions

from the server to backup and access your data. There is no database, so all of your data are in these files.