[OSGeoLive] #2314: ZOO-Project OGC API - Processes activation

OSGeoLive trac_osgeolive at osgeo.org
Fri Feb 19 03:59:41 PST 2021


#2314: ZOO-Project OGC API - Processes activation
-----------------------+-------------------------
 Reporter:  djay       |      Owner:  osgeolive@…
     Type:  task       |     Status:  new
 Priority:  normal     |  Milestone:
Component:  OSGeoLive  |   Keywords:
-----------------------+-------------------------
 From the ZOO-Project available from OSGeoLive 14, we've noticed that the
 OGC API - Processes was not setup.

 You can find bellow the instructions to follow to make the OGC API -
 Processes and its associated basic HTML UI available.

 1) Download the oas.cfg file from the SVN [http://zoo-
 project.org/trac/export/981/trunk/zoo-project/zoo-kernel/oas.cfg here]
 2) run the following command:
 {{{
 sed "s:https://myserver:http://localhost:g" -i oas.cfg
 cp oas.cfg /etc/zoo-project/
 }}}

 From here, trying to load http://localhost/cgi-bin/zoo_loader.cgi?/ should
 return a JSON without error. In case you have a JSON error mentioning that
 oas.cfg cannot be found, please make sure you have copied the oas.cfg in
 the right place (location of the download was not in the command).

 3) Download the .htaccess file from the SVN [http://zoo-
 project.org/trac/export/981/trunk/zoo-project/zoo-services/utils/open-
 api/server/.htaccess here] then run the following commands:

 {{{
 sed "s#https://demo.mapmint.com#http://localhost#g" -i .htaccess
 sudo cp .htaccess /var/www/html/
 }}}

 4) Create the file: /etc/apache2/site-available/zoo-project.conf
 containing the following:

 {{{
 Alias /static /usr/share/zoo-project/openapi/static/
 <Directory /var/www/html>
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
 </Directory>

 ScriptAlias /cgi-bin3/ /usr/share/zoo-project/openapi/server/
 <Directory "/usr/share/zoo-project/openapi/server">
         AllowOverride None
         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
         Require all granted
 </Directory>
 }}}

 Restarting Apache from here should make you able to load the following
 URL: http://localhost/ogc-api/ and get the same result as in point 1.

 5) Add the following line in the [main] section of the file: /etc/zoo-
 project/main.cfg

 {{{
 templatesPath=/usr/share/zoo-project/openapi/templates/
 }}}

 Edit /etc/zoo-project/display/cfg to modify the serviceProvider as bellow:

 {{{
  serviceProvider = openapi
 }}}

 At this point you should be able to load the following URL:
 http://localhost/ogc-api/index.html

 6) Run the following commands:

 {{{
 sed "s:'redis':'127.0.0.1', password-"pass":g" -i /usr/share/zoo-
 project/openapi/server/publish.py
 sed "s:'redis':'127.0.0.1', password-"pass":g" -i /usr/share/zoo-
 project/openapi/server/subscriber.py

 sudo mkdir /tmp/systemd-private-36656830d6b74816ac5b4276db84e171-apache2
 .service-0A60kh/tmp/statusInfos/
 sudo chown www-data:www-data -R /tmp/systemd-private-
 36656830d6b74816ac5b4276db84e171-apache2.service-0A60kh/tmp/statusInfos/
 }}}

 7) install websocketd and run:

 {{{
 apt-get install websocketd
 sudo websocketd --port=8888 /usr/share/zoo-
 project/openapi/server/subscriber.py
 }}}

 Set the socket in the main.cfg file as bellow:

 {{{
 wsUrl=ws://localhost:8888/
 }}}

 At this point you should be able to execute services and get up-to-date
 status pushed from the server using the web socket.

 Few things should be still verified

-- 
Ticket URL: <https://trac.osgeo.org/osgeolive/ticket/2314>
OSGeoLive <https://live.osgeo.org/>
self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu, that allows you to try a wide variety of open source geospatial software without installing anything.


More information about the osgeolive mailing list