Skip to content

Commit d6d02ca

Browse files
committed
Fix rs-server/resources/sync_config_files.py,
1 parent 1751055 commit d6d02ca

File tree

7 files changed

+701
-264
lines changed

7 files changed

+701
-264
lines changed

resources/sync_config_files.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,9 @@ def update_single_value(input_value: Any, output_value: str) -> str:
669669
"services/cadip/config/cadip_ws_config.template.yaml",
670670
"services/cadip/config/cadip_ws_config.template_session.yaml",
671671
],
672+
["services/prip/config/prip_search_config.template.yaml"],
673+
["services/prip/config/prip_ws_config_token_module.template.yaml"],
674+
["services/prip/config/prip_ws_config.template.yaml"],
672675
):
673676
create_from_template(templates)
674677

@@ -677,8 +680,10 @@ def update_single_value(input_value: Any, output_value: str) -> str:
677680
"services/common/config/rs-server.yaml",
678681
"services/adgs/config/adgs_ws_config.yaml",
679682
"services/cadip/config/cadip_ws_config.yaml",
683+
"services/prip/config/prip_ws_config.yaml",
680684
"services/adgs/config/adgs_ws_config_token_module.yaml",
681685
"services/cadip/config/cadip_ws_config_token_module.yaml",
686+
"services/prip/config/prip_ws_config_token_module.yaml",
682687
):
683688
copy_to_demo(config_path_relative)
684689

@@ -701,7 +706,6 @@ def remove_session_stations(output_config: dict):
701706
remove_session_stations,
702707
)
703708
copy_to_helm_or_infra([station_params], rs_helm_dir / "charts/rs-server-station-secrets/values.yaml")
704-
copy_to_helm_or_infra([station_params], rs_deploy_dir / "apps/01-rs-server-station-secrets/values.yaml")
705709

706710
copy_to_helm_or_infra(
707711
[
@@ -792,3 +796,37 @@ def remove_session_stations(output_config: dict):
792796
],
793797
rs_helm_dir / "charts/rs-server-cadip/templates/configmap.yaml",
794798
)
799+
800+
copy_to_helm_or_infra(
801+
[
802+
HelmOrInfraParams(
803+
"services/prip/config/prip_ws_config.yaml",
804+
["s1a"], # use the first input station values for all other stations
805+
[ # where to write in the output file
806+
"data",
807+
f"{DCB_OPEN} .Values.app.eodagConfigFile {DCB_CLOSE}",
808+
f"{DCB_OPEN}- range $k, $v := .Values.app.station {DCB_CLOSE}",
809+
f"{DCB_OPEN} $k {DCB_CLOSE}",
810+
],
811+
0, # output doc index
812+
),
813+
HelmOrInfraParams(
814+
"services/prip/config/prip_ws_config_token_module.yaml",
815+
["s1a"], # use the first input station values for all other stations
816+
[ # where to write in the output file
817+
"data",
818+
f"{DCB_OPEN} .Values.app.eodagConfigFileTokenModule {DCB_CLOSE}",
819+
f"{DCB_OPEN}- range $k, $v := .Values.app.station {DCB_CLOSE}",
820+
f"{DCB_OPEN} $k {DCB_CLOSE}",
821+
],
822+
1,
823+
),
824+
HelmOrInfraParams(
825+
"services/prip/config/prip_search_config.yaml",
826+
[],
827+
["data", f"{DCB_OPEN} .Values.app.pripSearchConfigFile {DCB_CLOSE}"],
828+
2,
829+
),
830+
],
831+
rs_helm_dir / "charts/rs-server-prip/templates/configmap.yaml",
832+
)

