Skip to content

Commit

Permalink
Merge pull request eclipse#277 from boschresearch/feature/the_big_move
Browse files Browse the repository at this point in the history
Move main server to subdirectory
  • Loading branch information
SebastianSchildt committed May 27, 2022
2 parents 9c41bb3 + 3afcb30 commit d8e8f07
Show file tree
Hide file tree
Showing 117 changed files with 237 additions and 348 deletions.
2 changes: 2 additions & 0 deletions .github/actions/unit-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ runs:
args:
- -a
- out
- -b
- kuksa-val-server/build

35 changes: 11 additions & 24 deletions .github/workflows/kuksa_feeders_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,24 @@ jobs:
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: build kuksa gps feeder docker for amd64
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
platforms: |
linux/amd64
linux/arm64
context: kuksa_feeders/gps2val
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=/tmp/kuksa_gps_feeder_amd64.tar # multi-platform images cannot be exported with the docker export type`
#outputs: type=docker,dest=/tmp/kuksa_gps_feeder_amd64.tar # multi-platform images cannot be exported with the docker export type`
outputs: type=oci,dest=/tmp/kuksa_gps_feeder # multi-platform images cannot be exported with the docker export type`
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
- name: build kuksa gps feeder docker for arm64
uses: docker/build-push-action@v2
with:
platforms: linux/arm64
context: kuksa_feeders/gps2val
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=/tmp/kuksa_gps_feeder_arm64.tar # multi-platform images cannot be exported with the docker export type`
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
- name: Upload AMD64 artifact
uses: actions/upload-artifact@v2
with:
name: kuksa_gps_feeder_amd64
path: /tmp/kuksa_gps_feeder_amd64.tar
- name: Upload ARM64 artifact
uses: actions/upload-artifact@v2

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: kuksa_gps_feeder_arm64
path: /tmp/kuksa_gps_feeder_arm64.tar
name: kuksa_gps_feeder_container
path: /tmp/kuksa_gps_feeder
2 changes: 1 addition & 1 deletion .github/workflows/kuksa_val_docker_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
file: docker/Dockerfile
file: ./kuksa-val-server/docker/Dockerfile
context: .
#push: ${{ github.event_name != 'pull_request' }}
push: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kuksa_val_docker_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: docker/build-push-action@v2
with:
platforms: linux/arm64
file: docker/Dockerfile
file: ./kuksa-val-server/docker/Dockerfile
context: .
#push: ${{ github.event_name != 'pull_request' }}
push: false
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "3rd-party-libs/jsoncons"]
path = 3rd-party-libs/jsoncons
path = kuksa-val-server/3rd-party-libs/jsoncons
url = https://github.com/danielaparker/jsoncons.git
[submodule "3rd-party-libs/jwt-cpp"]
path = 3rd-party-libs/jwt-cpp
path = kuksa-val-server/3rd-party-libs/jwt-cpp
url = https://github.com/Thalhammer/jwt-cpp.git
[submodule "3rd-party-libs/turtle"]
path = 3rd-party-libs/turtle
path = kuksa-val-server/3rd-party-libs/turtle
url = https://github.com/mat007/turtle.git
39 changes: 1 addition & 38 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,11 @@

Thanks for your interest in this project.

## Project description

Because today's software-intensive automotive systems are still developed in
silos by each car manufacturer or OEM in-house, long-term challenges in the
industry are yet unresolved. Establishing a standard for car-to-cloud scenarios
significantly improves comprehensive domain-related development activities and
opens the market to external applications, service provider, and the use of open
source software wherever possible without compromising security. Connectivity,
OTA maintenance, automated driving, electric mobility, and related approaches
increasingly demand technical innovations applicable across automotive players.

* https://projects.eclipse.org/projects/iot.kuksa

## Developer resources

Information regarding source code management, builds, coding standards, and
more.

* https://projects.eclipse.org/projects/iot.kuksa/developer

The project maintains the following source code repositories

* https://github.com/eclipse/kuksa.apps
* https://github.com/eclipse/kuksa.cloud
* https://github.com/eclipse/kuksa.ide
* https://github.com/eclipse/kuksa.integration
* https://github.com/eclipse/kuksa.invehicle
* https://github.com/eclipse/kuksa.website
* https://github.com/eclipse/kuksa.val

