Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To set up geostreaming as a service in a ubuntu machine use the following service file in  `in  /lib/systemd/system/geostreams.service `


Code Block
languagebash
#
# This file is centrally managed and will be replaced every 30 minutes
# To make changes to this file contact Rob Kooper (kooper@illinois.edu)
#
[Unit]
Description=GEO TEMPORAL API V3
After=network.target
[Service]
User=clowder
Group=users
Restart=on-failure
WorkingDirectory=/home/clowder
ExecStartPre=/bin/bash -c "if [ -d /home/clowder/geo-temporal-api-v3 ]; then if [ -f /home/clowder/geo-temporal-api-v3/RUNNING_PID ]; then if ps -p `cat /home/clowder/geo-temporal-api-v3/RUNNING_PID` > /dev/null ; then echo \"Found running version, killing old version\"; kill `cat /home/clowder/geo-temporal-api-v3/RUNNING_PID`; fi; rm /home/clowder/geo-temporal-api-v3/RUNNING_PID; fi; fi"
ExecStart=/home/clowder/geo-temporal-api-v3/bin/geostreams -Dhttp.port=9002 -Dplay.http.secret.key=";LwhS[z[VXUWkLtyI_^/>M9WRD@<HqKpUOe576GTINE_^F;fM:P3WBX2]Huut;CjSOMESECRETKEY" -Dapplication.context=/geostreams/ -mem 2048 -Dconfig.file=/home/clowder/geo-temporal-api-v3/custom/application.conf

[Install]
WantedBy=multi-user.target
~                               

...

There is a sample application.conf in seagrant-dev machine under Yan's username. 


If this is the first time deploying, remember the setting up steps for the region trend tables (if needed) and the parameters (needed for all). More details in Geostreams-api-v3 - Local 


Add to your nginx a route for /geostreams 


Code Block
languagebash

  rewrite ^/geostreams$ /geostreams/ permanent;

  location /geostreams {

    proxy_pass http://localhost:9002;

  }