services/prip/config/prip_search_config.template.yaml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,77 +16,76 @@ template:
1616
id:
1717
station:
1818
query:
19-
stac_extensions:
20-
[
21-
]
19+
productType:
20+
stac_extensions: [ "https://stac-extensions.github.io/eo/v2.0.0/schema.json", "https://stac-extensions.github.io/projection/v2.0.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/sar/v1.3.0/schema.json", "https://stac-extensions.github.io/sat/v1.1.0/schema.json", "https://stac-extensions.github.io/processing/v1.2.0/schema.json", "https://stac-extensions.github.io/product/v1.0.0/schema.json", "https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json", "https://stac-extensions.github.io/timestamps/v1.1.0/schema.json" ]
2221
title:
2322
description:
2423
license: other
2524
extent:
2625
spatial:
27-
bbox: [[-180, -82.85, 180, 82.82]]
26+
bbox: [[ -180, -82.85, 180, 82.82 ]]
2827
temporal:
29-
interval: [["2024-06-12T02:57:21.459000Z", "2024-08-22T11:30:12.767000Z"]]
28+
interval: [[ '2024-06-12T02:57:21.459000Z', '2024-08-22T11:30:12.767000Z' ]]
3029
links:
3130
- rel: license
32-
href: "https://sentinels.copernicus.eu/documents/247904/690755/Sentinel_Data_Legal_Notice"
33-
title: "Legal notice on the use of Copernicus Sentinel Data and Service Information"
34-
type: "application/pdf"
31+
href: 'https://sentinels.copernicus.eu/documents/247904/690755/Sentinel_Data_Legal_Notice'
32+
title: 'Legal notice on the use of Copernicus Sentinel Data and Service Information'
33+
type: 'application/pdf'
3534
- rel: describedby
36-
href: "https://sentiwiki.copernicus.eu/web/copernicus-operations#CopernicusOperations-SystematicProduction"
37-
title: "Production Service"
38-
type: "text/html"
35+
href: 'https://sentiwiki.copernicus.eu/web/copernicus-operations#CopernicusOperations-SystematicProduction'
36+
title: 'Production Service'
37+
type: 'text/html'
3938
providers:
40-
- name: "European Union/ESA/Copernicus"
39+
- name: 'European Union/ESA/Copernicus'
4140
roles:
4241
- producer
4342
- licensor
44-
url: "https://sentiwiki.copernicus.eu/web/s1-mission"
45-
- name: "Reference System"
43+
url: 'https://sentiwiki.copernicus.eu/web/s1-mission'
44+
- name: 'Reference System'
4645
roles:
4746
- host
48-
url: "https://home.rs-python.eu/"
47+
url: 'https://home.rs-python.eu/'
4948

5049
collections:
5150

5251
# All stations deployed in the CS cluster, without queries
5352

54-
- id: s1a
55-
station: s1a
56-
title: "All from 's1a' station"
57-
description: "All from 's1a' station"
53+
# - id: s1a
54+
# station: s1a
55+
# title: "All from 's1a' station"
56+
# description: "All from 's1a' station"
5857

59-
- id: s2b
60-
station: s2b
61-
title: "All from 's2b' station"
62-
description: "All from 's2b' station"
58+
# - id: s2b
59+
# station: s2b
60+
# title: "All from 's2b' station"
61+
# description: "All from 's2b' station"
6362

6463
# Idem with one collection per product type
6564

6665
- id: S1A_L0_IW_RAW
6766
station: s1a
6867
query:
6968
productType: IW_RAW__0N
70-
title: "s1a 'prip' station"
71-
description: "s1a 'prip' station"
69+
title: "S1A L0 RAW products"
70+
description: "S1A L0 RAW products"
7271

7372
- id: S2B_L0_DS
7473
station: s2b
7574
query:
7675
productType: OPER_MSI
77-
title: "s2b 'prip' station"
78-
description: "s2b 'prip' station"
76+
title: "L0 datastrips"
77+
description: "Sentinel-2B Level-0 Datastrip"
7978

8079
- id: S2B_L0_GR
8180
station: s2b
8281
query:
8382
productType: OPER_MSI_L0
84-
title: "S2B_L0_GR 'prip' station"
85-
description: "S2B_L0_GR 'prip' station"
83+
title: "L0 granules"
84+
description: "Sentinel-2B Level-0 Granule"
8685

8786
- id: S2B_L2A_TL
8887
station: s2b
8988
query:
9089
productType: OPER_MSI_L2A
91-
title: "S2B_L2A_TL 'prip' station"
92-
description: "S2B_L2A_TL 'prip' station"
90+
title: "L2A tile products"
91+
description: "Sentinel-2B Level-2A Tile"

0 commit comments

Comments
 (0)