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

Update DEFAULT_CONF_DIRS to the minimal components required to deploy the stack #399

Merged
merged 24 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b5bc400
move all components to the components/ directory
mishaschwartz Nov 7, 2023
357da73
fix gitignore entry that shouldn't be there
mishaschwartz Nov 7, 2023
a699efb
update default and extra conf dirs
mishaschwartz Nov 7, 2023
66ee207
suppress postgres warning if not running
mishaschwartz Nov 7, 2023
35a8da3
change default root location
mishaschwartz Nov 7, 2023
7a2a627
update tests
mishaschwartz Nov 8, 2023
1c02991
update changes
mishaschwartz Nov 8, 2023
914f2ea
fix path for example component references
mishaschwartz Nov 8, 2023
6517fd3
allow jupyterhub landing page to be default when jupyterhub is enabled
mishaschwartz Nov 8, 2023
8a66b2e
review suggestion updates
mishaschwartz Nov 9, 2023
95aa509
Merge branch 'master' into minimal-components
mishaschwartz Nov 29, 2023
efd7e4c
remove old comment about mongodb for cowbird
mishaschwartz Nov 29, 2023
f47480e
update moved components with recent updates to master
mishaschwartz Dec 7, 2023
9100600
Add warning about the magpie login page as a homepage
mishaschwartz Dec 7, 2023
a1a1d05
remove geoserver's magpie providers file from gitignore (shouldn't ha…
mishaschwartz Dec 7, 2023
e424083
add warning to proxy/default.env too
mishaschwartz Dec 7, 2023
227a028
update tests
mishaschwartz Dec 7, 2023
39e7a6c
Merge branch 'master' into minimal-components
mishaschwartz Dec 7, 2023
adbd1f5
update tests
mishaschwartz Dec 7, 2023
1e32bcf
Merge branch 'master' into minimal-components
mishaschwartz Dec 8, 2023
5ea5106
add simple component descriptions (to be fleshed out later)
mishaschwartz Dec 8, 2023
a7f1b81
fix reference to geoserver endpoint
mishaschwartz Dec 8, 2023
9ff694a
more comment updates
mishaschwartz Dec 11, 2023
48e6f21
Bump version: 1.42.2 → 2.0.0
mishaschwartz Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.42.2
current_version = 2.0.0
commit = True
tag = False
tag_name = {new_version}
Expand Down Expand Up @@ -30,17 +30,17 @@ search = {current_version}
replace = {new_version}

[bumpversion:file:RELEASE.txt]
search = {current_version} 2023-12-08T18:02:01Z
search = {current_version} 2023-12-11T14:46:41Z
replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ}

[bumpversion:part:releaseTime]
values = 2023-12-08T18:02:01Z
values = 2023-12-11T14:46:41Z

[bumpversion:file(version):birdhouse/config/canarie-api/docker_configuration.py.template]
[bumpversion:file(version):birdhouse/components/canarie-api/docker_configuration.py.template]
search = 'version': '{current_version}'
replace = 'version': '{new_version}'

[bumpversion:file(releaseTime):birdhouse/config/canarie-api/docker_configuration.py.template]
[bumpversion:file(releaseTime):birdhouse/components/canarie-api/docker_configuration.py.template]
parse = 'releaseTime': '(?P<releaseTime>.*)'
serialize = {releaseTime}
replace = {utcnow:%Y-%m-%dT%H:%M:%SZ}
Expand Down
23 changes: 23 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@

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

