openEO EODC backend deployment via TOSCA #6
Replies: 7 comments 40 replies
-
I report here the exampels I shared via email to test the deployed back-end:
import openeo
from openeo.metadata import CollectionMetadata
from openeo.processes import array_element
conn = openeo.connect('https://dev.openeo.eurac.edu').authenticate_basic("guest","changeme")
url = https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a
spatial_extent = {"east": 11.40, "north": 46.52, "south": 46.46, "west": 11.25}
temporal_extent = ["2022-06-01", "2022-06-30"]
bands = ["red", "nir"]
s2_datacube = conn.load_stac(
url=url,
spatial_extent=spatial_extent,
temporal_extent=temporal_extent,
bands=bands
)
s2_datacube.metadata = CollectionMetadata({"cube:dimensions":{"time":{"type":"temporal"},"band":{"type":"bands"}}})
def NDVI(data):
b04 = data.array_element(label="red")
b08 = data.array_element(label="nir")
return (b08 - b04) / (b08 + b04)
ndvi = s2_datacube.reduce_dimension(dimension="band",reducer=NDVI)
ndvi_median = ndvi.reduce_dimension(dimension="time", reducer="median")
result_ndvi = ndvi_median.download("ndvi_eurac.nc")
import openeo
import requests
from openeo.metadata import CollectionMetadata
from openeo.processes import array_element
s = requests.Session()
s.verify = False
conn = openeo.connect('https://openeo.62.217.83.68.nip.io/1.1.0/',session=s)
url = https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a
spatial_extent = {"east": 11.40, "north": 46.52, "south": 46.46, "west": 11.25}
temporal_extent = ["2022-06-01", "2022-06-30"]
bands = ["red", "nir"]
s2_datacube = conn.load_stac(
url=url,
spatial_extent=spatial_extent,
temporal_extent=temporal_extent,
bands=bands
)
s2_datacube.metadata = CollectionMetadata({"cube:dimensions":{"time":{"type":"temporal"},"band":{"type":"bands"}}})
def NDVI(data):
b04 = data.array_element(label="red")
b08 = data.array_element(label="nir")
return (b08 - b04) / (b08 + b04)
ndvi = s2_datacube.reduce_dimension(dimension="band",reducer=NDVI)
ndvi_median = ndvi.reduce_dimension(dimension="time", reducer="median")
result_ndvi = ndvi_median.download("ndvi_intertwin.nc")
It would be nice to have a working example using batch jobs and getting the result in STAC. @SerRichard where will the result be stored? Is there a linked object storage to this openEO back-end? @andrea-manzi I don't see Sean in the members, could you add him so that he can take part to the discussion? |
Beta Was this translation helpful? Give feedback.
-
If you change the line: conn = openeo.connect('https://openeo.62.217.83.68.nip.io/1.1.0/',session=s) With this, the authentication works (but I get another errors) token = "ey.........."
conn = openeo.connect('https://openeo.62.217.83.68.nip.io/1.1.0',session=s).authenticate_oidc_access_token(token) To get the value of the |
Beta Was this translation helpful? Give feedback.
-
@micafer The deployment can be updated, if you'd refer to the latest changes in the chart, the issues above should get resolved. The latest tags for the api and executor have also changed. Currently there's two points of open work that I'd like to address.
The first is pretty self explanatory, and I just need to allocate time to complete. The second, I'm still open for suggestions, but it would be good to implement some default tiling grid to control the output of the filesize, to limit possible pressure on the api on download, and on the dask workers when writing results. |
Beta Was this translation helpful? Give feedback.
-
Hi all, After the last update of the API it seems that it is working now using this code to authenticate: import openeo
import requests
s = requests.Session()
token = "SOME_TOKEN"
conn = openeo.connect('https://openeo.intertwin.fedcloud.eu/1.1.0/', session=s)
conn.authenticate_oidc_access_token(token, "egi")
... I tied the computation suggested by @clausmichele, but it gets an error: Failed to parse API error response: [500] 'Internal Server Error' (headers: {'Date': 'Thu, 24 Oct 2024 14:41:23 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '21', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'}) And @SerRichard in the logs of the hera.exceptions.Forbidden: Server returned status code 403 with message: `workflows.argoproj.io is forbidden: User "system:serviceaccount:openeo:openeo-argo-access-sa" cannot create resource "workflows" in API group "argoproj.io" in the namespace "openeo"` |
Beta Was this translation helpful? Give feedback.
-
In the current cluster I relaunched with a bigger WN and now the jobs fit in the size of the node and the example is completed successfully! |
Beta Was this translation helpful? Give feedback.
-
@micafer the openEO back-end is not reachable anymore, it returns 404: https://openeo.intertwin.fedcloud.eu/1.1.0/ |
Beta Was this translation helpful? Give feedback.
-
i guess now everything is working as expected, closing |
Beta Was this translation helpful? Give feedback.
-
Cluster deployed via IM at https://openeo.62.217.83.68.nip.io/1.1.0/
Need to clarify the EGI Check-in used. I have setup via IM to use the EGI Check-in demo instance, is that automatically configured ? or only the Production instance is there by default?
Beta Was this translation helpful? Give feedback.
All reactions