Opened 4 years ago
Last modified 6 months ago
#2314 new enhancement
ZOO-Project OGC API - Processes activation
Reported by: | djay | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | OSGeoLive17.0 |
Component: | OSGeoLive | Keywords: | |
Cc: | osgeolive@… |
Description
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 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 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
Change History (4)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Milestone: | → OSGeoLive14.0 |
Type: | task → enhancement |
comment:2 by , 3 years ago
Milestone: | OSGeoLive14.0 → OSGeoLive15.0 |
---|
Ticket retargeted after milestone closed
comment:3 by , 23 months ago
Milestone: | OSGeoLive15.0 → OSGeoLive16.0 |
---|
Ticket retargeted after milestone closed
comment:4 by , 6 months ago
Milestone: | OSGeoLive16.0 → OSGeoLive17.0 |
---|
Ticket retargeted after milestone closed
This is great, thank you!
I think it would be nice to add in the ZOO quickstart as an exercise. I will try to place some of the files needed in our git repo so no downloads are needed.