-
Notifications
You must be signed in to change notification settings - Fork 7
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
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 c3cb446
pushes nginx files inside proxy container
Zvax a7d5e5b
explicitely adds environment variables to the templating engine and n…
Zvax 47e59f0
fixes postgres-pavics database not found psql error
Zvax 4a87f1a
unhardcodes various twitcher and weaver configs
Zvax 381c0d1
adds path config from environment for weaver wps
Zvax 721ed5c
first pass aligning params with deploy variables
fmigneault 4a107d6
tag mongodb 3.6.21 + remap volumes for docker-compose 3.4
fmigneault 278714f
employ log rotation shared logging config
fmigneault b376620
add DATA_PERSIST_ROOT value to override root data directory path as n…
fmigneault bac7b32
move all weaver configs under their optional-component directory
fmigneault 35aece5
add server/contact/support variables that can be shared across contai…
fmigneault f3c6687
revert mongodb 3.4
fmigneault 784f00d
fix weaver twitcher nginx variable
fmigneault 6745774
fix incorrect user:anonymous magpie permission to group:anonymous
fmigneault 98908c7
fix weaver/twitcher nginx path + use variable to service name of weaver
fmigneault 7a3946c
bump weaver version 1.13.1
fmigneault aaa19fe
bump weaver 1.14.0 (providers-config) & apply depends_on to load othe…
fmigneault 480d6e7
add healthchecks for wps providers registed in weaver + remove extra …
fmigneault 54e7700
fix healthcheck commands
fmigneault 13144ac
revert service names
fmigneault 3f85413
adjust weaver nginx redirects
fmigneault 786bdb3
move healthchecks into separate optional-component
fmigneault 3d12392
add Weaver WPS providers Magpie permissions
fmigneault f598a9e
change weaver magpie permissions to allow read all provider processes…
fmigneault a1f2a55
use same wpsoutputs location as other birds for weaver's location
fmigneault 3a6b7b3
revert named volume 'testdatasets' to literal path and employ DATA_PE…
fmigneault d7c442e
remove CRIM-ADES from default weaver data-source locations
fmigneault f5c8346
use variable for weaver location + remove weaver config path as endpo…
fmigneault 4bd4e65
add DATA_PERSIST_ROOT to template variables
fmigneault e911e29
add notes about startup weaver provider references
fmigneault 39efac8
more details and adjustments of volume/paths wps-outputs + add magpie…
fmigneault 89f2af2
move weaver to 'components'
fmigneault 8baa010
user PAVICS_FQDN_PUBLIC
fmigneault 80559a3
add read-only attribute to applicable weaver config files
fmigneault 61ff3f1
use dummy default contact values
fmigneault d181b09
update weaver readme details
fmigneault c69bac6
target weaver 2.0.0
fmigneault f32b656
add POST job magpie permission for weaver onto hummingbird-ncdump pro…
fmigneault ead9414
add explicit dependencies between weaver/worker/mongodb/docker-proxy …
fmigneault 88043d0
adjust networks to avoid other birds to connect to weaver-worker, but…
fmigneault 63c81cb
add missing mongodb network
fmigneault c93b217
revert mounted volume path in proxy for wps-outputs
fmigneault 5a3d6b1
add magpie anonymous permissions for weaver /versions and /conformanc…
fmigneault fed1740
apply specific healthcheck commands per service
fmigneault 5e7a1ed
fix healthcheck interval/timeout expecting strings
fmigneault 7381acd
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault 23be4cd
fix typos
fmigneault 72be4e4
bump weaver 2.2.0
fmigneault 683ffc3
ensure admin perms full access to weaver - for backward compat of mag…
fmigneault 35c1bcf
force ignore files
fmigneault 446e944
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault dc3b555
remove pavics-compose env vars specific to weaver metadata
fmigneault e76c7a0
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault 0233590
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault 93dcadd
Merge branch 'docker-compose-update' into feature/DAC-300-weaver-compose
fmigneault 9582e23
Merge branch 'util-optional-components' into feature/DAC-300-weaver-c…
fmigneault b48ff45
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault d0ddeca
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault f13cc68
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault 41e67d3
Merge branch 'extra-envvar' into feature/DAC-300-weaver-compose
fmigneault 5428c3c
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault c317638
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault f22dd34
patch merge conflict
fmigneault 0d24192
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault db210bb
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault 44f6684
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault a084ca6
Merge branch 'docker-compose-update' into tmp-everything-except-weaver
fmigneault d583e0d
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault 8e2513a
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault 9513ba7
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault acf8e40
skip weaver 2.x and move directly to 3.x for integration in platform
fmigneault 11a4112
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault 69e9831
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault c03f091
Merge branch 'extra-envvar' into tmp-everything-except-weaver
fmigneault 1d3045c
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault 8be633b
update weaver with mongodb specific network
fmigneault 63d90d7
Merge branch 'util-optional-components' into tmp-everything-except-we…
fmigneault 8bd7f04
Merge branch 'tmp-everything-except-weaver' into feature/DAC-300-weav…
fmigneault bb7e807
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault 1e72862
add note about config.yml employed in Weaver component config
fmigneault 3421866
bump weaver 3.1.0 -> 3.5.0
fmigneault 0150629
add 'wait-for-wps' image for weaver to wait until GetCapabilities res…
fmigneault 0455ed4
add dynamic build of weaver+dockerize such that it correctly waits fo…
fmigneault 949f8d9
update changelog with weaver changes
fmigneault 757ad59
patch wrong comment in weaver's config default.env
fmigneault 1821939
align weaver's compose logging config with rest of server's main logg…
fmigneault c1acdfd
pin explicit tag tecnativa/docker-socket-proxy:0.1.1
fmigneault 46e935d
rename 'worker' to 'weaver-worker' for clarity
fmigneault de702ab
convert weaver's data_sources.json to YAML
fmigneault 23a5bd7
Merge branch 'master' into feature/DAC-300-weaver-compose
fmigneault ec2bb0e
add optional-component/test-weaver and move test-specific configs fro…
fmigneault 2b32e69
[wip] use post-compose script to register weaver birds
fmigneault dae501c
script post-docker-compose-up for weaver WPS providers registration
fmigneault 6b4a8d5
add variables of new weaver script post-docker-compose-up to EXTRA_VA…
fmigneault fcd917b
add wait for weaver to be ready
fmigneault b5f1325
add note about WEAVER_WPS_PROVIDERS_MAX_TIME unit seconds
fmigneault c48e54d
replace curl opts that are not self-explanatory by long forms
fmigneault b861c71
improve message of which step failed WPS provider registration in Weaver
fmigneault a0164e5
small patch of weaver wps-processes config
fmigneault ae57d60
fix incorrect field name to register WPS provider
fmigneault 8bda1cc
post-docker-compose-up chmod x for running
fmigneault bed06dd
avoid exposing token during wps-registration in weaver + fixes to han…
fmigneault c5417a4
revert 'name' field invalid back to 'id'
fmigneault 190c363
ignore more backup files
fmigneault 18b748a
bump weaver 3.5.0 -> 4.0.0
fmigneault f341fdd
patch incorrect check of empty cookie + add minimal validation of aut…
fmigneault 69dac7d
ignore failing tput when missing TERM definition
fmigneault 10130e4
log info about requested WPS providers for easier debugging
fmigneault c1dece5
add Magpie permission for 'app_producers' group to allow Weaver app (…
fmigneault b15e22d
bump weaver 4.1.0
fmigneault 1839c40
add celery result config and for startup before weaver api
fmigneault 0927352
bump weaver 4.1.1
fmigneault 08b17b5
bump weaver 4.1.2 (add celery task events https://github.com/crim-ca/…
fmigneault d7cb2c3
add explicit import location of task execution in celery-ini config f…
fmigneault e7fb2d2
add adjusted wps-outputs volume to proxy for weaver results
fmigneault 0d84b46
add healtcheck with celery inspect to attempt retry setup of missing …
fmigneault 147278f
move healtcheck to weaver-worker to force retry setup task
fmigneault 7265a71
bump weaver 4.2.0
fmigneault ba40f82
add auto-restart weaver/worker on invalid celery tasks healthcheck
fmigneault 9e6af09
adjust celery healthcheck & its usage within post-docker-compose-up
fmigneault 583aca2
patch incorrect check of celery task name in healthcheck
fmigneault 63a1bb3
bump weaver 4.2.1
fmigneault a6d7feb
Merge pull request #192 from bird-house/weaver-extra-config
fmigneault e5053d2
Merge remote-tracking branch 'origin/master' into feature/DAC-300-wea…
fmigneault e02ec48
move weaver canarie-api monitoring to distinct config mounted when co…
fmigneault bc30eff
Merge remote-tracking branch 'origin/master' into feature/DAC-300-wea…
fmigneault fba7632
double the time for weaver's wps provider timeout (120s) since 60s wa…
fmigneault d3aabec
detect error celery setup although docker-compose command is ok to fo…
fmigneault c770f9c
Bump version: 1.16.2 → 1.17.0
fmigneault File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
25 changes: 25 additions & 0 deletions
25
birdhouse/components/weaver/conf.extra-service.d/weaver.conf.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}/; | ||
#} |
9 changes: 9 additions & 0 deletions
9
birdhouse/components/weaver/config/canarie-api/weaver_config.py.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SERVICES['node']['monitoring'].update({ | ||
'Weaver': { | ||
'request': { | ||
'url': 'https://${PAVICS_FQDN_PUBLIC}/weaver' | ||
}, | ||
}, | ||
}) | ||
|
||
# vi: tabstop=8 expandtab shiftwidth=4 softtabstop=4 syntax=python |
138 changes: 138 additions & 0 deletions
138
birdhouse/components/weaver/config/magpie/config.yml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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?).
There was a problem hiding this comment.
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.