Skip to content

Commit

Permalink
Add openEO template
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jan 23, 2025
1 parent bd16bc3 commit 47a73ee
Showing 1 changed file with 210 additions and 0 deletions.
210 changes: 210 additions & 0 deletions templates/openeo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
tosca_definitions_version: tosca_simple_yaml_1_0

imports:
- grycap_custom_types: https://raw.githubusercontent.com/grycap/tosca/main/custom_types.yaml

description: Deploy OpenEO on top of a Kubernetes Virtual Cluster.

metadata:
template_version: "1.0.0"
template_name: OpenEO
display_name: Deploy OpenEO on top of a Kubernetes Virtual Cluster


topology_template:

inputs:

openeo_stac_url:
type: string
description: OpenEO STAC Catalogue URL
default: "https://dev.stac.eodc.eu/api/v1"
openeo_oidc_url:
type: string
description: OpenEO OIDC URL
default: "https://aai.egi.eu/auth/realms/egi"
openeo_oidc_organisation:
type: string
description: OpenEO OIDC Organisation
default: "egi"
openeo_oidc_roles:
type: string
description: List of OpenEO OIDC Policies
default: ""
openeo_dns_name:
type: string
description: OpenEO DNS name (leave empty to use openeo.<node_ip>.nip.io)
default: ""
openeo_dask_worker_cores:
type: integer
description: Number of cores per Dask worker
default: 2
constraints:
- greater_than: 0
openeo_dask_worker_memory:
type: integer
description: Memory per Dask worker (in GiB)
default: 4
constraints:
- greater_than: 1
openeo_cors_origin:
type: string
description: CORS origin
default: ""

fe_cpus:
type: integer
description: Number of CPUs for the front-end node
default: 2
required: yes
fe_mem:
type: scalar-unit.size
description: Amount of Memory for the front-end node
default: 4 GB
required: yes
fe_disk_size:
type: scalar-unit.size
description: Size of the disk to be attached to the FE instance (Set 0 if disk is not needed)
default: 100 GB

wn_num:
type: integer
description: Number of WNs in the cluster
default: 3
required: yes
wn_cpus:
type: integer
description: Number of CPUs for the WNs
default: 2
required: yes
wn_mem:
type: scalar-unit.size
description: Amount of Memory for the WNs
default: 8 GB
required: yes
wn_disk_size:
type: scalar-unit.size
description: Size of the root disk of the WNs (in case of 0 disk will no be resized)
default: 40 GB

kube_version:
type: string
description: Version of Kubernetes to install
default: "1.29.7"

node_templates:

openeo:
type: tosca.nodes.ec3.Application
capabilities:
endpoint:
properties:
ports:
http:
protocol: tcp
source: 80
https:
protocol: tcp
source: 443
interfaces:
Standard:
configure:
implementation: https://raw.githubusercontent.com/grycap/tosca/main/artifacts/openeo_k8s.yml
inputs:
openeo_stac_url: { get_input: openeo_stac_url }
public_ip_address: { get_attribute: [ front, public_address, 0 ] }
openeo_oidc_url: { get_input: openeo_oidc_url }
openeo_oidc_organisation: { get_input: openeo_oidc_organisation }
openeo_oidc_roles: { get_input: openeo_oidc_roles }
openeo_dns_name: { get_input: openeo_dns_name }
openeo_dask_worker_cores: { get_input: openeo_dask_worker_cores }
openeo_dask_worker_memory: { get_input: openeo_dask_worker_memory }
openeo_cors_origin: { get_input: openeo_cors_origin }
requirements:
- host: front
- dependency: lrms_front_end

lrms_front_end:
type: tosca.nodes.indigo.LRMS.FrontEnd.Kubernetes
capabilities:
endpoint:
properties:
ports:
http_port:
protocol: tcp
source: 80
https_port:
protocol: tcp
source: 443
properties:
admin_username: kubeuser
admin_token: ""
install_nfs_client: true
install_kubeapps: false
version: { get_input: kube_version }
cri_runtime: docker
csi_driver: NFS
cert_manager: true
cert_user_email: [email protected]
requirements:
- host: front

front:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
dns_name: kubeserver
network_name: PUBLIC
host:
properties:
num_cpus: { get_input: fe_cpus }
mem_size: { get_input: fe_mem }
os:
properties:
distribution: ubuntu
type: linux
version: 24.04
requirements:
- local_storage:
node: fe_block_storage
relationship:
type: AttachesTo
properties:
location: /pv

fe_block_storage:
type: tosca.nodes.BlockStorage
properties:
size: { get_input: fe_disk_size }

wn_node:
type: tosca.nodes.indigo.LRMS.WorkerNode.Kubernetes
properties:
front_end_ip: { get_attribute: [ front, private_address, 0 ] }
version: { get_input: kube_version }
cri_runtime: docker
csi_driver: NFS
requirements:
- host: wn

wn:
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: { get_input: wn_num }
host:
properties:
disk_size: { get_input: wn_disk_size }
num_cpus: { get_input: wn_cpus }
mem_size: { get_input: wn_mem }
os:
properties:
distribution: ubuntu
type: linux
version: 24.04

outputs:
openeo_endpoint:
value: { concat: [ 'https://openeo.', get_attribute: [ front, public_address, 0 ], '.nip.io/1.1.0/' ] }

0 comments on commit 47a73ee

Please sign in to comment.