Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dac 300 weaver compose #114

Merged
merged 130 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
7ba12e8
basic working /processes route
Zvax Nov 5, 2020
c3cb446
pushes nginx files inside proxy container
Zvax Nov 6, 2020
a7d5e5b
explicitely adds environment variables to the templating engine and n…
Zvax Nov 6, 2020
47e59f0
fixes postgres-pavics database not found psql error
Zvax Nov 6, 2020
4a87f1a
unhardcodes various twitcher and weaver configs
Zvax Nov 11, 2020
381c0d1
adds path config from environment for weaver wps
Zvax Nov 11, 2020
721ed5c
first pass aligning params with deploy variables
fmigneault Dec 12, 2020
4a107d6
tag mongodb 3.6.21 + remap volumes for docker-compose 3.4
fmigneault Jan 5, 2021
278714f
employ log rotation shared logging config
fmigneault Jan 5, 2021
b376620
add DATA_PERSIST_ROOT value to override root data directory path as n…
fmigneault Jan 5, 2021
bac7b32
move all weaver configs under their optional-component directory
fmigneault Jan 6, 2021
35aece5
add server/contact/support variables that can be shared across contai…
fmigneault Jan 6, 2021
f3c6687
revert mongodb 3.4
fmigneault Jan 6, 2021
784f00d
fix weaver twitcher nginx variable
fmigneault Jan 6, 2021
6745774
fix incorrect user:anonymous magpie permission to group:anonymous
fmigneault Jan 7, 2021
98908c7
fix weaver/twitcher nginx path + use variable to service name of weaver
fmigneault Jan 7, 2021
7a3946c
bump weaver version 1.13.1
fmigneault Jan 7, 2021
aaa19fe
bump weaver 1.14.0 (providers-config) & apply depends_on to load othe…
fmigneault Jan 12, 2021
480d6e7
add healthchecks for wps providers registed in weaver + remove extra …
fmigneault Jan 12, 2021
54e7700
fix healthcheck commands
fmigneault Jan 12, 2021
13144ac
revert service names
fmigneault Jan 12, 2021
3f85413
adjust weaver nginx redirects
fmigneault Jan 12, 2021
786bdb3
move healthchecks into separate optional-component
fmigneault Jan 12, 2021
3d12392
add Weaver WPS providers Magpie permissions
fmigneault Jan 12, 2021
f598a9e
change weaver magpie permissions to allow read all provider processes…
fmigneault Jan 13, 2021
a1f2a55
use same wpsoutputs location as other birds for weaver's location
fmigneault Jan 13, 2021
3a6b7b3
revert named volume 'testdatasets' to literal path and employ DATA_PE…
fmigneault Jan 13, 2021
d7c442e
remove CRIM-ADES from default weaver data-source locations
fmigneault Jan 13, 2021
f5c8346
use variable for weaver location + remove weaver config path as endpo…
fmigneault Jan 13, 2021
4bd4e65
add DATA_PERSIST_ROOT to template variables
fmigneault Jan 13, 2021
e911e29
add notes about startup weaver provider references
fmigneault Jan 15, 2021
39efac8
more details and adjustments of volume/paths wps-outputs + add magpie…
fmigneault Jan 15, 2021
89f2af2
move weaver to 'components'
fmigneault Jan 15, 2021
8baa010
user PAVICS_FQDN_PUBLIC
fmigneault Jan 26, 2021
80559a3
add read-only attribute to applicable weaver config files
fmigneault Jan 26, 2021
61ff3f1
use dummy default contact values
fmigneault Feb 1, 2021
d181b09
update weaver readme details
fmigneault Feb 13, 2021
c69bac6
target weaver 2.0.0
fmigneault Feb 22, 2021
f32b656
add POST job magpie permission for weaver onto hummingbird-ncdump pro…
fmigneault Feb 23, 2021
ead9414
add explicit dependencies between weaver/worker/mongodb/docker-proxy …
fmigneault Feb 23, 2021
88043d0
adjust networks to avoid other birds to connect to weaver-worker, but…
fmigneault Feb 23, 2021
63c81cb
add missing mongodb network
fmigneault Feb 23, 2021
c93b217
revert mounted volume path in proxy for wps-outputs
fmigneault Feb 25, 2021
5a3d6b1
add magpie anonymous permissions for weaver /versions and /conformanc…
fmigneault Mar 3, 2021
fed1740
apply specific healthcheck commands per service
fmigneault Mar 3, 2021
5e7a1ed
fix healthcheck interval/timeout expecting strings
fmigneault Mar 3, 2021
7381acd
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault Mar 18, 2021
23be4cd
fix typos
fmigneault Mar 18, 2021
72be4e4
bump weaver 2.2.0
fmigneault Mar 19, 2021
683ffc3
ensure admin perms full access to weaver - for backward compat of mag…
fmigneault Mar 19, 2021
35c1bcf
force ignore files
fmigneault Mar 22, 2021
446e944
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault Apr 21, 2021
dc3b555
remove pavics-compose env vars specific to weaver metadata
fmigneault Apr 21, 2021
e76c7a0
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault Apr 21, 2021
0233590
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault Apr 21, 2021
93dcadd
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault Apr 21, 2021
9582e23
Merge branch 'util-optional-components' into feature/DAC-300-weaver-c…
fmigneault Apr 21, 2021
b48ff45
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault Apr 22, 2021
d0ddeca
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault Apr 22, 2021
f13cc68
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault Apr 22, 2021
41e67d3
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault Apr 22, 2021
5428c3c
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault Apr 22, 2021
c317638
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault Apr 22, 2021
f22dd34
patch merge conflict
fmigneault Apr 22, 2021
0d24192
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault Apr 22, 2021
db210bb
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault Apr 22, 2021
44f6684
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault Apr 22, 2021
a084ca6
Merge branch 'docker-compose-update' into tmp-everything-except-weaver
fmigneault Apr 23, 2021
d583e0d
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault Apr 23, 2021
8e2513a
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault May 3, 2021
9513ba7
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault May 3, 2021
acf8e40
skip weaver 2.x and move directly to 3.x for integration in platform
fmigneault May 3, 2021
11a4112
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault May 3, 2021
69e9831
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault May 3, 2021
c03f091
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault May 3, 2021
1d3045c
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault May 3, 2021
8be633b
update weaver with mongodb specific network
fmigneault May 4, 2021
63d90d7
Merge branch 'util-optional-components' into tmp-everything-except-we…
fmigneault May 4, 2021
8bd7f04
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault May 4, 2021
bb7e807
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault Aug 18, 2021
1e72862
add note about config.yml employed in Weaver component config
fmigneault Aug 18, 2021
3421866
bump weaver 3.1.0 -> 3.5.0
fmigneault Aug 19, 2021
0150629
add 'wait-for-wps' image for weaver to wait until GetCapabilities res…
fmigneault Aug 19, 2021
0455ed4
add dynamic build of weaver+dockerize such that it correctly waits fo…
fmigneault Aug 25, 2021
949f8d9
update changelog with weaver changes
fmigneault Aug 25, 2021
757ad59
patch wrong comment in weaver's config default.env
fmigneault Sep 1, 2021
1821939
align weaver's compose logging config with rest of server's main logg…
fmigneault Sep 1, 2021
c1acdfd
pin explicit tag tecnativa/docker-socket-proxy:0.1.1
fmigneault Sep 1, 2021
46e935d
rename 'worker' to 'weaver-worker' for clarity
fmigneault Sep 1, 2021
de702ab
convert weaver's data_sources.json to YAML
fmigneault Sep 1, 2021
23a5bd7
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault Sep 2, 2021
ec2bb0e
add optional-component/test-weaver and move test-specific configs fro…
fmigneault Sep 2, 2021
2b32e69
[wip] use post-compose script to register weaver birds
fmigneault Sep 1, 2021
dae501c
script post-docker-compose-up for weaver WPS providers registration
fmigneault Sep 2, 2021
6b4a8d5
add variables of new weaver script post-docker-compose-up to EXTRA_VA…
fmigneault Sep 2, 2021
fcd917b
add wait for weaver to be ready
fmigneault Sep 2, 2021
b5f1325
add note about WEAVER_WPS_PROVIDERS_MAX_TIME unit seconds
fmigneault Sep 2, 2021
c48e54d
replace curl opts that are not self-explanatory by long forms
fmigneault Sep 2, 2021
b861c71
improve message of which step failed WPS provider registration in Weaver
fmigneault Sep 2, 2021
a0164e5
small patch of weaver wps-processes config
fmigneault Sep 2, 2021
ae57d60
fix incorrect field name to register WPS provider
fmigneault Sep 2, 2021
8bda1cc
post-docker-compose-up chmod x for running
fmigneault Sep 3, 2021
bed06dd
avoid exposing token during wps-registration in weaver + fixes to han…
fmigneault Sep 3, 2021
c5417a4
revert 'name' field invalid back to 'id'
fmigneault Sep 3, 2021
190c363
ignore more backup files
fmigneault Sep 21, 2021
18b748a
bump weaver 3.5.0 -> 4.0.0
fmigneault Sep 21, 2021
f341fdd
patch incorrect check of empty cookie + add minimal validation of aut…
fmigneault Sep 21, 2021
69dac7d
ignore failing tput when missing TERM definition
fmigneault Sep 22, 2021
10130e4
log info about requested WPS providers for easier debugging
fmigneault Sep 22, 2021
c1dece5
add Magpie permission for 'app_producers' group to allow Weaver app (…
fmigneault Sep 24, 2021
b15e22d
bump weaver 4.1.0
fmigneault Sep 30, 2021
1839c40
add celery result config and for startup before weaver api
fmigneault Oct 6, 2021
0927352
bump weaver 4.1.1
fmigneault Oct 13, 2021
08b17b5
bump weaver 4.1.2 (add celery task events https://github.com/crim-ca/…
fmigneault Oct 13, 2021
d7cb2c3
add explicit import location of task execution in celery-ini config f…
fmigneault Oct 13, 2021
e7fb2d2
add adjusted wps-outputs volume to proxy for weaver results
fmigneault Oct 14, 2021
0d84b46
add healtcheck with celery inspect to attempt retry setup of missing …
fmigneault Oct 19, 2021
147278f
move healtcheck to weaver-worker to force retry setup task
fmigneault Oct 19, 2021
7265a71
bump weaver 4.2.0
fmigneault Oct 20, 2021
ba40f82
add auto-restart weaver/worker on invalid celery tasks healthcheck
fmigneault Oct 20, 2021
9e6af09
adjust celery healthcheck & its usage within post-docker-compose-up
fmigneault Oct 20, 2021
583aca2
patch incorrect check of celery task name in healthcheck
fmigneault Oct 20, 2021
63a1bb3
bump weaver 4.2.1
fmigneault Oct 20, 2021
a6d7feb
Merge pull request #192 from bird-house/weaver-extra-config
fmigneault Oct 20, 2021
e5053d2
Merge remote-tracking branch 'origin/master' into feature/DAC-300-wea…
fmigneault Oct 20, 2021
e02ec48
move weaver canarie-api monitoring to distinct config mounted when co…
fmigneault Oct 27, 2021
bc30eff
Merge remote-tracking branch 'origin/master' into feature/DAC-300-wea…
fmigneault Oct 27, 2021
fba7632
double the time for weaver's wps provider timeout (120s) since 60s wa…
fmigneault Oct 28, 2021
d3aabec
detect error celery setup although docker-compose command is ok to fo…
fmigneault Oct 29, 2021
c770f9c
Bump version: 1.16.2 → 1.17.0
fmigneault Nov 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.16.2
current_version = 1.17.0
commit = True
tag = False
tag_name = {new_version}
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
## Project Files
birdhouse/env.local
birdhouse/certkey.pem
birdhouse/cert.pem
birdhouse/key.pem

## Deployment
vagrant_variables.yml
.vagrant/
ubuntu-bionic-18.04-cloudimg-console.log

## IDEs
.idea
.vscode
*.bak
weaver/

# vim temp files
## Backup Files
**/*.bak*
**/*.backup*

## vim temp files
*.swp
34 changes: 34 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,40 @@

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)

[1.17.0](https://github.com/bird-house/birdhouse-deploy/tree/1.17.0) (2021-11-01)
------------------------------------------------------------------------------------------------------------------

### Changes

- Adds [Weaver](https://github.com/crim-ca/weaver) to the stack (optional) when ``./components/weaver``
is added to ``EXTRA_CONF_DIRS``. For more details, refer to
[Weaver Component](https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/components/README.rst#Weaver)
Following happens when enabled:

* Service ``weaver`` (API) gets added with endpoints ``/twitcher/ows/proxy/weaver`` and ``/weaver``.

* All *birds* offering a WPS 1.x/2.x endpoint are automatically added as providers known by `Weaver`
(birds: ``catalog``, ``finch``, ``flyingpigeon``, ``hummingbird``, ``malleefowl`` and ``raven``).
This offers an automatic mapping of WPS 1.x/2.x requests of process descriptions and execution nested under
the *birds* to corresponding [OGC-API - Processes](https://github.com/opengeospatial/ogcapi-processes/)
RESTful interface (and added functionalities).

* New processes can be deployed and executed using
Dockerized [Application Packages](https://pavics-weaver.readthedocs.io/en/latest/package.html).
Additionally, all existing processes (across *bird* providers and Dockerized Application Packages)
can be chained into [Workflows](https://pavics-weaver.readthedocs.io/en/latest/processes.html#workflow)

* Images ``weaver-worker`` (`Weaver`'s job executor) and ``docker-proxy`` (sibling Docker container dispatcher)
are added to the stack to support above functionalities.

* Adds `Magpie` permissions and service for `Weaver` endpoints.

* Adds ``./optional-components/test-weaver`` for even more `Magpie` extended permissions for `Weaver`
for getting access to resources for functionalities required by [Weaver Testing notebook][weaver-test-notebook].

[weaver-test-notebook]: https://github.com/Ouranosinc/pavics-sdi/blob/master/docs/source/notebook-components/weaver_example.ipynb


[1.16.2](https://github.com/bird-house/birdhouse-deploy/tree/1.16.2) (2021-10-27)
------------------------------------------------------------------------------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ for a full-fledged production platform.
* - releases
- | |latest-version| |commits-since|

.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.16.2.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.17.0.svg
:alt: Commits since latest release
:target: https://github.com/bird-house/birdhouse-deploy/compare/1.16.2...master
:target: https://github.com/bird-house/birdhouse-deploy/compare/1.17.0...master

.. |latest-version| image:: https://img.shields.io/badge/tag-1.16.2-blue.svg?style=flat
.. |latest-version| image:: https://img.shields.io/badge/tag-1.17.0-blue.svg?style=flat
:alt: Latest Tag
:target: https://github.com/bird-house/birdhouse-deploy/tree/1.16.2
:target: https://github.com/bird-house/birdhouse-deploy/tree/1.17.0

.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
:alt: ReadTheDocs Build Status (latest version)
Expand Down
67 changes: 65 additions & 2 deletions birdhouse/components/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ How to Enable the Component
- Add "./components/scheduler" to ``EXTRA_CONF_DIRS``.
- Set ``AUTODEPLOY_EXTRA_REPOS``, ``AUTODEPLOY_DEPLOY_KEY_ROOT_DIR``,
``AUTODEPLOY_PLATFORM_FREQUENCY``, ``AUTODEPLOY_NOTEBOOK_FREQUENCY`` as desired,
full documentation in env.local.example_.
full documentation in `env.local.example`_.
- Run once fix-write-perm_ (:download:`download <../deployment/fix-write-perm>`), see doc in script.


Expand Down Expand Up @@ -163,7 +163,7 @@ able to access them.
How to Enable the Component
---------------------------

- Edit ``env.local`` (a copy of env.local.example_ (:download:`download <../env.local.example>`))
- Edit ``env.local`` (a copy of `env.local.example`_ (:download:`download <../env.local.example>`))

- Add "./components/monitoring" to ``EXTRA_CONF_DIRS``
- Set ``GRAFANA_ADMIN_PASSWORD`` to login to Grafana
Expand Down Expand Up @@ -241,8 +241,71 @@ Customizing the Component
Slack or other services accepting webhooks), ``ALERTMANAGER_EXTRA_RECEIVERS``.


Weaver
======

By enabling this component, the `Weaver`_ service will be integrated into the stack.

This component offers `OGC API - Processes`_ interace to WPS components (a.k.a `WPS-REST bindings` and
`WPS-T (Transactional)` support).
This provides a RESTful JSON interface with asynchronous WPS processes execution over remote instances.
Other WPS components of the birdhouse stack (`finch`_, `flyingpigeon`_, etc.) will also all be registered
under `Weaver`_ in order to provide a common endpoint to retrieve all available processes, and dispatch
their execution to the corresponding service.
Finally, `Weaver`_ also adds `Docker` image execution capabilities as a WPS process, allowing deployment
and execution of custom applications and workflows.


Usage
-----

Once this component is enabled, `Weaver`_ will be accessible at ``https://<PAVICS_FQDN_PUBLIC>/weaver`` endpoint,
where ``PAVICS_FQDN_PUBLIC`` is defined in your ``env.local`` file.

Full process listing (across WPS providers) should be available using request:

.. code-block::

GET https://<PAVICS_FQDN_PUBLIC>/weaver/processes?providers=true

Please refer to the `Weaver OpenAPI`_ for complete description of available requests.
This description will also be accessible via ``https://<PAVICS_FQDN_PUBLIC>/weaver/api`` once the instance is started.

For any specific details about `Weaver`_ configuration parameters, functionalities or questions, please refer to its
`documentation <https://pavics-weaver.readthedocs.io/en/latest/>`_.

How to Enable the Component
---------------------------

- Edit ``env.local`` (a copy of `env.local.example`_)

- Add ``"./components/weaver"`` to ``EXTRA_CONF_DIRS``.

- Component ``birdhouse/optional-components/all-public-access`` should also be enabled to ensure that `Weaver`_
can request ``GetCapabilities`` of every WPS provider to be registered. Publicly inaccessible services will not
succeed registration and will not provide the WPS-REST interface.


Customizing the Component
-------------------------

- Edit ``env.local`` (a copy of `env.local.example`_)

- Optionally, set any additional environment variable overrides amongst values defined in `weaver/default.env`_.

- Optionally, mount any additional `Weaver`_-specific configuration files
(see contents of ``birdhouse/components/weaver/config/weaver``) if extended functionalities need to be defined.
Further ``docker-compose-extra.yml`` could be needed to define
any other ``volumes`` entries where these component would need to be mounted to.



.. _finch: https://github.com/bird-house/finch
.. _flyingpigeon: https://github.com/bird-house/flyingpigeon
.. _Weaver: https://github.com/crim-ca/weaver
.. _Weaver OpenAPI: https://pavics-weaver.readthedocs.io/en/latest/api.html
.. _weaver/default.env: ./weaver/default.env
.. _OGC API - Processes: https://github.com/opengeospatial/ogcapi-processes
.. _env.local.example: ../env.local.example
.. _fix-write-perm: ../deployment/fix-write-perm
.. _deploy.sh: ../deployment/deploy.sh
Expand Down
6 changes: 6 additions & 0 deletions birdhouse/components/weaver/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
conf.extra-service.d/weaver.conf
config/magpie/config.yml
config/weaver/data_sources.yml
config/weaver/request_options.yml
config/weaver/wps_processes.yml
config/weaver/weaver.ini
34 changes: 34 additions & 0 deletions birdhouse/components/weaver/celery-healthcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

INFO="[INFO] "
ERROR="[ERROR] "

echo "${INFO}Starting Celery Healthcheck"
result=$(celery inspect registered -A pyramid_celery.celery_app --ini "${APP_CONFIG_DIR}/weaver.ini" --timeout 5)
if [[ -z "${result}" ]]; then
echo "${ERROR}Empty Celery response."
exit 1
fi

# should look like:
# [... weaver-logs ...]
# -> celery@<uuid>: OK
# * weaver.processes.execution.execute_process
result=$(echo "${result}" | tail -n 2)
status=$(echo "${result}" | head -n 1)
task=$(echo "${result}" | tail -n 1)

echo "${INFO}Celery inspect results dump:"
echo "${result}"

if [[ $(echo "${status}" | grep -c "OK") -ne 1 ]]; then
echo "${ERROR}Celery inspect did not return expected 'OK' status."
exit 2
fi
if [[ $(echo "${task}" | grep -c "weaver.processes.execution.execute_process") -ne 1 ]]; then
echo "${ERROR}Celery inspect did not retrieve expected task."
exit 3
fi

echo "${INFO}Success. Celery Task is ready."
exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# NOTE:
# Redirect to internal network of twitcher with Weaver root endpoint and alias allows to set
# the same 'magpie' permissions on the 'weaver' service defined by "WEAVER_MANAGER_NAME".
# This allows verification of the same service user/group permissions references regardless
# whether the *shortcut* Weaver endpoint, the alias or the explicit 'twitcher' proxy route is used.
# redirect EMS/ADES to actual secured Weaver path
#location /${WEAVER_CONFIG} {
# return 302 https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/${WEAVER_MANAGER_NAME};
#}

location /${WEAVER_MANAGER_NAME} {
proxy_pass https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/${WEAVER_MANAGER_NAME};
proxy_set_header Host $host;
proxy_buffering off;
include /etc/nginx/conf.d/cors.include;
}

# NOTE:
# this is needed only if not using the location already provided by the core configuration
# see 'birdhouse/config/proxy/conf.d/all-services.include.template'
# location where process job outputs will be accessible
#location ^~ ${WEAVER_WPS_OUTPUTS_PATH}/ {
# alias ${WEAVER_WPS_OUTPUTS_DIR}/;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SERVICES['node']['monitoring'].update({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmigneault another problem detected after go-live in prod yesterday:

This weaver_config.py should be added to .gitignore, else autodeploy is broken because it would detect an unclean checkout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want a separate PR for this fix only (with version bump and all?).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. A hotfix also deserve a proper release to have an identifier to communicate to your users. You would do the same for Magpie I figure.

'Weaver': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/weaver'
},
},
})

# vi: tabstop=8 expandtab shiftwidth=4 softtabstop=4 syntax=python
138 changes: 138 additions & 0 deletions birdhouse/components/weaver/config/magpie/config.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
## see reference example for details:
# https://github.com/Ouranosinc/Magpie/blob/master/config/config.yml

providers:
# definition of Weaver service
${WEAVER_MANAGER_NAME}:
url: http://${PAVICS_FQDN}:4001
title: Weaver (${WEAVER_CONFIG})
public: true
c4i: false
type: api # FIXME: 'ades' when https://github.com/Ouranosinc/Magpie/issues/360 implemented
sync_type: api

# FIXME: remove when https://github.com/Ouranosinc/Magpie/issues/360 implemented, see 'default.env'
${WEAVER_WPS_NAME}:
url: http://${PAVICS_FQDN}:4001/wps
title: Weaver (WPS)
public: true
c4i: false
type: wps
sync_type: wps

permissions:
# Administrator permissions over whole service
- service: ${WEAVER_MANAGER_NAME}
permission: read
group: administrators
action: create
- service: ${WEAVER_MANAGER_NAME}
permission: write
group: administrators
action: create

# Entrypoint
- service: ${WEAVER_MANAGER_NAME}
permission: read-match
group: anonymous
action: create

# OpenAPI JSON schema
- service: ${WEAVER_MANAGER_NAME}
resource: /json
permission: read
group: anonymous
action: create

# OpenAPI Swagger
- service: ${WEAVER_MANAGER_NAME}
resource: /api
permission: read
group: anonymous
action: create

# Version details
- service: ${WEAVER_MANAGER_NAME}
resource: /versions
permission: read
group: anonymous
action: create

# OGC-API conformance
- service: ${WEAVER_MANAGER_NAME}
resource: /conformance
permission: read
group: anonymous
action: create

# Process deployment (write) and listing (read)
- service: ${WEAVER_MANAGER_NAME}
resource: /processes # GET is processes listing, POST is deploy: only allow view by anonymous
permission: read # under '/processes/...', JSON 'DescribeProcess', POST job submit, GET results, etc.
group: anonymous
action: create

# convenience group that should be allowed deployment of Application Packages provided as OGC-API REST-JSON WPS
# NOTE: all users member of this group will be allowed to deploy/undeploy **any** app in Weaver
- service: ${WEAVER_MANAGER_NAME}
resource: /processes
permission: write
group: app_producers
action: create

# Providers listing
- service: ${WEAVER_MANAGER_NAME}
resource: /providers
permission: read-match
group: anonymous
action: create

# Provider processes listing
# (each provider in './components/weaver/config/weaver/wps_processes.yml.template')
# catalog
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/catalog
permission: read
group: anonymous
action: create
# finch
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/finch
permission: read
group: anonymous
action: create
# flyingpigeon
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/flyingpigeon
permission: read
group: anonymous
action: create
# hummingbird
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/hummingbird
permission: read
group: anonymous
action: create
# malleefowl
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/malleefowl
permission: read
group: anonymous
action: create
# raven
- service: ${WEAVER_MANAGER_NAME}
resource: /providers/raven
permission: read
group: anonymous
action: create

# FIXME: remove when https://github.com/Ouranosinc/Magpie/issues/360 implemented
# for the moment, align WPS processes to allow public GetCapabilities and DescribeProcess like REST endpoint does
- service: ${WEAVER_WPS_NAME}
permission: getcapabilities
group: anonymous
action: create
- service: ${WEAVER_WPS_NAME}
permission: describeprocess
group: anonymous
action: create