[2.0.0](https://github.com/bird-house/birdhouse-deploy/tree/2.0.0) (2023-12-11)
------------------------------------------------------------------------------------------------------------------

## Changes

- Update `DEFAULT_CONF_DIRS` to the minimal components required to deploy the stack

Changes `DEFAULT_CONF_DIRS` to refer exclusively to the proxy, magpie, twitcher, stac, and cowbird components.
Also moves all components that were previously under the `birdhouse/config` directory to the `birdhouse/components`
directory. This removes the arbitrary distinction between these groups of components that didn't have any functional
or logical reason.

Because this change updates the default components, this is not backwards compatible unless the following changes are
made to the local environment file (`birdhouse/env.local` by default):

- add any components no longer in the `DEFAULT_CONF_DIRS` list to the `EXTRA_CONF_DIRS` list.
For example, to keep the jupyterhub component enabled, add `./components/jupyterhub` to the `EXTRA_CONF_DIRS` list.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that ./components/jupyterhub is not enabled by default anymore, but ./components/stac is, it might be worth mentioning that adding PROXY_ROOT_LOCATION explicitly could be required depending on which components are enabled, and which one the node manager desires to put as default redirect (if any).


- update the `PROXY_ROOT_LOCATION` to redirect the root path `/` to an enabled component. By default, this will
redirect to Magpie's landing page, unless jupyterhub is enabled, in which case it will redirect to jupyterhub's
landing page.
If any other behaviour is desired, `PROXY_ROOT_LOCATION` should be updated in the `env.local` file.

[1.42.2](https://github.com/bird-house/birdhouse-deploy/tree/1.42.2) (2023-12-08)
------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generic variables
override SHELL := bash
override APP_NAME := birdhouse-deploy
override APP_VERSION := 1.42.2
override APP_VERSION := 2.0.0

# utility to remove comments after value of an option variable
override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g")
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.42.2.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.0.0.svg
:alt: Commits since latest release
:target: https://github.com/bird-house/birdhouse-deploy/compare/1.42.2...master
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.0.0...master

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

.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
:alt: ReadTheDocs Build Status (latest version)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.42.2 2023-12-08T18:02:01Z
2.0.0 2023-12-11T14:46:41Z
1 change: 1 addition & 0 deletions birdhouse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./config
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are purposely moving components, should we consider leaving this un-ignored?
Could help detect an invalid definition that refers to the old path.

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 think we have to ignore it so that the autoupdate code works. Right @tlvu ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since it would be a major update that could remove components if misconfigured, I guess it that it would feel safer to purposely break the autoupdate to have node admins make sure they set up their EXTRA_CONF_DIRS properly and clean up leftover configs if applicable before updating. However, if others don't feel this could be an issue, I'm fine with having the gitignore also. I'm not personally using autoupdate.

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 not either so let's let @tlvu decide this one

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather prefer not breaking the autodeploy. We had already the plan to do this: add the new paths in advance to env.local so it is already forward compatible when this PR merge so no manual interventions required.

However I would also ping PCIC in this PR so they are aware of this major change.

4 changes: 2 additions & 2 deletions birdhouse/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Note
----

* All WPS requests should be completed within ``proxy_read_timeout`` of the
Nginx proxy, see `nginx.conf`_ (:download:`download <birdhouse/config/proxy/nginx.conf>`).
Nginx proxy, see `nginx.conf`_ (:download:`download <birdhouse/components/proxy/nginx.conf>`).
Any WPS requests that will take longer should use the async mode.

Default value ``PROXY_READ_TIMEOUT_VALUE`` in `default.env`_ (:download:`download <birdhouse/default.env>`).
Expand Down Expand Up @@ -378,7 +378,7 @@ Release Procedure
* Run ``git push --tags`` to upload the new version.


.. _nginx.conf: ./config/proxy/nginx.conf
.. _nginx.conf: ./components/proxy/nginx.conf
.. _default.env: ./default.env
.. _`.bumpversion.cfg`: ../.bumpversion.cfg
.. _CHANGES.md: ../CHANGES.md
264 changes: 263 additions & 1 deletion birdhouse/components/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,266 @@ How to Enable the Component
---------------------------

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./optional-components/stac`` to ``EXTRA_CONF_DIRS``.
- Add ``./components/stac`` to ``EXTRA_CONF_DIRS``.

Canarie-API
===========

An endpoint monitoring tool that shows the current status of other components in the software stack.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}/canarie``

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/canarie`` to ``EXTRA_CONF_DIRS``.

data-volume
===========

Creates a named volume in docker that is shared between WPS and OGCAPI components. This volume will contain data shared
and used by these services.

Usage
-----

This component is transparent to the end-user as its role is to share data between other components in the stack.

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

- Do not enable this component directly. It will be enabled as a dependency of other components

Finch
=====
Users of climate data are interested in specific indices such as the number of freeze-thaw cycles, the number of
degree-days of cooling, the duration of heatwaves, etc. This returns annual values of the most popular climate indices.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch``

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/finch`` to ``EXTRA_CONF_DIRS``.

Geoserver
=========

GeoServer is the reference implementation of the Open Geospatial Consortium (OGC) Web Feature Service (WFS) and Web
Coverage Service (WCS) standards, as well as a high performance certified compliant Web Map Service (WMS), compliant
Catalog Service for the Web (CSW) and implementing Web Processing Service (WPS). GeoServer forms a core component of the
Geospatial Web.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}/geoserver``. For usage and
configuration options please refer to the `Geoserver documentation`_.

