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

move STAC service Magpie definition under its component #383

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
18 changes: 17 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,23 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
------------------------------------------------------------------------------------------------------------------

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

- Move initial ``stac`` service Magpie definition under its component configuration.
- Before this change, ``optional-components/stac-public-access`` was mandatory since the ``stac`` service under
Magpie was not created otherwise, leading to "*service not found*" error when requesting the ``/stac`` endpoint.
- Ensure that the first ``stac`` resource under ``stac`` service in Magpie is created by default.
Without this resource being defined initially, it is very easy to forget creating it, which would not take into
account the required ``/stac/stac`` request path to properly resolve the real endpoints where STAC API is served.

- Remove `optional-components/stac-public-access` dependency under `optional-components/all-public-access`
to avoid indirectly enforcing `components/stac` when `optional-components/all-public-access` is enabled.
Users that desire using `optional-components/stac-public-access` will have to add it explicitly to the list
of `EXTRA_CONF_DIRS`.

- Rename `optional-components/stac-public-access/config/magpie/config.yml.template` to
`optional-components/stac-public-access/config/magpie/permissions.yml.template` in order to align
with permissions-specific contents as accomplished with other components.

[1.31.2](https://github.com/bird-house/birdhouse-deploy/tree/1.31.2) (2023-09-13)
------------------------------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions birdhouse/components/stac/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
config/magpie/config.yml
config/proxy/conf.extra-service.d/stac.conf
config/canarie-api/canarie_api_monitoring.py
19 changes: 19 additions & 0 deletions birdhouse/components/stac/config/magpie/config.yml.template
fmigneault marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
providers:
# definition of STAC service for API access
stac:
url: http://stac:8000
title: STAC
public: true
c4i: false
type: api
sync_type: api

permissions:
# create a default 'stac' resource under 'stac' service
# because of the '/stac/stac' path prefix required to resolve the API links properly,
# all permissions must be nested under this 'stac' resource for requests and permissions to be resolved accordingly
- service: stac
resource: /stac
permission: read
group: administrator # they already have access, just using admins to create the resource by default
action: create
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
magpie:
volumes:
- ./components/stac/config/magpie/config.yml:${MAGPIE_PROVIDERS_CONFIG_PATH}/stac.yml:ro
- ./components/stac/config/magpie/config.yml:${MAGPIE_PERMISSIONS_CONFIG_PATH}/stac.yml:ro
5 changes: 5 additions & 0 deletions birdhouse/optional-components/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ How to enable in ``env.local`` (a copy from `env.local.example`_ (:download:`dow
The anonymous user will now have all the permissions described in |magpie-public-perms|_
(:download:`download </birdhouse/optional-components/all-public-access/all-public-access-magpie-permission.cfg>`).

.. note::
If using the ``./components/stac`` feature, the corresponding ``./optional-components/stac-public-access``
must be applied as well to obtain similar functionalities to ``./optional-components/all-public-access``.
This optional component is kept separate since ``./components/stac`` is not required by default, and therefore
cannot be enforced as a component dependency.

.. _magpie-public-perms: ./all-public-access/all-public-access-magpie-permission.cfg
.. |magpie-public-perms| replace:: optional-components/all-public-access/all-public-access-magpie-permission.cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
# add any component that this component requires to run
COMPONENT_DEPENDENCIES="
./config/magpie
./optional-components/stac-public-access
"
2 changes: 2 additions & 0 deletions birdhouse/optional-components/stac-public-access/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
config/magpie/permissions.cfg
# old name for backward compatibility:
config/magpie/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ version: "3.4"
services:
magpie:
volumes:
- ./optional-components/stac-public-access/config/magpie/config.yml:${MAGPIE_PERMISSIONS_CONFIG_PATH}/stac-public-access.yml:ro
- ./optional-components/stac-public-access/config/magpie/config.yml:${MAGPIE_PROVIDERS_CONFIG_PATH}/stac-public-access.yml:ro
- ./optional-components/stac-public-access/config/magpie/permissions.cfg:${MAGPIE_PERMISSIONS_CONFIG_PATH}/stac-public-access-permissions.cfg:ro
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
providers:
# definition of STAC service for API access
stac:
url: http://stac:8000
title: STAC
public: true
c4i: false
type: api
sync_type: api

permissions:
- service: stac
permission: read
Expand Down