Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion local-mode/.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export RSPY_LOCAL_MODE=1
export RSPY_HOST_ADGS=http://rs-server-adgs:8000
export RSPY_HOST_PRIP=http://rs-server-prip:8000
export RSPY_HOST_CADIP=http://rs-server-cadip:8000
export RSPY_HOST_EDRS=http://rs-server-edrs:8000
export RSPY_HOST_PRIP=http://rs-server-prip:8000
export RSPY_HOST_CATALOG=http://rs-server-catalog:8000
export RSPY_HOST_STAGING=http://rs-server-staging:8000
Expand Down Expand Up @@ -60,7 +61,7 @@ export RSPY_WORKING_DIR=/rspy/working/dir
export EODAG_ADGS_CONFIG=/app/conf/adgs_ws_config.yaml
export EODAG_CADIP_CONFIG=/app/conf/cadip_ws_config.yaml
export EODAG_PRIP_CONFIG=/app/conf/prip_ws_config.yaml

export EDRS_STATION_CONFIG=/app/conf/rs_server_edrs_config.yaml
# opentelementry
export LOKI_ENDPOINT=http://loki:3100/loki/api/v1/push
export TEMPO_ENDPOINT=http://tempo:4317
Expand Down
42 changes: 42 additions & 0 deletions local-mode/config/rs_server_edrs_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2025 CS Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

stations: |
pedc:
service:
name: edrs
url: edrs-station
port: 21
domain: mockup-station-pedc.processing.svc.cluster.local
authentication:
auth_type: ftpes
username: user
password: password
ca_crt: /certs/ca.crt
client_crt: /certs/client.crt
client_key: /certs/client.key

bedc:
service:
name: edrs
url: edrs-station
port: 21
domain: mockup-station-pedc.processing.svc.cluster.local
authentication:
auth_type: ftpes
username: user
password: password
ca_crt: /path/to/ca.crt
client_crt: /path/to/client.crt
client_key: /path/to/client.key
32 changes: 32 additions & 0 deletions local-mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,38 @@ services:
- ./config/rs-server.yaml:/home/user/.config/rs-server.yaml # auth to external stations
- ./config/cadip_ws_config.yaml:${EODAG_CADIP_CONFIG}

# From: https://github.com/RS-PYTHON/rs-server/blob/develop/services/edrs/.github/Dockerfile
rs-server-edrs:
image: ghcr.io/rs-python/rs-server-edrs:latest
container_name: rs-server-edrs
ports:
- 8006:8000
depends_on:
- rspy-pre-actions
- minio
- edrs-station
env_file:
- .env
environment:
EDRS_STATIONS_CONFIG_YAML: ${EDRS_STATION_CONFIG}
volumes:
- rspy_working_dir:${RSPY_WORKING_DIR} # docker named volume
- ./config/rs_server_edrs_config.yaml:${EDRS_STATION_CONFIG}
#environment:
# CORS_ORIGINS: http://localhost:8102
# RSPY_LOCAL_MODE: 0 # set to 0 to use the apikey-manager
# RSPY_UAC_CHECK_URL: http://apikey-manager:8000/auth/check_key # optional
# # OAuth2 authentication
# OIDC_ENDPOINT: https://iam.dev-rspy-ovh.esa-copernicus.eu
# OIDC_REALM: rspy
# OIDC_CLIENT_ID: apikeymanager
# OIDC_CLIENT_SECRET: xxx # DON'T SAVE THIS VALUE IN GIT !
# RSPY_COOKIE_SECRET: secret
# RSPY__TOKEN__xxx # from the k8s pod, replace http://mockup-station-cadip...:8080 by http://cadip-station:5000
#volumes:
#- ./config/rs-server.yaml:/home/user/.config/rs-server.yaml # auth to external stations
#- ./config/cadip_ws_config.yaml:${EODAG_CADIP_CONFIG}

rs-server-catalog:
image: ghcr.io/rs-python/rs-server-catalog:latest
container_name: rs-server-catalog
Expand Down
1 change: 1 addition & 0 deletions notebooks/resources/test_localhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
os.environ["RSPY_HOST_CATALOG"] = "http://localhost:8003"
os.environ["RSPY_HOST_STAGING"] = "http://localhost:8004"
os.environ["RSPY_HOST_PRIP"] = "http://localhost:8005"
os.environ["RSPY_HOST_EDRS"] = "http://localhost:8006"
os.environ["RSPY_HOST_DPR_SERVICE"] = "http://localhost:6003"
# s3 bucket
os.environ["S3_ENDPOINT"] = "http://localhost:9100"
Expand Down
15 changes: 13 additions & 2 deletions notebooks/resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from rs_client.stac.auxip_client import AuxipClient
from rs_client.stac.cadip_client import CadipClient
from rs_client.stac.catalog_client import CatalogClient
from rs_client.stac.edrs_client import EdrsClient
from rs_common.logging import Logging
from rs_common.prefect_utils import init_prefect_blocks

