Code Monkey home page Code Monkey logo

devenv-runtimes's Introduction

Velocitas Runtimes Package

License: Apache

A Velocitas CLI package containing all available and supported Velocitas runtimes and deployments.

Runtimes

This package contains the following runtimes:

Note: Support for Kubernetes (K3D) runtime has recently been removed.

Runtime Configuration: runtime.json

This JSON file contains an array of services which should be started by all runtimes. Every service entry consists of a unique id, its provided interfaces and its key-value based config.

Configuration Values

For config values, here is a list of supported key-value pairs:

Key Value examples Description
enabled "true", "false" If set to "false" the service will not be started by the runtimes. Defaults to "true".
image ghcr.io/eclipse/kuksa.val.feeders/dbc2val:v0.1.1 A fully qualified URI to a OCI compliant container image located within a container registry
arg -c Argument to be passed to the spawned service. Can be passed multiple times for multiple arguments; arguments are forwarded in the order of definition in that case.
env foo=bar Environment variable key-value pair to be passed to the spawned service.
mount /config/feedercan/:/data Mount from_host:to_container pair to pass to the spawned service. Can be passed multiple times for multiple mounts. Both paths need to be absolute.
port 8080 Port exposed by the spawned service. Can be passed multiple times for multiple ports.
port-forward 8080:8080 Port forwarded from containerized service to the host. Can be passed multiple times for multiple forwards.
start-pattern ".*mosquitto version \\d+\\.\\d+\\.\\d+ running\n" Regex pattern which identifies a proper startup of the service. If passed multiple times, all patterns have to match.

Dynamic value resolution in configuration

Each of the supported keys may need to use dynamic values i.e. from Velocitas CLI variables.

To use these in the runtime.json's config keys, refer to the variable name within a ${{ }} block, i.e. ${{ myVariable }}.

In addition to CLI variables, some builtin variables are available:

Variable name Description
builtin.package_dir The path to the current package root which contains the package's manifest.json
builtin.cache.cache_key The value of the cache entry with key cache_key, e.g. builtin.cache.vspec_file_path

Finally, sometimes a single variable substitution is not enough. Among others, you may want to look up a file in a directory and - if it does not exist - fall back to a default file provided by the package. This is where function execution within value entries comes to your rescue.

Available functions:

Function Description
$pathInWorkspaceOrPackage( <relative_path> ) Resolves a path dynamically either to the local project workspace, if the file is available or falls back to a file in the package repository. If none of these files is available an exception is raised.

Deployment spec generators

This package contains the following generators:

Development hints

To create a better local environment, you can execute source ./set_cli_env.sh to export all CLI provided variables to test your scripts without invoking them via CLI exec.

devenv-runtimes's People

Contributors

mp91 avatar doosuu avatar kse3hi avatar dennismeister93 avatar bjoernatbosch avatar erikbosch avatar wba2hi avatar eclipsewebmaster avatar lukasmittag avatar mml5bg avatar glm2bg avatar

Watchers

Ebrahim.A avatar  avatar Gabriela Kreyßing avatar

devenv-runtimes's Issues

[Bug]: No requirements.in for runtime_kanto/test/app

Severity

Medium

What release version, tag or commit-hash did you use?

main

Current Behavior

In https://github.com/eclipse-velocitas/devenv-runtimes/blob/main/runtime_kanto/test/app/requirements.txt it says that the file is auto-generated, and comments suggests that it seems to be generated from a requirements.in file but none can be found.

Steps to Reproduce

Look at the file

Expected Behavior

If the file says it is auto-generated the source should be there

Possible Solution

Either add the missing requirements.in file, or transform it to a manual requirements.txt (if so we should likely remove indirect dependencies to make it easier to maintain)

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

[Bug]: Name of the VSS Spec is hardcoded to vspec.json for K3D configmap

Severity

Critical

What release version, tag or commit-hash did you use?

v2.2.4

Current Behavior

If one has a custom vspec with a different name than vspec.json, the databroker in the K3D runtime fails to start due a hardcoded value in the helm-charts for the databroker.

Steps to Reproduce

  • create a vss.json in the app-directory
  • adapt appmanifest
  • regenerate model
  • start k3d runtime up
  • databroker fails to start due to missing configmap

Expected Behavior

details are taken from the appmanifest and are not hardcoded

Possible Solution

No response

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

[Bug]: Kanto runtime up does not work when a K3D registry exists

Severity

High

What release version, tag or commit-hash did you use?

ed5d2cb

Current Behavior

When running velocitas exec runtime-kanto up with an already existing k3d registry container running, Kanto will pick up the registry as existing but won't be able to re-use it. It instead will fail with container registry does not exist

Steps to Reproduce

Start a K3D runtime via velocitas runtime-k3d up
Start a Kanto runtime via velocitas runtime-kanto up

Expected Behavior

Kanto runtime will either fail with a proper error message (e.g. wrong registry name or unsupported registry name) or re-use the existing registry without issues.

Possible Solution

No response

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

[Bug]: Revise Bandit configuration and skipped rules: skips = B101,B404,B603,B607

Severity

High

What release version, tag or commit-hash did you use?