This project uses Bugzilla to track ongoing development and issues.

* Search for issues: https://bugs.eclipse.org/bugs/buglist.cgi?product=Kuksa
* Create a new report:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Kuksa

Be sure to search for existing bugs before you create another one. Remember that
contributions are always welcome!

## Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
Before your code contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php
Expand Down
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ node('docker') {
//Prepare for building test-client with default tokens
parallel arm64: {
stage('arm64') {
sh "docker buildx build --platform=linux/arm64 -f ./docker/Dockerfile -t arm64/kuksa-val:${versiontag} --output type=docker,dest=./artifacts/kuksa-val-${versiontag}-arm64.tar ."
sh "docker buildx build --platform=linux/arm64 -f ./kuksa-val-server/docker/Dockerfile -t arm64/kuksa-val:${versiontag} --output type=docker,dest=./artifacts/kuksa-val-${versiontag}-arm64.tar ."
sh "docker buildx build --platform=linux/arm64 -f ./kuksa_viss_client/Dockerfile -t arm64/kuksa-client:${versiontag} --output type=docker,dest=./artifacts/kuksa-client-${versiontag}-arm64.tar ."
sh "docker buildx build --platform=linux/arm64 -t arm64/kuksa-gps-feeder:${versiontag} --output type=docker,dest=./artifacts/kuksa-gps-feeder-${versiontag}-arm64.tar kuksa_feeders/gps2val"
}
},
amd64: {
stage('amd64') {
sh "docker buildx build --platform=linux/amd64 -f ./docker/Dockerfile -t amd64/kuksa-val:${versiontag} --output type=docker,dest=./artifacts/kuksa-val-${versiontag}-amd64.tar ."
sh "docker buildx build --platform=linux/amd64 -f ./kuksa-val-server/docker/Dockerfile -t amd64/kuksa-val:${versiontag} --output type=docker,dest=./artifacts/kuksa-val-${versiontag}-amd64.tar ."
sh "docker buildx build --platform=linux/amd64 -f ./kuksa_viss_client/Dockerfile -t amd64/kuksa-client:${versiontag} --output type=docker,dest=./artifacts/kuksa-client-${versiontag}-amd64.tar ."
sh "docker buildx build --platform=linux/amd64 -t amd64/kuksa-gps-feeder:${versiontag} --output type=docker,dest=./artifacts/kuksa-gps-feeder-${versiontag}-amd64.tar kuksa_feeders/gps2val"

sh "docker build -t kuksa-val-dev-ubuntu20.04:${versiontag} -f docker/Dockerfile.dev ."
sh "docker build -t kuksa-val-dev-ubuntu20.04:${versiontag} -f ./kuksa-val-server/docker/Dockerfile.dev ."
sh "docker save kuksa-val-dev-ubuntu20.04:${versiontag} > artifacts/kuksa-val-dev-ubuntu20.04:${versiontag}.tar"
}
}
}
stage('Test') {
sh "docker run --rm -w /kuksa.val -v ${env.WORKSPACE}/artifacts:/out kuksa-val-dev-ubuntu20.04:${versiontag} ./run_tests.sh -a /out"
sh "docker run --rm -w /kuksa.val/kuksa-val-server -v ${env.WORKSPACE}/artifacts:/out kuksa-val-dev-ubuntu20.04:${versiontag} ./run_tests.sh -a /out"
step([$class: 'XUnitPublisher',
thresholds: [ skipped(failureThreshold: '0'), failed(failureThreshold: '0') ],
tools: [ BoostTest(pattern: 'artifacts/results.xml') ]]
Expand Down
157 changes: 15 additions & 142 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,156 +3,29 @@

This is KUKSA.val, the KUKSA **V**ehicle **A**bstration **L**ayer.

[![Gitter](https://badges.gitter.im/kuksa-val.svg)](https://gitter.im/kuksa-val)
[![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0)

![Build Status AMD64](https://github.com/eclipse/kuksa.val/actions/workflows/kuksa_val_docker_amd64.yml/badge.svg)
![Build Status ARM64](https://github.com/eclipse/kuksa.val/actions/workflows/kuksa_val_docker_arm64.yml/badge.svg)
[![Build Status](https://kuksaval.northeurope.cloudapp.azure.com/buildStatus/icon?job=kuksaval-upstream%2Fmaster&subject=LegacyCI)](https://kuksaval.northeurope.cloudapp.azure.com/job/kuksaval-upstream/job/master/)
[![codecov](https://codecov.io/gh/eclipse/kuksa.val/branch/master/graph/badge.svg?token=M4FT175771)](https://codecov.io/gh/eclipse/kuksa.val)


KUKSA.val provides a [COVESA VSS data model](https://github.com/COVESA/vehicle_signal_specification) describing data in a vehicle. This data is provided to applications using a variant based on the W3C VISS Interface. KUKSA.val supports VISS V1 https://www.w3.org/TR/vehicle-information-service/ and extensions as well as parts of the upcomming VISS2 standard ([Gen2 Core](https://raw.githack.com/w3c/automotive/gh-pages/spec/VISSv2_Core.html), [Gen2 Transport](https://raw.githack.com/w3c/automotive/gh-pages/spec/VISSv2_Transport.html)), that are applicable to in-vehicle VSS servers.

See [Supported Protocol](doc/protocol/README.md) for a detailled overview of the supported VISS feature.

Check [System Architecture](doc/system-architecture.md) for an overview how KUKSA.val can be used and deployed in a modern Software Defined Vehicle.

## Features
- Websocket interface, TLS-secured or plain
- [Experimental REST interface](doc/rest-api.md), TLS-secured or plain
- [Fine-grained authorisation](doc/jwt.md) based on JSON Webtokens (RFC 7519)
- Built-in MQTT publisher
- [Python viss client](./kuksa_viss_client) to interactively explore and modify the VISS data points and data structure
- Multiple [example apps](./kuksa_apps) in different programming languages to communicate with different frameworks
- Multiple [feeders](./kuksa_feeders) to provide vehicle data for the `kuksa.val` server
- Support most of data types, which is specified in [COVESA VSS data model](https://covesa.github.io/vehicle_signal_specification/rule_set/data_entry/data_types/).


## Quick start

### Using Docker Image
If you prefer to build kuksa.val yourself skip to [Building KUKSA.val](#Building-kuksaval).

Download a current docker image from one of our CI server:

- https://ci.eclipse.org/kuksa/job/kuksa.val/job/master/
- https://kuksaval.northeurope.cloudapp.azure.com/job/kuksaval-upstream/

The container images should work with any OCI compliant container runtime, in this document we assume you are using docker

Import the docker image

```
docker load -i kuksa-val-b3084b9-amd64.tar.xz
```

Your build tag may vary, and for ARM machines you need to choose an arm64 images.

Prepare an empty directory `$HOME/kuksaval.config`. Run the docker image using the tag reported by `docker load`:

```bash
docker run -it --rm -v $HOME/kuksaval.config:/config -p 127.0.0.1:8090:8090 -e LOG_LEVEL=ALL amd64/kuksa-val:b3084b9
```

More information on using the docker images can be found [here](doc/run-docker.md).

To learn, how to build your own docker image see [doc/build-docker.md](doc/build-docker.md).

If this is succesful you can skip to [using kuksa.val](#using-kuksaval).

## Building kuksa.val

First you need to fetch the source. ;ake sure you also get the needed submodules, e.g. by using the `--recursive` flag

```
git clone --recursive https://github.com/eclipse/kuksa.val.git
```

### Using devcontainer
If you are using [Visual Studio Code](https://code.visualstudio.com), and have a running version of [Docker](https://docs.docker.com/) on your computer, KUKSA.val provides a [devcontainer](https://code.visualstudio.com/docs/remote/containers) configuration. Simply go to the VSCode command palette and use `Remote-Containers: Open Folder in Container...` to open the cloned KUKSA.val folder, or, if you already opened the folder in your local VSCode instance, choose `Remote-Containers: Reopen in Container...`
KUKSA.val provides in-vehicle software components for working with in-vehicle signals modelled using the [COVESA VSS data model](https://github.com/COVESA/vehicle_signal_specification).

**Note**: If you are using Docker on a Mac OS, by default the VM used to run Dockers does not contain enough RAM to build KUKSA.val. Increase the RAM allocation for Docker to at least 4 GB in the [Docker Desktop Preferences](https://docs.docker.com/desktop/mac/#preferences)

Once the devcontainer is running you can continue with [compiling](#compiling).

### Manually install dependencies
First install the required packages. On Ubuntu 20.04 this can be achieved by

```
sudo apt install cmake build-essential libssl-dev libmosquitto-dev
```

**Note**: If you use `cmake >= 3.14`, you do not need to install boost on your system. `cmake` will download the required boost for building. Otherwise you need install the [`boost==1.75`](https://www.boost.org/users/history/version_1_75_0.html) on the system.



### Compiling
Create a build folder inside the kuksa.val folder and execute cmake

```
mkdir build
cd build
cmake ..
```
If there are any missing dependencies, cmake will tell you. If everythig works fine, execute make

```
make
```

(if you have more cores, you can speed up compilation with something like `make -j8`

Additional information about our cmake setup (in case you need adavanced options or intend to extend it) can be [found here](doc/cmake.md).



### Running kuksa.val
After you successfully built the kuksa.val server you can run it like this

```bash
#assuming you are inside kuksa.val/build directory
cd src
./kuksa-val-server --vss ./vss_release_2.2.json --log-level ALL

```
Setting log level to `ALL` gives you some more information about what is going on.

You can also edit [config.ini](./config.ini) file to configure kuksa val server. This file will be copied to the build directory and used als default config,
if no other config file is specified using the command line option `-c/--config-file`.

For more information check [usage](doc/usage.md).

## Using kuksa.val
The easiest way to try `kuksa.val` out, is to use the test client [`kuksa_viss_client`](./kuksa_viss_client):

```
pip install kuksa-viss-client
kuksa_viss_client
```

![try kuksa_viss_client out](doc/pictures/testclient_basic.gif "test client usage")

The jwt tokens for testing can also be found under [kuksa_certificates/jwt](./kuksa_certificates/jwt).

You can also use the provided python sdk to develop your own `kuksa.val` clients. More details about `kuksa_viss_client` can be found [here](./kuksa_viss_client).

Additionally, you can use the [example apps](./kuksa_apps) and [feeders](./kuksa_feeders) to handle vehicle data, interacting with the `kuksa.val` server.
[![Gitter](https://badges.gitter.im/kuksa-val.svg)](https://gitter.im/kuksa-val)

## Using kuksa.val with a gRPC Client
Aditionally it exists a gRPC server. The easist way to test the server is the kuksa_viss_grpc_client.
To run the client follow these steps:
![Build Status AMD64](https://github.com/eclipse/kuksa.val/actions/workflows/kuksa_val_docker_amd64.yml/badge.svg)
![Build Status ARM64](https://github.com/eclipse/kuksa.val/actions/workflows/kuksa_val_docker_arm64.yml/badge.svg)
[![Build Status](https://kuksaval.northeurope.cloudapp.azure.com/buildStatus/icon?job=kuksaval-upstream%2Fmaster&subject=kuksa-val-server%20legacy%20CI)](https://kuksaval.northeurope.cloudapp.azure.com/job/kuksaval-upstream/job/master/)
[![codecov](https://codecov.io/gh/eclipse/kuksa.val/branch/master/graph/badge.svg?token=M4FT175771)](https://codecov.io/gh/eclipse/kuksa.val)

```
cd build/src
./kuksa_viss_grpc_client
```
This repository contains several components

If you do not know how to use the client:
| License | Component | Description |
| --------| -------------- | ----------- |
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [kuksa-val-server](kuksa-val-server) | Feature rich in-vehicle data server written in C++ providing authorized access to VSS data using W3C VISS websocket protocol or GRPC |
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [Python SDK](./kuksa_viss_client) | Python library for easy interaction with kuksa-val-server
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [GO SDK](./kuksa_go_client) | GOlang libraryfor easy interaction with kuksa-val-server
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [Testclient](./kuksa_viss_client) | Command line tool to interactively explore and modify the VSS data points and data structure |
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [Examples](./kuksa_apps) | Multiple example apps for different programming languages and frameworks
| [![License](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](https://opensource.org/licenses/EPL-2.0) | [Feeders](./kuksa_feeders) | Multiple feeders to gathering vehicle data and transforming it to VSS suitable for kuksa-val-server

```
./kuksa_viss_grpc_client --help
```



Loading

0 comments on commit d8e8f07

Please sign in to comment.