Expand All @@ -66,6 +67,7 @@
# Client instances
auxip_client: AuxipClient = None
cadip_client: CadipClient = None
edrs_client: EdrsClient = None
catalog_client: CatalogClient = None
staging_client: StagingClient = None
dpr_client: DprClient = None
Expand Down Expand Up @@ -149,7 +151,7 @@ def create_s3_buckets():

def init_rsclient(owner_id=None):
"""Init RsClient instances"""
global apikey, auxip_client, cadip_client, catalog_client, staging_client, dpr_client, prip_client
global apikey, auxip_client, cadip_client, catalog_client, staging_client, dpr_client, prip_client, edrs_client

# In local mode, the service URLs are hardcoded in the docker-compose file
if local_mode:
Expand All @@ -176,18 +178,27 @@ def init_rsclient(owner_id=None):
auxip_client = generic_client.get_auxip_client()
prip_client = generic_client.get_prip_client()
cadip_client = generic_client.get_cadip_client()
edrs_client = generic_client.get_edrs_client()
catalog_client = generic_client.get_catalog_client()
staging_client = generic_client.get_staging_client()
dpr_client = generic_client.get_dpr_client()

print(f"Auxip service: {auxip_client.href_service}")
print(f"PRIP service: {prip_client.href_service}")
print(f"CADIP service: {cadip_client.href_service}")
print(f"EDRS service: {edrs_client.href_service}")
print(f"Catalog service: {catalog_client.href_service}")
print(f"Staging service: {staging_client.href_service}")
print(f"DPR service: {dpr_client.href_service}")

return auxip_client, cadip_client, catalog_client, staging_client, prip_client
return (
auxip_client,
cadip_client,
catalog_client,
staging_client,
prip_client,
edrs_client,
)


def get_or_create_test_collection(
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint12/timestamps_for_items.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"\n",
"from resources.utils import *\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"from resources.utils import * # reload the global vars again\n",
"from pystac import Collection\n",
"session = requests.Session()\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"# Init environment before running a demo notebook.\n",
"from resources.utils import *\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_clientent, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_clientent, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"from resources.utils import * # reload the global vars again\n",
"\n",
"# Init the dask cluster\n",
Expand Down Expand Up @@ -158,7 +158,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint16/323_adgs_staging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pp = pprint.PrettyPrinter(indent=2, width=80, sort_dicts=False, compact=True)\n",
"session = requests.Session()\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"if os.getenv(\"RSPY_LOCAL_MODE\") == \"1\":\n",
" href = \"http://rs-server-adgs:8000\"\n",
" href_staging = \"http://rs-server-staging:8000\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint16/326_cadip_staging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"pp = pprint.PrettyPrinter(indent=2, width=80, sort_dicts=False, compact=True)\n",
"session = requests.Session()\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"if os.getenv(\"RSPY_LOCAL_MODE\") == \"1\":\n",
" href = \"http://rs-server-cadip:8000\" \n",
" href_staging = \"http://rs-server-staging:8000\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint17/342_cadip_staging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"pp = pprint.PrettyPrinter(indent=2, width=80, sort_dicts=False, compact=True)\n",
"session = requests.Session()\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"if os.getenv(\"RSPY_LOCAL_MODE\") == \"1\":\n",
" href = \"http://rs-server-cadip:8000\"\n",
" href_adgs = \"http://rs-server-adgs:8000\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint19/530_rsclient_staging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"\n",
"pp = pprint.PrettyPrinter(indent=2, width=80, sort_dicts=False, compact=True)\n",
"session = requests.Session()\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo()\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo()\n",
"\n",
"if os.getenv(\"RSPY_LOCAL_MODE\") == \"1\":\n",
" href_cadip = \"http://rs-server-cadip:8000\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint20/404_582_rsclient.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"\n",
"pp = pprint.PrettyPrinter(indent=2, width=80, sort_dicts=False, compact=True)\n",
"session = requests.Session()\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo()\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo()\n",
"\n",
"if os.getenv(\"RSPY_LOCAL_MODE\") == \"1\":\n",
" href_cadip = \"http://rs-server-cadip:8000\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sprints/sprint20/493_test_adgs_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/z-integration/z_stac_validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"# Init environment before running a demo notebook.\n",
"from resources.utils import *\n",
"user = os.environ[\"JUPYTERHUB_USER\"] if cluster_mode else os.environ[\"RSPY_HOST_USER\"]\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client = init_demo(owner_id = user)\n",
"auxip_client, cadip_client, catalog_client, staging_client, prip_client, edrs_client = init_demo(owner_id = user)\n",
"\n",
"from resources.utils import * # reload the global vars again"
]
Expand Down
Loading