Skip to content

Make all components pluggable#296

Merged
mishaschwartz merged 44 commits intomasterfrom
pluggable-components-part-2
Mar 22, 2023
Merged

Make all components pluggable#296
mishaschwartz merged 44 commits intomasterfrom
pluggable-components-part-2

Conversation

@mishaschwartz
Copy link
Collaborator

@mishaschwartz mishaschwartz commented Feb 21, 2023

Overview

Makes all components part of the "pluggable architecture" meaning that no components are required to be configured, each components can be added to the stack as needed.

See previous discussion for this PR at #295

Changes

Non-breaking changes

The components that will be added to the stack are only those whose configuration directory is listed in either DEFAULT_CONF_DIRS or EXTRA_CONF_DIRS.

Breaking changes

None

Related Issue / Discussion

Additional Information

In a separate PR we should:

  • components configurations are now stored in configs, components, and optional_components directories. Now that these distinctions are no longer relevant it might make more sense to divide them as follows:
    • components: all components (optional or otherwise; eg: finch, weaver, twitcher)
    • shared_dependencies: docker containers required to run multiple components (eg: postgres, mongodb)
    • component_enhancements: additional configurations that modify an existing component (eg: all-public-access, database-external-ports)

Tests

  • Ensure baseline status on master branch pass Jenkins to prepare for upgrade test
  • Upgrade test via autodeploy to simulate production environment rollout
  • Ensure no regressions, no backward incompatible changes, when using default config after upgrade
  • (not done yet) Test the new ability provided by this PR to pick and choose a subset of components
    • Proxy, Finch, Weaver only: the subset that CRIM runs but CRIM unable to use PAVICS because it does not want to rest of PAVICS stack
    • Proxy, Thredds, Twitcher, Magpie, Phoenix only + external birds: the subset that PCIC needs but is stuck with the entire PAVICS stack

@github-actions github-actions bot added the ci/operations Continuous Integration components label Feb 21, 2023
@mishaschwartz mishaschwartz mentioned this pull request Feb 21, 2023
1 task
@bird-house bird-house deleted a comment from crim-jenkins-bot Feb 21, 2023
@matprov
Copy link
Collaborator

matprov commented Feb 21, 2023

@mishaschwartz

Related to http://daccs-jenkins.crim.ca/job/DACCS-iac-birdhouse/1293/

proxy              | 2023/02/21 21:23:31 [emerg] 11#11: unknown "birdhouse_deploy_components_json" variable
proxy              | nginx: [emerg] unknown "birdhouse_deploy_components_json" variable

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1293/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-67.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@mishaschwartz mishaschwartz marked this pull request as ready for review February 22, 2023 16:05
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1295/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-36.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@matprov
Copy link
Collaborator

matprov commented Feb 22, 2023

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1295/
Result : failure

proxy              | [2023-02-22 18:34:18,801] [20] [INFO] app_object : Testing configuration...
proxy              | [2023-02-22 18:34:18,808] [20] [INFO] app_object : Loading configuration
proxy              | [2023-02-22 18:34:18,808] [20] [INFO] app_object : Checking status of routes...
proxy              | [2023-02-22 18:34:18,950] ERROR in monitoring: Exception occurs while trying to check status of node.Raven-public
proxy              | [2023-02-22 18:34:18,950] [20] [ERROR] app_object : Exception occurs while trying to check status of node.Raven-public
proxy              | [2023-02-22 18:34:18 +0000] [20] [ERROR] Exception in worker process
proxy              | Traceback (most recent call last):
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 578, in spawn_worker
proxy              |     worker.init_process()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 190, in init_process
proxy              |     super(GeventWorker, self).init_process()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 126, in init_process
proxy              |     self.load_wsgi()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 135, in load_wsgi
proxy              |     self.wsgi = self.app.wsgi()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
proxy              |     self.callable = self.load()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
proxy              |     return self.load_wsgiapp()
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
proxy              |     return util.import_app(self.app_uri)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 352, in import_app
proxy              |     __import__(module)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gevent/builtins.py", line 93, in __import__
proxy              |     result = _import(*args, **kwargs)
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/wsgi.py", line 1, in <module>
proxy              |     from canarieapi import APP as application
proxy              |   File "/usr/local/lib/python2.7/dist-packages/gevent/builtins.py", line 93, in __import__
proxy              |     result = _import(*args, **kwargs)
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/canarieapi.py", line 44, in <module>
proxy              |     test_config(False)
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/test.py", line 209, in test_config
proxy              |     monitoring.monitor(update_db=update_db)
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/monitoring.py", line 33, in monitor
proxy              |     response=test_dic.get('response', {}))
proxy              |   File "/opt/local/src/CanarieAPI/canarieapi/monitoring.py", line 68, in check_service
proxy              |     r = requests.request(**default_request)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50, in request
proxy              |     response = session.request(method=method, url=url, **kwargs)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request
proxy              |     resp = self.send(prep, **send_kwargs)
proxy              |   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 597, in send
proxy              |     history = [resp for resp in gen] if allow_redirects else []
proxy              |   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 113, in resolve_redirects
proxy              |     raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
proxy              | TooManyRedirects: Exceeded 30 redirects.
proxy              | [2023-02-22 18:34:18 +0000] [20] [INFO] Worker exiting (pid: 20)
proxy              | [2023-02-22 18:34:18 +0000] [12] [INFO] Shutting down: Master
proxy              | [2023-02-22 18:34:18 +0000] [12] [INFO] Reason: Worker failed to boot.
proxy exited with code 3