https://github.com/eclipse-velocitas/devenv-runtimes/blob/v2.0.0

Current Behavior

Bandit skips next rules: skips = B101,B404,B603,B607

Steps to Reproduce

  1. Go to https://github.com/eclipse-velocitas/devenv-runtimes/blob/main/setup.cfg
  2. Check section [bandit]

Expected Behavior

Bandit shall not skip rules or rational shall be given.

Possible Solution

E.g. for B101 proper configuration of test sources shall be given and no assertion shall be used in productive code.
B404 can be avoided
B603 - analyze deeply
B607 - use properly

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

[Feature]: Remove Dapr middleware and K3D runtime

Description

We remove support for K3D runtime and Dapr middleware

  • Both technologies are too heavy weight for in-vehicle applications
  • Flexibility offered is not applicable in in-vehicle hardware architectures
  • Increase development effort in the Velocitas OSS team

Suggested Solution

No response

Alternatives

No response

Additional Context

No response

[Bug]: new images get not deployed in Kanto

Severity

Medium

What release version, tag or commit-hash did you use?

latest

Current Behavior

Currently one can locally deploy the app in the kanto runtime. If the gets updated and shall be redeployed, kanto still uses the old version of the app.

Manually running sudo ctr -a /run/docker/containerd/containerd.sock -n kanto-cm i rm $(sudo ctr -a /run/docker/containerd/containerd.sock -n kanto-cm i ls -q | grep sampleapp) deletes the image from containerd and one can deploy the new version

Steps to Reproduce

  1. start kanto runtime
  2. deploy vehicle-app
  3. make changes in the app
  4. try to deploy the new version to kanto

Expected Behavior

new version gets deployed

Possible Solution

include sudo ctr -a /run/docker/containerd/containerd.sock -n kanto-cm i rm $(sudo ctr -a /run/docker/containerd/containerd.sock -n kanto-cm i ls -q | grep sampleapp) into kanto runtime down

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

[Q]: How to pull devenv-runtimes through corporate proxy

Question

Hello, I have a setup where I am trying to run the seatadjuster app on Linux but pulling the devenv-runtimes with the velocitas CLI tool does not seem to work through my company proxy server which uses ssl interception. Logs say :

[29675 ms] Start: Run in container: /bin/sh -c bash .devcontainer/scripts/onCreateCommand.sh
#######################################################

Run VADF Lifecycle Management

#######################################################
Initializing Velocitas packages ...
... Downloading package: 'devenv-runtimes:v2.2.2'
... > Running post init hook for 'runtime-local'
Running 'install-deps'... !
› Error: Program returned exit code: 1
Syncing Velocitas components!
Cannot find component devenv-github-workflows:v4.1.1. Please upgrade or init first!
Error: Cannot find component devenv-github-workflows:v4.1.1

Do you know how I can work around this problem? It works perfectly fine when I use a normal network without proxying.

Timeout not long enough for high loaded environment

Is it possible to set this in an environment parameter?
Error log:

mqtt-broker running
('Timeout reached after {startup_timeout_sec}\n seconds, service killed!',)

💥 Starting vehicledatabroker...

['docker', 'run', '--rm', '--init', '--name', 'mqtt-broker', '-p', '1883:1883', '-p', '9001:9001', '--network', 'host', 'eclipse-mosquitto:2.0.14', 'mosquitto', '-c', '/mosquitto-no-auth.conf'] (service_id='mqtt-broker') terminated

✅ Stopping runtime...
Starting vehicledatabroker failed

Start log of vehicledatabroker >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Starting 'vehicledatabroker'
docker run --rm --init --name vehicledatabroker -e KUKSA_DATABROKER_METADATA_FILE=/workspaces/Identity-Synchronization-Client/app/vspec.json -e KUKSA_DATABROKER_PORT=55555 -v /workspaces/Identity-Synchronization-Client/app/vspec.json:/workspaces/Identity-Synchronization-Client/app/vspec.json --network host ghcr.io/eclipse-kuksa/kuksa-databroker:0.4.4
2024-06-28T07:39:39.000326Z INFO databroker: Init logging from RUST_LOG (environment variable not found)
2024-06-28T07:39:39.000362Z INFO databroker: Starting Kuksa Databroker 0.4.4
2024-06-28T07:39:39.001140Z INFO databroker: Populating metadata from file '/workspaces/Identity-Synchronization-Client/app/vspec.json'
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< End log of vehicledatabroker <<<<

  • Terminal will be reused by tasks, press any key to close it.

return spawn_process(docker_args, log, patterns, startup_timeout_sec=60)

[Bug]: Hardcoded python-template path in kanto deployment configs

Severity

Medium

What release version, tag or commit-hash did you use?

v2.2.2

Current Behavior

For the kanto runtime there are hardcoded python template paths configured

Steps to Reproduce

"source": "/workspaces/vehicle-app-python-template/config/feedercan",

"source": "/workspaces/vehicle-app-python-template/mock.py",

Expected Behavior

The config should not rely on a hardcoded path because the user could name his repository differently.

Same applies when coming from the new vehicle-app-template

Possible Solution

No response

Additional Information

No response

Code of Conduct

  • I agree to follow this project's "Code of Conduct".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.