.. _Geoserver documentation: https://docs.geoserver.org

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/geoserver`` to ``EXTRA_CONF_DIRS``.

Hummingbird
===========

A Web Processing Service for compliance checks used in the climate science community.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/hummingbird``

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/hummingbird`` to ``EXTRA_CONF_DIRS``.

Jupyterhub
==========

Portal used to launch and manage jupyterlab servers for users. This provides a managed development environment for
end-users.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}/jupyter``. Users are able to log in to Jupyterhub using the
same user name and password as Magpie. They will then be able to launch a personal jupyterlab server.

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/jupyterhub`` to ``EXTRA_CONF_DIRS``.
- Set the ``JUPYTERHUB_CRYPT_KEY`` environment variable

Magpie
======

Magpie is service for AuthN/AuthZ accessible via a REST API. It allows you to manage
User/Group/Service/Resource/Permission management and integrates with Twitcher.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}/magpie``. For usage and configuration options please
refer to the `Magpie documentation`_.

.. _Magpie documentation: https://pavics-magpie.readthedocs.io

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

- This component is enabled by default as it is required to securely run the stack

mongodb
=======

A NoSQL database used by various other components in the stack as a database backend.

Usage
-----

This component is directly visible to the end-user. It is used by other components in the stack.

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

- Do not enable this component directly. It will be enabled as a dependency of other components.

portainer
=========

A web based container deployment and management tool.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}/portainer/``. For usage and configuration options please
refer to the `portainer documentation`_.

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/portainer`` to ``EXTRA_CONF_DIRS``.

.. _portainer documentation: https://docs.portainer.io/


postgres
========

A relational database used by various other components in the stack as a database backend.

Usage
-----

This component is directly visible to the end-user. It is used by other components in the stack.

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

- Do not enable this component directly. It will be enabled as a dependency of other components

Proxy
=====

An nginx reverse proxy that serves all other components in the stack through a single proxy endpoint.

Usage
-----

This component is transparent to the end-user as its role is to serve data from other components in the software stack.

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

- This component is enabled by default

Raven
=====

A suite of WPS processes to calibrate and run hydrological models, including geographical information retrieval and
processing as well as time series analysis.

Usage
-----

The service is available at ``https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/raven``

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/raven`` to ``EXTRA_CONF_DIRS``.

Thredds
=======

Climate Data Catalog and Format Renderers. See the `Thredds documentation`_ for details.

.. _Thredds documentation: https://www.unidata.ucar.edu/software/tds/

Usage
-----

The catalog is available at the ``https://${PAVICS_FQDN_PUBLIC}/thredds`` endpoint.

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

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``./components/thredds`` to ``EXTRA_CONF_DIRS``.

Twitcher
========

Twitcher is a security proxy that provides secure access to other components in the stack. The proxy service uses OAuth2
access tokens to protect the OWS service access using Magpie permissions.

Usage
-----

Twitcher should always be used in conjunction with Magpie and should work already without any additional configuration.
For details please refer to the `twitcher documentation`_.

.. _twitcher documentation: https://twitcher.readthedocs.io/en/latest/

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

- This component is enabled by default as it is required to securely run the stack

wps_outputs-volume
==================

Creates a named volume in docker that is shared between WPS and OGCAPI components. This volume will contain the outputs
of all processes executed by these services.

Usage
-----

All outputs from these processes will become available at the ``https://${PAVICS_FQDN_PUBLIC}/wpsoutputs`` endpoint.

By default, this endpoint is not protected. To secure access to this endpoint it is highly recommended to enable the
`./optional-components/secure-data-proxy` component as well.

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

- Do not enable this component directly. It will be enabled as a dependency of other components
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.4"
services:
proxy:
volumes:
- ./components/canarie-api/config/proxy/conf.extra-service.d:/etc/nginx/conf.extra-service.d/canarie-api:ro
- ./components/canarie-api/docker_configuration.py:/config/docker_configuration.py
- ./components/canarie-api/entrypoint:/entrypoint:ro
environment:
CANARIE_API_CONFIG_FN: /config/docker_configuration.py
CANARIE_MONITORING_EXTRA_CONF_DIR: ${CANARIE_MONITORING_EXTRA_CONF_DIR}
entrypoint: /entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export PROXY_IMAGE="pavics/canarieapi:0.7.1"

# add any component that this component requires to run
COMPONENT_DEPENDENCIES="
./config/proxy
./components/proxy
"
Loading
Loading