@fmigneault Is it related to recent CanarieAPI changes?

Comment on lines +123 to +136
for extra_compose in "$adir"/docker-compose-extra-*.yml; do
service_name=$(basename "$extra_compose")
service_name=${service_name#docker-compose-extra-}
service_name=${service_name#.yml}
if echo "$CONFIGURED_COMPONENTS" | grep " $service_name "; then
COMPOSE_CONF_LIST="${COMPOSE_CONF_LIST} -f $extra_compose"
fi
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to propose using the same directory-based strategy as used for component configs instead of using derived components parts in file names of docker-compose extra fragments.

Assuming let's say that enabled components are [magpie, twitcher, weaver, finch].
Instead of looking for the following:

birdhouse/components/finch/docker-compose-extra.yml
birdhouse/components/finch/docker-compose-extra-magpie.yml
birdhouse/components/weaver/docker-compose-extra.yml
birdhouse/components/weaver/docker-compose-extra-finch.yml
birdhouse/components/weaver/docker-compose-extra-magpie.yml

The script would look for:

birdhouse/components/finch/config/finch/docker-compose-extra.yml
birdhouse/components/finch/config/magpie/docker-compose-extra.yml
birdhouse/components/weaver/config/weaver/docker-compose-extra.yml
birdhouse/components/weaver/config/finch/docker-compose-extra.yml
birdhouse/components/weaver/config/magpie/docker-compose-extra.yml

The reason why I want to make this proposition is because:

  1. It is easier to know which part of the path corresponds to which component activation logic when parsing.
  2. It is easier mentally to always think with directories, not having to switch between dir-based/named-based method since other files in configs, nginx, etc. are using this method.
  3. Multiple components (eg: weaver, cowbird) already have nested config/<dependency> directories for other configurations they augment. Moving the docker-compose-extra.yml in those directories produces fewer changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure that makes sense. I'll change that over today.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@fmigneault
Copy link
Member

fmigneault commented Feb 23, 2023

Is it related to recent CanarieAPI changes?

Not sure in this case, but there is no change of CanarieAPI since #284 is not integrated.
The log has "/usr/local/lib/python2.7/, so it's not related to a change on the code of CanarieAPI.
Maybe a modified config in the PR.

@fmigneault
Copy link
Member

@mishaschwartz

  • components configurations are now stored in configs, components, and optional_components directories. Now that these distinctions are no longer relevant it might make more sense to divide them as follows:
    - components: all components (optional or otherwise; eg: finch, weaver, twitcher)
    - shared_dependencies: docker containers required to run multiple components (eg: postgres, mongodb)
    - component_enhancements: additional configurations that modify an existing component (eg: all-public-access, database-external-ports)

components and optional-components are (poorly named, but factually) all optional
A better interpretation for them would be "services" vs "extended-configurations", as current optional-components usually only add permissions, test data, etc. However, it is better to leave them named and structured as such for backward compatibility.

I don't dislike the idea of improving shared dependencies, but better roles should be defined for databases. Everything is too easily accessible/mixed together, and they should be kept separated in some critical cases, such as user logins and permissions with magpie. Technically, each service should have its own user to query the database with limited table/collections accessible.

I would not separate components into "components" and "shared_dependencies".
There are already conflicting categorization cases right now in the dependency graph:

weaver:
    - mongodb
    - "[ finch | malleefowl | hummingbird | catagog ]":
        - postgres
magpie:
    - postgres
    - "[ finch | malleefowl | hummingbird | catagog ]":
        - postgres

weaver and magpie would both depend on (finch, mallefowl, hummingbird, catalog) which each depends on postgres
weaver and mapgie have distinct database dependencies themselves
finch, mallefowl, hummingbird, catalog are "components" when used directly, but also "shared_dependencies" when used by others

@mishaschwartz
Copy link
Collaborator Author

@fmigneault I like the idea of using "services" and "extended-configurations" as labels. Services can then depend on other services and we don't need to make a distinction between optional and non-optional.

As well as databases, we also need to think about shared volumes, specifically the wps_output and data volumes that are shared by a few different components.

What if we did the following:

  • services/ : this contains everything currently in the components/ directory and everything in the config/ directory that has an externally visible endpoint (ie. finch, jupyterhub, etc. but not postgres, mongodb, etc.), also include testthredds, emu and generic_bird from optional-components
  • extended-configurations/ : this contains most of the stuff in optional-components
  • data/ : this is where all persistent data services are configured, these include any shared databases (postgres, mongodb) and shared data-volumes (wps_output, data).

At this point, I propose that we make these changes in a separate PR though. This PR is already making a ton of changes and I think we could separate these changes out.

I really like the idea of having each service have an associated user that interacts with magpie to limit what it can access. I'm going to add a comment to the relevant issue so that we can make sure that we implement that.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1297/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-91.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@matprov
Copy link
Collaborator

matprov commented Feb 23, 2023

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1297/
Result : failure

Same issue related to proxy <> raven

@mishaschwartz
Copy link
Collaborator Author

@matprov I'm hoping to get a local test machine up and running today so I should be able to more easily debug the proxy <> raven issue and fix that shortly

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1298/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-154.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1311/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-88.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/986/

NOTEBOOK TEST RESULTS
    
[2023-02-28T15:59:15.871Z] ============================= test session starts ==============================
[2023-02-28T15:59:15.871Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-02-28T15:59:15.871Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-02-28T15:59:15.871Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-02-28T15:59:15.871Z] collected 268 items
[2023-02-28T15:59:15.871Z] 
[2023-02-28T15:59:23.601Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-02-28T15:59:31.941Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-02-28T15:59:39.277Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  8%]
[2023-02-28T15:59:44.156Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .FFFFFFF       [ 11%]
[2023-02-28T15:59:47.009Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-02-28T16:07:38.630Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 20%]
[2023-02-28T16:07:40.554Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-02-28T16:07:47.264Z] ...............                                                          [ 26%]
[2023-02-28T16:07:57.600Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-02-28T16:08:01.180Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb FFFFFF            [ 30%]
[2023-02-28T16:08:23.207Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-02-28T16:08:24.606Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 32%]
[2023-02-28T16:08:37.680Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 35%]
[2023-02-28T16:08:43.271Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 37%]
[2023-02-28T16:12:22.223Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 42%]
[2023-02-28T16:13:35.732Z] .............                                                            [ 47%]
[2023-02-28T16:13:40.821Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 49%]
[2023-02-28T16:13:42.994Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 52%]
[2023-02-28T16:14:14.235Z] .................                                                        [ 58%]
[2023-02-28T16:14:21.179Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ...FF           [ 60%]
[2023-02-28T16:14:22.580Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-02-28T16:14:23.627Z] .FFFFFFFF                                                                [ 64%]
[2023-02-28T16:14:34.989Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 68%]
[2023-02-28T16:14:44.711Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 70%]
[2023-02-28T16:15:37.707Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 79%]
[2023-02-28T16:15:40.245Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-02-28T16:15:52.797Z] ......                                                                   [ 81%]
[2023-02-28T16:21:59.513Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 82%]
[2023-02-28T16:24:02.586Z] .............                                                            [ 86%]
[2023-02-28T16:24:24.550Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-02-28T16:31:11.243Z] ....s.                                                                   [ 89%]
[2023-02-28T16:31:19.388Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-02-28T16:31:24.595Z] ...                                                                      [ 91%]
[2023-02-28T16:31:39.512Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-02-28T16:32:03.304Z] ......                                                                   [ 93%]
[2023-02-28T16:32:06.060Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-02-28T16:35:30.717Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-02-28T16:35:30.717Z] 
[2023-02-28T16:35:30.717Z] =================================== FAILURES ===================================
    
  

@mishaschwartz
Copy link
Collaborator Author

@tlvu

I have a few question about the failing tests:

  • For pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb and pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb I get the same tests errors for both this branch, master, and when I try to run the notebook manually at pavics.ouranos.ca. Is this an expected error or am I doing something wrong when I try to test these out locally?

@fmigneault
Copy link
Member

@mishaschwartz

pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb fails with:

11:35:30  wms = WebMapService("https://neo.gsfc.nasa.gov/wms/wms")
11:35:30  print("Title: ", wms.identification.title)
11:35:30  print("Type: ", wms.identification.type)
11:35:30  print("Operations: ", [op.name for op in wms.operations])
11:35:30  print("GetMap options: ", wms.getOperationByName("GetMap").formatOptions)
11:35:30  wms.contents.keys()
11:35:30  
11:35:30  Traceback:
11:35:30  
11:35:30  Traceback (most recent call last):
11:35:30  
11:35:30    File /opt/conda/envs/birdy/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3433 in run_code
11:35:30      exec(code_obj, self.user_global_ns, self.user_ns)
11:35:30  
11:35:30    Cell In [2], line 1
11:35:30      wms = WebMapService("https://neo.gsfc.nasa.gov/wms/wms")
11:35:30  
11:35:30    File /opt/conda/envs/birdy/lib/python3.8/site-packages/owslib/wms.py:50 in WebMapService
11:35:30      return wms111.WebMapService_1_1_1(
11:35:30  
11:35:30    File /opt/conda/envs/birdy/lib/python3.8/site-packages/owslib/map/wms111.py:75 in __init__
11:35:30      self._capabilities = reader.read(self.url, timeout=self.timeout)
11:35:30  
11:35:30    File /opt/conda/envs/birdy/lib/python3.8/site-packages/owslib/map/common.py:69 in read
11:35:30      return etree.fromstring(raw_text)
11:35:30  
11:35:30    File src/lxml/etree.pyx:3254 in lxml.etree.fromstring
11:35:30  
11:35:30    File src/lxml/parser.pxi:1913 in lxml.etree._parseMemoryDocument
11:35:30  
11:35:30    File src/lxml/parser.pxi:1800 in lxml.etree._parseDoc
11:35:30  
11:35:30    File src/lxml/parser.pxi:1141 in lxml.etree._BaseParser._parseDoc
11:35:30  
11:35:30    File src/lxml/parser.pxi:615 in lxml.etree._ParserContext._handleParseResultDoc
11:35:30  
11:35:30    File src/lxml/parser.pxi:725 in lxml.etree._handleParseResult
11:35:30  
11:35:30    File src/lxml/parser.pxi:654 in lxml.etree._raiseParseError
11:35:30  
11:35:30    File <string>:1
11:35:30  XMLSyntaxError: Space required after the Public Identifier, line 1, column 50

pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb fails due to:
ModuleNotFoundError: No module named 'pyesgf' in the first cell.

pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb fails due to hummingbird not responding
(probably it failed the provider registration during instance startup - hummingbird taking too long to boot)

@mishaschwartz
Copy link
Collaborator Author

mishaschwartz commented Mar 3, 2023

@fmigneault I'm actually able to see the jenkins report myself now but thanks for posting the relevant errors.

Some followup questions:

  • WebMapService("https://neo.gsfc.nasa.gov/wms/wms") seems to fail everywhere (this branch, master, pavics.ouranos.ca), are there additional credentials I need to add manually to the tutorial notebooks to access the wms at this URL. Is this passing or failing on your pavics deployment at CRIM as well?
  • ModuleNotFoundError: No module named 'pyesgf' indicates that there is a jupyter kernel image that isn't being created is that correct? Can you help me figure out where the jupyterhub service finds and loads these kernel images? There may be a step that this PR is skipping.
  • hummingbird isn't responding because the magpie permissions from admin users for the wps birds are all empty so weaver is not allowed to connect. Where are admin permissions set? There doesn't seem to be a permissions.cfg file that I can find that specifies admin permissions specifically unless I'm missing something.

Thanks! Also, let me know if it's easier to answer these questions in person and I can give you a call

@huard
Copy link
Collaborator

huard commented Mar 3, 2023 via email

@tlvu
Copy link
Collaborator

tlvu commented Mar 3, 2023

@tlvu

I have a few question about the failing tests:

* For `pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb` and `pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb` I get the same tests errors for both this branch, master, and when I try to run the notebook manually at pavics.ouranos.ca. Is this an expected error or am I doing something wrong when I try to test these out locally?

@mishaschwartz David was correct,

So these 2 notebooks failure can be safely ignored for now.

@tlvu
Copy link
Collaborator

tlvu commented Mar 3, 2023

@mishaschwartz A note about backward compat.

It is okay to rename optional-components to something more descriptive and meaningful. Also okay to move some components from optional-components to components.

However, please add symlinks back at the old locations so existing env.local from multiples existing deployments are not broken.

I think CRIM automated pipeline are also activating some of those optional-components so having this backward compat will avoid CRIM from having to manage 2 different copies of their env.local, a new one specifically for this PR and existing one for all other PR.

@mishaschwartz
Copy link
Collaborator Author

* `hummingbird` isn't responding because the magpie permissions from admin users for the wps birds are all empty so weaver is not allowed to connect. Where are admin permissions set? There doesn't seem to be a permissions.cfg file that I can find that specifies admin permissions specifically unless I'm missing something.

Are the tests supposed to be run with the all-public-access optional component by any chance?

@tlvu
Copy link
Collaborator

tlvu commented Mar 3, 2023

* `hummingbird` isn't responding because the magpie permissions from admin users for the wps birds are all empty so weaver is not allowed to connect. Where are admin permissions set? There doesn't seem to be a permissions.cfg file that I can find that specifies admin permissions specifically unless I'm missing something.

Are the tests supposed to be run with the all-public-access optional component by any chance?

I think yes if the pipeline is setup following this procedure: https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/README.rst#optional-prepare-instance-to-run-automated-end-to-end-test-suite

Also need secure-thredds, in addition to all-public-access.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1317/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-88.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/992/

NOTEBOOK TEST RESULTS
    
[2023-03-03T16:39:36.514Z] ============================= test session starts ==============================
[2023-03-03T16:39:36.514Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-03-03T16:39:36.514Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-03-03T16:39:36.514Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-03-03T16:39:36.514Z] collected 268 items
[2023-03-03T16:39:36.514Z] 
[2023-03-03T16:39:44.078Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-03-03T16:39:51.711Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-03-03T16:39:59.021Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  8%]
[2023-03-03T16:40:04.289Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .FFFFFFF       [ 11%]
[2023-03-03T16:40:07.667Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-03-03T17:15:07.401Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 20%]
[2023-03-03T17:15:07.401Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-03-03T17:15:07.401Z] ...............                                                          [ 26%]
[2023-03-03T17:15:16.252Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-03-03T17:15:19.543Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb FFFFFF            [ 30%]
[2023-03-03T17:15:36.261Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-03-03T17:15:37.642Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 32%]
[2023-03-03T17:15:43.530Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 35%]
[2023-03-03T17:15:48.743Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 37%]
[2023-03-03T17:19:16.300Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 42%]
[2023-03-03T17:20:28.067Z] .............                                                            [ 47%]
[2023-03-03T17:20:32.810Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 49%]
[2023-03-03T17:20:35.023Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 52%]
[2023-03-03T17:20:57.488Z] .................                                                        [ 58%]
[2023-03-03T17:21:04.244Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ...FF           [ 60%]
[2023-03-03T17:21:05.636Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-03-03T17:21:14.824Z] .........                                                                [ 64%]
[2023-03-03T17:21:25.876Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 68%]
[2023-03-03T17:21:35.206Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 70%]
[2023-03-03T17:22:06.592Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 79%]
[2023-03-03T17:22:08.506Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-03-03T17:22:14.065Z] ......                                                                   [ 81%]
[2023-03-03T17:23:50.565Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 82%]
[2023-03-03T17:24:25.917Z] .............                                                            [ 86%]
[2023-03-03T17:24:35.910Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-03-03T17:26:31.252Z] ....s.                                                                   [ 89%]
[2023-03-03T17:26:39.440Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-03-03T17:26:43.531Z] ...                                                                      [ 91%]
[2023-03-03T17:26:55.762Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-03-03T17:27:19.750Z] ......                                                                   [ 93%]
[2023-03-03T17:27:22.230Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-03-03T17:30:47.141Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-03-03T17:30:47.141Z] 
[2023-03-03T17:30:47.141Z] =================================== FAILURES ===================================
    
  

@mishaschwartz
Copy link
Collaborator Author

It is okay to rename optional-components to something more descriptive and meaningful. Also okay to move some components from optional-components to components.

That makes sense, but I would like to make those changes in a different PR. I think that this one is complex enough already

@fmigneault
Copy link
Member

fmigneault commented Mar 3, 2023

@mishaschwartz

  • hummingbird isn't responding because the magpie permissions from admin users for the wps birds are all empty so weaver is not allowed to connect. Where are admin permissions set? There doesn't seem to be a permissions.cfg file that I can find that specifies admin permissions specifically unless I'm missing something.

Indeed.
Either https://github.com/bird-house/birdhouse-deploy/tree/master/birdhouse/optional-components/all-public-access must be added to make the WPS public, or credentials must be passed to weaver to allow access using https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/components/weaver/config/weaver/request_options.yml.template

@tlvu

However, please add symlinks back at the old locations so existing env.local from multiples existing deployments are not broken.

I think CRIM automated pipeline are also activating some of those optional-components so having this backward compat will avoid CRIM from having to manage 2 different copies of their env.local, a new one specifically for this PR and existing one for all other PR.

These are the components we enable to run the E2E tests
(some are not necessarily required for the tests themselves, but are applied for debugging if tests fail):

export EXTRA_CONF_DIRS="
    ./components/monitoring
    ./components/weaver
    ./components/cowbird
    ./components/stac
    ./optional-components/canarie-api-full-monitoring
    ./optional-components/all-public-access
    ./optional-components/testthredds
    ./optional-components/secure-thredds
    ./optional-components/secure-data-proxy
    ./optional-components/wps-healthchecks
    ./optional-components/database-external-ports
    ./optional-components/test-weaver
    ./optional-components/test-geoserver-secured-access
"

I would rather avoid creating symlinks. It feels this will only complicate and pollute the structure.
Since it does not matter where components reside, I would prefer to kept them where they are now.
I think my previous mention justifies keeping both components and optional-components as is.

The components are the actual pluggable services, and optional-components are more options that extend those services, such as adding permissions, test data, etc.

@tlvu
Copy link
Collaborator

tlvu commented Mar 5, 2023

It is okay to rename optional-components to something more descriptive and meaningful. Also okay to move some components from optional-components to components.

That makes sense, but I would like to make those changes in a different PR. I think that this one is complex enough already

@mishaschwartz

Totally agree to delay the rename of optional-components/ to another PR. I usually like small PR, this PR is getting huge.

It's okay to not do the rename as well since it's something rather disruptive and we can simply clarify the intend of optional-components/ in the docs.

But I wonder, you've created all the component support files (docker-compose-extra.yml, default.env, ...) for existing items under config/ to make them a "component". So why don't you just put them under components/ instead and delete the config/ folder?

Seeing how disruptive a component path rename can be, I'd rather have them all at their final destination under components/ right away, rather than a rename from config/ to components/ in another PR and then have to leave behind symlinks for backward compat.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1361/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-35.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@tlvu
Copy link
Collaborator

tlvu commented Mar 21, 2023

I still have double

delayed eval 'WPS_FOR_TWITCHER_MONITORING=finchasync'
delayed eval 'WPS_FOR_TWITCHER_MONITORING=finchasync'

I thought you fixed that. But it's not major/blocking, can be fixed in another PR.

@mishaschwartz
Copy link
Collaborator Author

@tlvu

Should this be automatically registered by each enabled bird or user is expected to set this by hand in env.local?

It should be automatically registered by each bird (fixed now). The user can set it in env.local too if they want.

I still have double
...
I thought you fixed that. But it's not major/blocking, can be fixed in another PR.

Turns out I fixed it poorly. Should be properly fixed now

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1362/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-67.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1026/

NOTEBOOK TEST RESULTS
    
[2023-03-21T15:48:00.144Z] ============================= test session starts ==============================
[2023-03-21T15:48:00.144Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-03-21T15:48:00.144Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-03-21T15:48:00.144Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-03-21T15:48:00.144Z] collected 268 items
[2023-03-21T15:48:00.144Z] 
[2023-03-21T15:48:07.839Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-03-21T15:48:16.188Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-03-21T15:48:23.869Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  8%]
[2023-03-21T15:48:29.145Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .FFFFFFF       [ 11%]
[2023-03-21T15:48:31.894Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-03-21T15:56:00.555Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 20%]
[2023-03-21T15:56:01.130Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-03-21T15:56:06.320Z] ...............                                                          [ 26%]
[2023-03-21T15:56:15.460Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-03-21T15:56:18.777Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb FFFFFF            [ 30%]
[2023-03-21T15:56:36.624Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-03-21T15:56:38.007Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 32%]
[2023-03-21T15:56:42.882Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 35%]
[2023-03-21T15:56:48.504Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 37%]
[2023-03-21T16:00:00.009Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 42%]
[2023-03-21T16:01:12.053Z] .............                                                            [ 47%]
[2023-03-21T16:01:16.785Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 49%]
[2023-03-21T16:01:19.108Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 52%]
[2023-03-21T16:01:39.865Z] .................                                                        [ 58%]
[2023-03-21T16:01:45.985Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb .....           [ 60%]
[2023-03-21T16:01:47.371Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-03-21T16:02:03.194Z] .........                                                                [ 64%]
[2023-03-21T16:02:13.994Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 68%]
[2023-03-21T16:02:23.699Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 70%]
[2023-03-21T16:02:53.807Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 79%]
[2023-03-21T16:02:55.193Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-03-21T16:02:59.605Z] ......                                                                   [ 81%]
[2023-03-21T16:03:46.337Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 82%]
[2023-03-21T16:04:09.870Z] .............                                                            [ 86%]
[2023-03-21T16:04:19.867Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-03-21T16:05:18.585Z] ....s.                                                                   [ 89%]
[2023-03-21T16:05:26.725Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-03-21T16:05:31.179Z] ...                                                                      [ 91%]
[2023-03-21T16:05:46.092Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-03-21T16:06:08.477Z] ......                                                                   [ 93%]
[2023-03-21T16:06:11.176Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-03-21T16:09:30.337Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-03-21T16:09:30.337Z] 
[2023-03-21T16:09:30.337Z] =================================== FAILURES ===================================
    
  

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1363/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-166.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1027/

NOTEBOOK TEST RESULTS
    
[2023-03-21T16:38:39.857Z] ============================= test session starts ==============================
[2023-03-21T16:38:39.857Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-03-21T16:38:39.857Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-03-21T16:38:39.857Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-03-21T16:38:39.857Z] collected 268 items
[2023-03-21T16:38:39.857Z] 
[2023-03-21T16:38:48.269Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-03-21T16:38:56.333Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-03-21T16:39:03.909Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  8%]
[2023-03-21T16:39:08.771Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .FFFFFFF       [ 11%]
[2023-03-21T16:39:11.946Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-03-21T16:46:39.384Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 20%]
[2023-03-21T16:46:39.384Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-03-21T16:46:39.384Z] ...............                                                          [ 26%]
[2023-03-21T16:46:50.704Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-03-21T16:46:54.532Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb FFFFFF            [ 30%]
[2023-03-21T16:47:11.862Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-03-21T16:47:13.256Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 32%]
[2023-03-21T16:47:18.260Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 35%]
[2023-03-21T16:47:24.135Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 37%]
[2023-03-21T16:51:05.461Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 42%]
[2023-03-21T16:52:12.857Z] .............                                                            [ 47%]
[2023-03-21T16:52:15.962Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 49%]
[2023-03-21T16:52:18.172Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 52%]
[2023-03-21T16:52:39.381Z] .................                                                        [ 58%]
[2023-03-21T16:52:46.319Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb .....           [ 60%]
[2023-03-21T16:52:48.226Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-03-21T16:53:04.572Z] .........                                                                [ 64%]
[2023-03-21T16:53:16.399Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 68%]
[2023-03-21T16:53:26.104Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 70%]
[2023-03-21T16:53:57.162Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 79%]
[2023-03-21T16:53:58.555Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-03-21T16:54:02.690Z] ......                                                                   [ 81%]
[2023-03-21T16:54:49.393Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 82%]
[2023-03-21T16:55:10.790Z] .............                                                            [ 86%]
[2023-03-21T16:55:20.795Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-03-21T16:56:17.061Z] ....s.                                                                   [ 89%]
[2023-03-21T16:56:25.217Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-03-21T16:56:29.445Z] ...                                                                      [ 91%]
[2023-03-21T16:56:44.380Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-03-21T16:57:07.358Z] ......                                                                   [ 93%]
[2023-03-21T16:57:10.100Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-03-21T17:00:44.318Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-03-21T17:00:44.318Z] 
[2023-03-21T17:00:44.318Z] =================================== FAILURES ===================================
    
  

@tlvu
Copy link
Collaborator

tlvu commented Mar 21, 2023

Jenkins finally works on my machine, not sure what happened, I just keep pulling your newer changes. I previously had Thredds, Finch, Humming misbehaving.

Going to finally be able to test autodeploy now.


services:
malleefowl:
generic_bird:
Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch !

ALREADY_EVALED=''
for i in ${DELAYED_EVAL}; do
if echo "ALREADY_EVALED" | grep -qE "^\s*$i\s*$"; then
if echo "$ALREADY_EVALED" | grep -qE "^\s*$i\s*$"; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

LOL, I made this same kind of mistake often too :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm a little embarrassed by that one 😞

PROXY_SECURE_PORT=443 HOSTNAME=${PAVICS_FQDN} docker-compose ${COMPOSE_CONF_LIST} restart proxy

# run postgres post-startup setup script
# Note: this must run before the post-docker-compose-up scripts since some may expect postgres databases to exist
Copy link
Collaborator

Choose a reason for hiding this comment

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

We still have an exception here humm. Maybe if this scenario come back often, we can have post-docker-compose-up-preparation plugin entrypoint for this kind of scenario.

Copy link
Collaborator

@tlvu tlvu left a comment

Choose a reason for hiding this comment

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

A few more reviews while waiting for autodeploy to trigger :)

$WEAVER_WPS_WORKDIR
$WEAVER_MANAGER_LOG_LEVEL
$WEAVER_WORKER_LOG_LEVEL
$WEAVER_WPS_PROVIDERS
Copy link
Collaborator

Choose a reason for hiding this comment

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

I forgot the reason why WEAVER_WPS_PROVIDERS is not needed in EXTRA_VARS anymore.

Each bird can add itself but that does not means WEAVER_WPS_PROVIDERS is not needed to be in EXTRA_VARS anymore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not actually used in any of the template files. Instead it is used in the post-docker-compose-up script which runs in the same environment as pavics-compose.sh so this environment variable is already present (if set by a bird or env.local).

If it isn't set (when there are no birds in the stack for example) then the post-docker-compose-up script just skips the step where it registers the wps providers for weaver.

'stats': {
'method': '.*',
'route': '/(magpie|geoserver|thredds|wpsoutputs|jupyter)/.*'
'route': '(?!)'
Copy link
Collaborator

Choose a reason for hiding this comment

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

To help the next reader, add a comment # will be the value of CANARIE_STATS_ROUTES

'stats': {
'method': '.*',
'route': '/project-api/.*'
'route': '(?!)'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe just revert it to the original value, since we could keep old components but simply not enable them by default. Just document in the components/README.rst they are legacy components, not maintained anymore.

- ./config/flyingpigeon/wps.cfg:/wps.cfg
- /tmp
depends_on:
- postgres
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should technically be in a postgres fragment but since ./config/postgres is specified in COMPONENT_DEPENDENCIES, I think we can keep this here. Not going to create a compose fragment file just for 2 lines.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is odd, I wonder why this duplicate logic for creating database !

Is it possible postgres-setup.sh only execute on empty DB startup? Or vice-versa? And this duplicate logic is to ensure when DB already running and we add a new bird, its DB is also created? I gotta hunt down for that PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Found that PR https://github.com/Ouranosinc/PAVICS/pull/173. I think we can drop this create-wps-databases.sql as it is only for when the DB is completely empty. postgres-setup.sh can handle incremental addition of new birds.

# Useful to have a custom homepage.
export PROXY_ROOT_LOCATION="return 302 https://\$host/jupyter/hub/login;"

export INCLUDE_FOR_PORT_80='$([ x"$ALLOW_UNSECURE_HTTP" = x"True" ] && echo "include /etc/nginx/conf.d/all-services.include;" || echo "include /etc/nginx/conf.d/redirect-to-https.include;")'
Copy link
Collaborator

Choose a reason for hiding this comment

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

So you like this delayed eval feature? :D

Had delayed eval not exist, probably pre-docker-compose-up might be able to do this.

COMPONENT_DEPENDENCIES="
$COMPONENT_DEPENDENCIES
./config/canarie-api
./config/twitcher
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo from previous edit? I do not think proxy needs twitcher. Both of them can function independently but they are just nicer together. It's not the same level of coupling like between twitcher and magpie.

Copy link
Collaborator

Choose a reason for hiding this comment

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

BLOCKING


docker exec -t postgres psql --username postgres -f /docker-entrypoint-initdb.d/create-wps-databases.sql

docker exec -t postgres /postgres-setup.sh
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, unified both ways to initializes the various DB.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is really odd, this config/postgres-magpie/.gitignore file is deleted, the old files are there but git status do not report them unknown !

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added an entry for postgres-magpie in birdhouse/config/.gitignore

Copy link
Collaborator

@tlvu tlvu left a comment

Choose a reason for hiding this comment

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

@mishaschwartz I am done with my Autodeploy test. All good.

I've documented what I wanted to test and all the results directly in the PR description so we can easily refer back later if some further investigations needed.

I have not tried to pick and choose yet but even if I find something that's not blocking this one. We can fix later.

Even my new comments, none of them blocking except the one about Proxy depending on Twitcher which I find quite strange, hopefully just a typo left. All the rest can be fixed later.

This PR, although 100% back-compat, deserves a minor bump (make bump minor) before merge, since the structure is drastically changed.

Again thanks a tons for your immense effort in making this much more modular. I think all the orgs deploying this stack will greatly benefit from this change.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 22, 2023
@mishaschwartz
Copy link
Collaborator Author

@tlvu Thanks for the long review and especially catching all my mistakes! I've made the changes you suggested and bumped the version to 1.24. As soon as the tests are finished running it should be good to go.

Since this is my first PR for this project.. what is the procedure for merging PRs? Do you want to do it or should I? Should I make a new tag for version 1.24 once it's merged?

@tlvu
Copy link
Collaborator

tlvu commented Mar 22, 2023

what is the procedure for merging PRs? Do you want to do it or should I? Should I make a new tag for version 1.24 once it's merged?

@mishaschwartz

Release instruction here https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/README.rst#release-procedure

You are at the step "ready to merge the PR immediately".

You don't have to wait for the tests to finish, unless you suspect your last minute code change might break something.

If you wanted to wait, you should have not done the make bump command and do it right before merge only. This is to avoid merge race with another person (none at this moment but this could happen).

Let me know if the procedure is clear enough. Else I can do the merge for you if you prefer.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1365/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : pluggable-components-part-2
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-67.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1029/

NOTEBOOK TEST RESULTS
    
[2023-03-22T13:57:59.905Z] ============================= test session starts ==============================
[2023-03-22T13:57:59.905Z] platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
[2023-03-22T13:57:59.905Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-03-22T13:57:59.905Z] plugins: anyio-3.6.2, dash-2.7.0, nbval-0.9.6, tornasync-0.6.0.post2
[2023-03-22T13:57:59.905Z] collected 268 items
[2023-03-22T13:57:59.905Z] 
[2023-03-22T13:58:08.612Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-03-22T13:58:16.652Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  6%]
[2023-03-22T13:58:23.630Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [  8%]
[2023-03-22T13:58:32.726Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .F......       [ 11%]
[2023-03-22T13:58:35.490Z] pavics-sdi-master/docs/source/notebooks/WPS_example.ipynb ..........     [ 15%]
[2023-03-22T14:06:18.869Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 20%]
[2023-03-22T14:06:18.869Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 20%]
[2023-03-22T14:06:18.869Z] ...............                                                          [ 26%]
[2023-03-22T14:06:25.635Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-03-22T14:06:29.210Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb FFFFFF            [ 30%]
[2023-03-22T14:06:46.058Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-03-22T14:06:47.444Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 32%]
[2023-03-22T14:06:52.457Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 35%]
[2023-03-22T14:06:58.318Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 37%]
[2023-03-22T14:11:12.813Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 42%]
[2023-03-22T14:12:25.155Z] .............                                                            [ 47%]
[2023-03-22T14:12:30.241Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 49%]
[2023-03-22T14:12:32.478Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 52%]
[2023-03-22T14:12:52.905Z] .................                                                        [ 58%]
[2023-03-22T14:12:59.861Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb .....           [ 60%]
[2023-03-22T14:13:01.245Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 60%]
[2023-03-22T14:13:11.223Z] .........                                                                [ 64%]
[2023-03-22T14:13:23.005Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 68%]
[2023-03-22T14:13:32.721Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 70%]
[2023-03-22T14:14:03.444Z] finch-master/docs/source/notebooks/subset.ipynb ....................ss.  [ 79%]
[2023-03-22T14:14:04.827Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 79%]
[2023-03-22T14:14:09.303Z] ......                                                                   [ 81%]
[2023-03-22T14:15:17.045Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 82%]
[2023-03-22T14:15:42.932Z] .............                                                            [ 86%]
[2023-03-22T14:15:52.937Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 87%]
[2023-03-22T14:17:08.527Z] ....s.                                                                   [ 89%]
[2023-03-22T14:17:16.671Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 89%]
[2023-03-22T14:17:21.117Z] ...                                                                      [ 91%]
[2023-03-22T14:17:36.024Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 91%]
[2023-03-22T14:17:58.657Z] ......                                                                   [ 93%]
[2023-03-22T14:18:00.885Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2023-03-22T14:21:25.475Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-03-22T14:21:25.475Z] 
[2023-03-22T14:21:25.475Z] =================================== FAILURES ===================================
    
  

@mishaschwartz mishaschwartz merged commit 37fe32e into master Mar 22, 2023
@mishaschwartz mishaschwartz deleted the pluggable-components-part-2 branch March 22, 2023 14:46
@tlvu
Copy link
Collaborator

tlvu commented Mar 22, 2023

@mishaschwartz Congrats ! Making the grand entrance with a gigantic PR as your first PR ! :D

@tlvu
Copy link
Collaborator

tlvu commented Mar 23, 2023

Went live on Ouranos production at 2023-03-23 10h.

List of re-created containers:

Recreating postgres        ... done
Recreating postgres-magpie ... done
Recreating testthredds     ... done
Recreating magpie          ... done
Recreating project-api     ... done
Recreating jupyterhub      ... done
Recreating twitcher        ... done
Recreating proxy           ... done
Recreating phoenix         ... done

The rest unchanged.

[1.24.0](https://github.com/bird-house/birdhouse-deploy/tree/1.24.0) (2023-03-22)
------------------------------------------------------------------------------------------------------------------
## Fixes
- The default stack was not configurable. This meant that if someone wanted to deploy a
Copy link
Collaborator

Choose a reason for hiding this comment

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

@mishaschwartz Note for next PR, repeat the title of the PR in CHANGES.md for a one-line summary of the change.

@tlvu
Copy link
Collaborator

tlvu commented Mar 23, 2023

Jenkins run after go-live on Ouranos prod: only known error
Ouranos-prod-after-go-live-PAVICS-e2e-workflow-tests-current-production-version-116-consoleText.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/operations Continuous Integration components documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate existing pieces to new pluggable component architecture, part 2 the simple pieces

6 participants