Skip to content

Deploy as app in connector

Alexandros Tzortzis edited this page Feb 6, 2025 · 1 revision

Overview

The values.yaml file configures various services, containers, and application settings for your environment. Customizing this file allows you to define deployment-specific information such as host URLs, paths, container images, environment variables, and security settings.


Key Sections to Customize

1. Host Configuration

The host field should be updated with the actual domain or URL where your deployment will be hosted. This value will be used in various places throughout the configuration, such as in the accessUrl for IDS information. Make sure to replace any placeholder or null values with your actual host.

Example:

host: your-deployment-domain.com

2. Core Container Configuration

The coreContainer section defines the image to be used for the core application, its ingress path, and environment variables.

  • ingress.path: Adjust the path to match your deployment's routing structure.
  • ingressClass: Set this to the correct value (e.g., public or private).
  • clusterIssuer: Set the issuer for SSL certificates, e.g., letsencrypt.
  • environment: Add any necessary environment variables for your application.

Example:

coreContainer:
  image: docker.nexus.dataspac.es/core-container:feature-open-sourcing
  ingress:
    path: /playground/(.*)
    rewriteTarget: /$1
    clusterIssuer: letsencrypt
    ingressClass: public
  environment:
  - name: ENABLE_OCSP
    value: "false"
  - name: ENABLE_CRL
    value: "false"

3. Admin UI Configuration

If the admin UI is enabled, ensure the image is correct and the ingress.path is updated if necessary.

  • Set the nodePort to the desired port for accessing the admin UI. If there is a conflict with other services, change the port number accordingly.

Example:

adminUi:
  enabled: true
  image: docker.nexus.dataspac.es/ui/core-container-ui:master
  ingress:
    path: /playground/ui/(.*)
    rewriteTarget: /$1
  nodePort: 30530

4. IDS Configuration

The ids section includes metadata about your IDS provider, security settings (API keys, users), and information about routes.

  • Access URL: Update the accessUrl field to use the correct host URL that points to your service.
  • Security: Adjust the apiKeys and users to reflect your own authentication and authorization settings. These fields are crucial for securing your services.
  • DAPS URL: If needed, update the DAPS URL to your deployment’s DAPS service.

Example:

ids:
  info:
    idsid: urn:ids:enershare:connectors:NTUA:Provider
    curator: urn:ids:enershare:participants:NTUA
    maintainer: urn:ids:enershare:participants:NTUA
    titles:
    - AI4EF-ModelApp-AI4EF ModelApp:1.0
    descriptions:
    - AI4EF-ModelApp-AI4EF ModelApp:1.0
    accessUrl:
    - "https://your-deployment-domain.com/router"

5. Container Configuration

The containers section defines each data app container, including details like the image, exposed ports, ingress paths, and environment variables.

  • Container Name: Customize the name of each container to reflect the application it is running.
  • Image: Adjust the image to point to the correct Docker image for your application.
  • Services: Set up services to expose the required ports and adjust the ingress path if necessary.
  • Environment Variables (optional): Add any required environment variables under the environment section based on the needs of each application.
  • Health Checks: Configure livenessProbe and startupProbe to ensure the containers are functioning properly.

Example:

containers:
- type: data-app
  name: ai4ef-model-app
  image: registry.haslab-dataspace.pt/ai4ef-modelapp/ai4ef-model-app:latest
  config:
    openAPI: null
  services:
  - port: 8080
    name: http
    ingress:
      path: /playground/data-app/ai4ef-dashboard/(.*)
      rewriteTarget: /$1
      clusterIssuer: letsencrypt
      ingressClass: public
  environment: []

6. Ingress Paths and Services

Ensure that the ingress paths for your services are customized according to your routing needs. These paths dictate how incoming requests are routed to the appropriate containers.

  • Ingress Path: Modify the path or rewrite target as needed to match your deployment structure.

Example:

services:
  - port: 8080
    name: http
    ingress:
      path: /playground/data-app/ai4ef-dashboard/(.*)
      rewriteTarget: /$1
      clusterIssuer: letsencrypt
      ingressClass: public

7. Environment Variables (Optional)

Set environment variables for containers based on your specific needs. Common examples include configuration for shared storage, API keys, and other environment-specific values. Ensure these are updated before deployment.

Example:

containers:
- type: data-app
  name: ai4ef-train-playground-1-0
  image: registry.haslab-dataspace.pt/ai4ef/ai4ef-train-playground:1.0
  environment:
    - name: SHARED_STORAGE_PATH
      value: "shared_storage/"
    - name: API_KEY
      value: "APIKEY-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    - name: CONSUMER_AGENT_ID
      value: "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
    - name: PROVIDER_AGENT_ID
      value: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"

8. Final Steps

After customizing the values.yaml file:

  1. Double-check all URLs, paths, and port numbers to ensure they align with your deployment setup.
  2. If you added any specific security configurations, such as API keys or users, ensure they are correctly set to avoid unauthorized access.
  3. Validate the container image names to make sure they point to the correct registry and version of the images you need.
  4. Finally, apply the updated values.yaml configuration to your Kubernetes or deployment system to launch your services.

Example: After completing these steps, your values.yaml file will be fully customized and ready for deployment.

Clone this wiki locally