From d1ff4cc4b9ba8d4c2b140e785b93d278c3154ebb Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Tue, 24 May 2022 00:34:55 +0200 Subject: [PATCH 1/7] Move main server to subdirectory Signed-off-by: Sebastian Schildt --- .gitmodules | 6 +-- CONTRIBUTING.md | 39 +--------------- .../3rd-party-libs}/jsoncons | 0 .../3rd-party-libs}/jwt-cpp | 0 .../3rd-party-libs}/turtle | 0 .../CMakeLists.txt | 2 +- boost.cmake => kuksa-val-server/boost.cmake | 0 .../buildinfo.h.in | 0 config.ini => kuksa-val-server/config.ini | 0 .../config_grpc_client.ini | 0 .../git_watcher.cmake | 0 grpc.cmake => kuksa-val-server/grpc.cmake | 0 .../include}/AccessChecker.hpp | 0 .../include}/Authenticator.hpp | 0 .../include}/BasicLogger.hpp | 0 .../include}/GrpcConnection.hpp | 0 .../include}/JsonResponses.hpp | 0 .../include}/MQTTPublisher.hpp | 0 .../include}/OverlayLoader.hpp | 0 .../include}/RestV1ApiHandler.hpp | 0 .../include}/SubscriptionHandler.hpp | 0 .../include}/VSSPath.hpp | 0 .../include}/VSSRequestJsonSchema.hpp | 0 .../include}/VSSRequestValidator.hpp | 0 .../include}/VssCommandProcessor.hpp | 0 .../include}/VssDatabase.hpp | 0 .../include}/VssDatabase_Record.hpp | 0 .../include}/WebSockHttpFlexServer.hpp | 0 .../include}/WsChannel.hpp | 0 .../include}/exception.hpp | 0 .../include}/grpcHandler.hpp | 0 .../include}/interface/IAccessChecker.hpp | 0 .../include}/interface/IAuthenticator.hpp | 0 .../include}/interface/ILogger.hpp | 0 .../include}/interface/IPublisher.hpp | 0 .../include}/interface/IRestHandler.hpp | 0 .../include}/interface/IServer.hpp | 0 .../interface/ISubscriptionHandler.hpp | 0 .../interface/IVssCommandProcessor.hpp | 0 .../include}/interface/IVssDatabase.hpp | 0 .../include}/ssl_stream.hpp | 0 .../include}/visconf.hpp | 0 .../protos}/kuksa.proto | 0 run_tests.sh => kuksa-val-server/run_tests.sh | 0 .../src}/AccessChecker.cpp | 0 .../src}/Authenticator.cpp | 0 {src => kuksa-val-server/src}/BasicLogger.cpp | 0 {src => kuksa-val-server/src}/CMakeLists.txt | 44 +++++++++---------- .../src}/GrpcConnection.cpp | 0 .../src}/JsonResponses.cpp | 0 .../src}/MQTTPublisher.cpp | 0 .../src}/OverlayLoader.cpp | 0 {src => kuksa-val-server/src}/Readme.md | 0 .../src}/RestV1ApiHandler.cpp | 0 .../src}/SubscriptionHandler.cpp | 0 {src => kuksa-val-server/src}/VSSPath.cpp | 0 .../src}/VSSRequestValidator.cpp | 0 .../src}/VSSTypeSanitizer.cpp | 0 .../src}/VssCommandGet.cpp | 0 .../src}/VssCommandProcessor.cpp | 0 .../src}/VssCommandSet.cpp | 0 .../src}/VssCommandSubscribe.cpp | 0 .../src}/VssCommandUnsubscribe.cpp | 0 {src => kuksa-val-server/src}/VssDatabase.cpp | 0 .../src}/VssDatabase_Record.cpp | 0 .../src}/WebSockHttpFlexServer.cpp | 0 {src => kuksa-val-server/src}/grpcHandler.cpp | 0 .../src}/kuksa_viss_grpc_client.cpp | 0 {src => kuksa-val-server/src}/main.cpp | 0 .../test}/CMakeLists.txt | 8 ++-- .../test}/stresstest/Readme.md | 0 .../test}/stresstest/config.ini | 0 .../test}/stresstest/stress.py | 0 .../test}/stresstest/stressClient.py | 0 .../test}/testclient.cpp | 0 .../test}/unit-test/AccessCheckerTests.cpp | 0 .../test}/unit-test/AuthenticatorTests.cpp | 0 .../test}/unit-test/CMakeLists.txt | 6 +-- .../test}/unit-test/Gen2GetTests.cpp | 0 .../test}/unit-test/Gen2SetTests.cpp | 0 .../test}/unit-test/KuksavalUnitTest.cpp | 0 .../test}/unit-test/KuksavalUnitTest.hpp | 0 .../test}/unit-test/RestV1ApiHandlerTests.cpp | 0 .../unit-test/SubscriptionHandlerTests.cpp | 0 .../test}/unit-test/UnitTestHelpers.hpp | 0 .../test}/unit-test/UpdateMetadataTest.cpp | 0 .../test}/unit-test/UpdateVSSTreeTest.cpp | 0 .../test}/unit-test/VSSPathTests.cpp | 0 .../test}/unit-test/VSSTypeSanitizerTests.cpp | 0 .../unit-test/VssCommandProcessorTests.cpp | 0 .../test}/unit-test/VssDatabaseTests.cpp | 0 .../unit-test/kuksa_grpc_client_mock.cpp | 0 .../unit-test/mock/IAccessCheckerMock.hpp | 0 .../unit-test/mock/IAuthenticatorMock.hpp | 0 .../test}/unit-test/mock/ILoggerMock.hpp | 0 .../test}/unit-test/mock/IPublisherMock.hpp | 0 .../test}/unit-test/mock/IServerMock.hpp | 0 .../mock/ISubscriptionHandlerMock.hpp | 0 .../test}/unit-test/mock/IVssDatabaseMock.hpp | 0 .../test}/unit-test/readme.md | 0 .../test}/unit-test/test_vss_rel_2.0.json | 0 setup_build.sh | 17 ------- systemd/kuksa-val.service | 11 ----- 103 files changed, 34 insertions(+), 99 deletions(-) rename {3rd-party-libs => kuksa-val-server/3rd-party-libs}/jsoncons (100%) rename {3rd-party-libs => kuksa-val-server/3rd-party-libs}/jwt-cpp (100%) rename {3rd-party-libs => kuksa-val-server/3rd-party-libs}/turtle (100%) rename CMakeLists.txt => kuksa-val-server/CMakeLists.txt (98%) rename boost.cmake => kuksa-val-server/boost.cmake (100%) rename buildinfo.h.in => kuksa-val-server/buildinfo.h.in (100%) rename config.ini => kuksa-val-server/config.ini (100%) rename config_grpc_client.ini => kuksa-val-server/config_grpc_client.ini (100%) rename git_watcher.cmake => kuksa-val-server/git_watcher.cmake (100%) rename grpc.cmake => kuksa-val-server/grpc.cmake (100%) rename {include => kuksa-val-server/include}/AccessChecker.hpp (100%) rename {include => kuksa-val-server/include}/Authenticator.hpp (100%) rename {include => kuksa-val-server/include}/BasicLogger.hpp (100%) rename {include => kuksa-val-server/include}/GrpcConnection.hpp (100%) rename {include => kuksa-val-server/include}/JsonResponses.hpp (100%) rename {include => kuksa-val-server/include}/MQTTPublisher.hpp (100%) rename {include => kuksa-val-server/include}/OverlayLoader.hpp (100%) rename {include => kuksa-val-server/include}/RestV1ApiHandler.hpp (100%) rename {include => kuksa-val-server/include}/SubscriptionHandler.hpp (100%) rename {include => kuksa-val-server/include}/VSSPath.hpp (100%) rename {include => kuksa-val-server/include}/VSSRequestJsonSchema.hpp (100%) rename {include => kuksa-val-server/include}/VSSRequestValidator.hpp (100%) rename {include => kuksa-val-server/include}/VssCommandProcessor.hpp (100%) rename {include => kuksa-val-server/include}/VssDatabase.hpp (100%) rename {include => kuksa-val-server/include}/VssDatabase_Record.hpp (100%) rename {include => kuksa-val-server/include}/WebSockHttpFlexServer.hpp (100%) rename {include => kuksa-val-server/include}/WsChannel.hpp (100%) rename {include => kuksa-val-server/include}/exception.hpp (100%) rename {include => kuksa-val-server/include}/grpcHandler.hpp (100%) rename {include => kuksa-val-server/include}/interface/IAccessChecker.hpp (100%) rename {include => kuksa-val-server/include}/interface/IAuthenticator.hpp (100%) rename {include => kuksa-val-server/include}/interface/ILogger.hpp (100%) rename {include => kuksa-val-server/include}/interface/IPublisher.hpp (100%) rename {include => kuksa-val-server/include}/interface/IRestHandler.hpp (100%) rename {include => kuksa-val-server/include}/interface/IServer.hpp (100%) rename {include => kuksa-val-server/include}/interface/ISubscriptionHandler.hpp (100%) rename {include => kuksa-val-server/include}/interface/IVssCommandProcessor.hpp (100%) rename {include => kuksa-val-server/include}/interface/IVssDatabase.hpp (100%) rename {include => kuksa-val-server/include}/ssl_stream.hpp (100%) rename {include => kuksa-val-server/include}/visconf.hpp (100%) rename {protos => kuksa-val-server/protos}/kuksa.proto (100%) rename run_tests.sh => kuksa-val-server/run_tests.sh (100%) rename {src => kuksa-val-server/src}/AccessChecker.cpp (100%) rename {src => kuksa-val-server/src}/Authenticator.cpp (100%) rename {src => kuksa-val-server/src}/BasicLogger.cpp (100%) rename {src => kuksa-val-server/src}/CMakeLists.txt (78%) rename {src => kuksa-val-server/src}/GrpcConnection.cpp (100%) rename {src => kuksa-val-server/src}/JsonResponses.cpp (100%) rename {src => kuksa-val-server/src}/MQTTPublisher.cpp (100%) rename {src => kuksa-val-server/src}/OverlayLoader.cpp (100%) rename {src => kuksa-val-server/src}/Readme.md (100%) rename {src => kuksa-val-server/src}/RestV1ApiHandler.cpp (100%) rename {src => kuksa-val-server/src}/SubscriptionHandler.cpp (100%) rename {src => kuksa-val-server/src}/VSSPath.cpp (100%) rename {src => kuksa-val-server/src}/VSSRequestValidator.cpp (100%) rename {src => kuksa-val-server/src}/VSSTypeSanitizer.cpp (100%) rename {src => kuksa-val-server/src}/VssCommandGet.cpp (100%) rename {src => kuksa-val-server/src}/VssCommandProcessor.cpp (100%) rename {src => kuksa-val-server/src}/VssCommandSet.cpp (100%) rename {src => kuksa-val-server/src}/VssCommandSubscribe.cpp (100%) rename {src => kuksa-val-server/src}/VssCommandUnsubscribe.cpp (100%) rename {src => kuksa-val-server/src}/VssDatabase.cpp (100%) rename {src => kuksa-val-server/src}/VssDatabase_Record.cpp (100%) rename {src => kuksa-val-server/src}/WebSockHttpFlexServer.cpp (100%) rename {src => kuksa-val-server/src}/grpcHandler.cpp (100%) rename {src => kuksa-val-server/src}/kuksa_viss_grpc_client.cpp (100%) rename {src => kuksa-val-server/src}/main.cpp (100%) rename {test => kuksa-val-server/test}/CMakeLists.txt (74%) rename {test => kuksa-val-server/test}/stresstest/Readme.md (100%) rename {test => kuksa-val-server/test}/stresstest/config.ini (100%) rename {test => kuksa-val-server/test}/stresstest/stress.py (100%) rename {test => kuksa-val-server/test}/stresstest/stressClient.py (100%) rename {test => kuksa-val-server/test}/testclient.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/AccessCheckerTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/AuthenticatorTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/CMakeLists.txt (91%) rename {test => kuksa-val-server/test}/unit-test/Gen2GetTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/Gen2SetTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/KuksavalUnitTest.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/KuksavalUnitTest.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/RestV1ApiHandlerTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/SubscriptionHandlerTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/UnitTestHelpers.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/UpdateMetadataTest.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/UpdateVSSTreeTest.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/VSSPathTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/VSSTypeSanitizerTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/VssCommandProcessorTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/VssDatabaseTests.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/kuksa_grpc_client_mock.cpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/IAccessCheckerMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/IAuthenticatorMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/ILoggerMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/IPublisherMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/IServerMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/ISubscriptionHandlerMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/mock/IVssDatabaseMock.hpp (100%) rename {test => kuksa-val-server/test}/unit-test/readme.md (100%) rename {test => kuksa-val-server/test}/unit-test/test_vss_rel_2.0.json (100%) delete mode 100755 setup_build.sh delete mode 100644 systemd/kuksa-val.service diff --git a/.gitmodules b/.gitmodules index 127ced343..e2a202311 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c0b77cc0..4b22d06e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/3rd-party-libs/jsoncons b/kuksa-val-server/3rd-party-libs/jsoncons similarity index 100% rename from 3rd-party-libs/jsoncons rename to kuksa-val-server/3rd-party-libs/jsoncons diff --git a/3rd-party-libs/jwt-cpp b/kuksa-val-server/3rd-party-libs/jwt-cpp similarity index 100% rename from 3rd-party-libs/jwt-cpp rename to kuksa-val-server/3rd-party-libs/jwt-cpp diff --git a/3rd-party-libs/turtle b/kuksa-val-server/3rd-party-libs/turtle similarity index 100% rename from 3rd-party-libs/turtle rename to kuksa-val-server/3rd-party-libs/turtle diff --git a/CMakeLists.txt b/kuksa-val-server/CMakeLists.txt similarity index 98% rename from CMakeLists.txt rename to kuksa-val-server/CMakeLists.txt index a5ebda270..c3dc02d86 100644 --- a/CMakeLists.txt +++ b/kuksa-val-server/CMakeLists.txt @@ -1,6 +1,6 @@ # # ****************************************************************************** -# Copyright (c) 2018 Robert Bosch GmbH and others. +# Copyright (c) 2018-2022 Robert Bosch GmbH and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 diff --git a/boost.cmake b/kuksa-val-server/boost.cmake similarity index 100% rename from boost.cmake rename to kuksa-val-server/boost.cmake diff --git a/buildinfo.h.in b/kuksa-val-server/buildinfo.h.in similarity index 100% rename from buildinfo.h.in rename to kuksa-val-server/buildinfo.h.in diff --git a/config.ini b/kuksa-val-server/config.ini similarity index 100% rename from config.ini rename to kuksa-val-server/config.ini diff --git a/config_grpc_client.ini b/kuksa-val-server/config_grpc_client.ini similarity index 100% rename from config_grpc_client.ini rename to kuksa-val-server/config_grpc_client.ini diff --git a/git_watcher.cmake b/kuksa-val-server/git_watcher.cmake similarity index 100% rename from git_watcher.cmake rename to kuksa-val-server/git_watcher.cmake diff --git a/grpc.cmake b/kuksa-val-server/grpc.cmake similarity index 100% rename from grpc.cmake rename to kuksa-val-server/grpc.cmake diff --git a/include/AccessChecker.hpp b/kuksa-val-server/include/AccessChecker.hpp similarity index 100% rename from include/AccessChecker.hpp rename to kuksa-val-server/include/AccessChecker.hpp diff --git a/include/Authenticator.hpp b/kuksa-val-server/include/Authenticator.hpp similarity index 100% rename from include/Authenticator.hpp rename to kuksa-val-server/include/Authenticator.hpp diff --git a/include/BasicLogger.hpp b/kuksa-val-server/include/BasicLogger.hpp similarity index 100% rename from include/BasicLogger.hpp rename to kuksa-val-server/include/BasicLogger.hpp diff --git a/include/GrpcConnection.hpp b/kuksa-val-server/include/GrpcConnection.hpp similarity index 100% rename from include/GrpcConnection.hpp rename to kuksa-val-server/include/GrpcConnection.hpp diff --git a/include/JsonResponses.hpp b/kuksa-val-server/include/JsonResponses.hpp similarity index 100% rename from include/JsonResponses.hpp rename to kuksa-val-server/include/JsonResponses.hpp diff --git a/include/MQTTPublisher.hpp b/kuksa-val-server/include/MQTTPublisher.hpp similarity index 100% rename from include/MQTTPublisher.hpp rename to kuksa-val-server/include/MQTTPublisher.hpp diff --git a/include/OverlayLoader.hpp b/kuksa-val-server/include/OverlayLoader.hpp similarity index 100% rename from include/OverlayLoader.hpp rename to kuksa-val-server/include/OverlayLoader.hpp diff --git a/include/RestV1ApiHandler.hpp b/kuksa-val-server/include/RestV1ApiHandler.hpp similarity index 100% rename from include/RestV1ApiHandler.hpp rename to kuksa-val-server/include/RestV1ApiHandler.hpp diff --git a/include/SubscriptionHandler.hpp b/kuksa-val-server/include/SubscriptionHandler.hpp similarity index 100% rename from include/SubscriptionHandler.hpp rename to kuksa-val-server/include/SubscriptionHandler.hpp diff --git a/include/VSSPath.hpp b/kuksa-val-server/include/VSSPath.hpp similarity index 100% rename from include/VSSPath.hpp rename to kuksa-val-server/include/VSSPath.hpp diff --git a/include/VSSRequestJsonSchema.hpp b/kuksa-val-server/include/VSSRequestJsonSchema.hpp similarity index 100% rename from include/VSSRequestJsonSchema.hpp rename to kuksa-val-server/include/VSSRequestJsonSchema.hpp diff --git a/include/VSSRequestValidator.hpp b/kuksa-val-server/include/VSSRequestValidator.hpp similarity index 100% rename from include/VSSRequestValidator.hpp rename to kuksa-val-server/include/VSSRequestValidator.hpp diff --git a/include/VssCommandProcessor.hpp b/kuksa-val-server/include/VssCommandProcessor.hpp similarity index 100% rename from include/VssCommandProcessor.hpp rename to kuksa-val-server/include/VssCommandProcessor.hpp diff --git a/include/VssDatabase.hpp b/kuksa-val-server/include/VssDatabase.hpp similarity index 100% rename from include/VssDatabase.hpp rename to kuksa-val-server/include/VssDatabase.hpp diff --git a/include/VssDatabase_Record.hpp b/kuksa-val-server/include/VssDatabase_Record.hpp similarity index 100% rename from include/VssDatabase_Record.hpp rename to kuksa-val-server/include/VssDatabase_Record.hpp diff --git a/include/WebSockHttpFlexServer.hpp b/kuksa-val-server/include/WebSockHttpFlexServer.hpp similarity index 100% rename from include/WebSockHttpFlexServer.hpp rename to kuksa-val-server/include/WebSockHttpFlexServer.hpp diff --git a/include/WsChannel.hpp b/kuksa-val-server/include/WsChannel.hpp similarity index 100% rename from include/WsChannel.hpp rename to kuksa-val-server/include/WsChannel.hpp diff --git a/include/exception.hpp b/kuksa-val-server/include/exception.hpp similarity index 100% rename from include/exception.hpp rename to kuksa-val-server/include/exception.hpp diff --git a/include/grpcHandler.hpp b/kuksa-val-server/include/grpcHandler.hpp similarity index 100% rename from include/grpcHandler.hpp rename to kuksa-val-server/include/grpcHandler.hpp diff --git a/include/interface/IAccessChecker.hpp b/kuksa-val-server/include/interface/IAccessChecker.hpp similarity index 100% rename from include/interface/IAccessChecker.hpp rename to kuksa-val-server/include/interface/IAccessChecker.hpp diff --git a/include/interface/IAuthenticator.hpp b/kuksa-val-server/include/interface/IAuthenticator.hpp similarity index 100% rename from include/interface/IAuthenticator.hpp rename to kuksa-val-server/include/interface/IAuthenticator.hpp diff --git a/include/interface/ILogger.hpp b/kuksa-val-server/include/interface/ILogger.hpp similarity index 100% rename from include/interface/ILogger.hpp rename to kuksa-val-server/include/interface/ILogger.hpp diff --git a/include/interface/IPublisher.hpp b/kuksa-val-server/include/interface/IPublisher.hpp similarity index 100% rename from include/interface/IPublisher.hpp rename to kuksa-val-server/include/interface/IPublisher.hpp diff --git a/include/interface/IRestHandler.hpp b/kuksa-val-server/include/interface/IRestHandler.hpp similarity index 100% rename from include/interface/IRestHandler.hpp rename to kuksa-val-server/include/interface/IRestHandler.hpp diff --git a/include/interface/IServer.hpp b/kuksa-val-server/include/interface/IServer.hpp similarity index 100% rename from include/interface/IServer.hpp rename to kuksa-val-server/include/interface/IServer.hpp diff --git a/include/interface/ISubscriptionHandler.hpp b/kuksa-val-server/include/interface/ISubscriptionHandler.hpp similarity index 100% rename from include/interface/ISubscriptionHandler.hpp rename to kuksa-val-server/include/interface/ISubscriptionHandler.hpp diff --git a/include/interface/IVssCommandProcessor.hpp b/kuksa-val-server/include/interface/IVssCommandProcessor.hpp similarity index 100% rename from include/interface/IVssCommandProcessor.hpp rename to kuksa-val-server/include/interface/IVssCommandProcessor.hpp diff --git a/include/interface/IVssDatabase.hpp b/kuksa-val-server/include/interface/IVssDatabase.hpp similarity index 100% rename from include/interface/IVssDatabase.hpp rename to kuksa-val-server/include/interface/IVssDatabase.hpp diff --git a/include/ssl_stream.hpp b/kuksa-val-server/include/ssl_stream.hpp similarity index 100% rename from include/ssl_stream.hpp rename to kuksa-val-server/include/ssl_stream.hpp diff --git a/include/visconf.hpp b/kuksa-val-server/include/visconf.hpp similarity index 100% rename from include/visconf.hpp rename to kuksa-val-server/include/visconf.hpp diff --git a/protos/kuksa.proto b/kuksa-val-server/protos/kuksa.proto similarity index 100% rename from protos/kuksa.proto rename to kuksa-val-server/protos/kuksa.proto diff --git a/run_tests.sh b/kuksa-val-server/run_tests.sh similarity index 100% rename from run_tests.sh rename to kuksa-val-server/run_tests.sh diff --git a/src/AccessChecker.cpp b/kuksa-val-server/src/AccessChecker.cpp similarity index 100% rename from src/AccessChecker.cpp rename to kuksa-val-server/src/AccessChecker.cpp diff --git a/src/Authenticator.cpp b/kuksa-val-server/src/Authenticator.cpp similarity index 100% rename from src/Authenticator.cpp rename to kuksa-val-server/src/Authenticator.cpp diff --git a/src/BasicLogger.cpp b/kuksa-val-server/src/BasicLogger.cpp similarity index 100% rename from src/BasicLogger.cpp rename to kuksa-val-server/src/BasicLogger.cpp diff --git a/src/CMakeLists.txt b/kuksa-val-server/src/CMakeLists.txt similarity index 78% rename from src/CMakeLists.txt rename to kuksa-val-server/src/CMakeLists.txt index 0ff5f9cb3..c78655f33 100644 --- a/src/CMakeLists.txt +++ b/kuksa-val-server/src/CMakeLists.txt @@ -1,6 +1,6 @@ # # ****************************************************************************** -# Copyright (c) 2018 Robert Bosch GmbH and others. +# Copyright (c) 2018-2022 Robert Bosch GmbH and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 @@ -162,28 +162,28 @@ if(BUILD_EXE) ###### # Setup server install and packaging - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/jwt/jwt.key.pub ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Server.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Server.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/CA.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.0.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.1.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.2.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/jwt/jwt.key.pub ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Server.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Server.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/CA.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.0.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.1.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.2.json ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../config.ini ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../config_grpc_client.ini ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) install( TARGETS ${SERVER_EXE_NAME} DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/jwt/jwt.key.pub DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Server.pem DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Server.key DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.pem DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.key DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/CA.pem DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.0.json DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.1.json DESTINATION bin/${SERVER_EXE_NAME}) - install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../data/vss-core/vss_release_2.2.json DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/jwt/jwt.key.pub DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Server.pem DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Server.key DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.pem DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.key DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/CA.pem DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.0.json DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.1.json DESTINATION bin/${SERVER_EXE_NAME}) + install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.2.json DESTINATION bin/${SERVER_EXE_NAME}) #GRPC client @@ -215,15 +215,15 @@ if(BUILD_EXE) set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) - SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../README.md") - SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE") + SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../README.md") + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../../LICENSE") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") SET(CPACK_GENERATOR "DEB;TGZ") SET(CPACK_STRIP_FILES "bin/${SERVER_EXE_NAME}") SET(CPACK_SOURCE_STRIP_FILES "") - SET(CPACK_PACKAGE_EXECUTABLES "${SERVER_EXE_NAME}" "W3C VSS server") + SET(CPACK_PACKAGE_EXECUTABLES "${SERVER_EXE_NAME}" "Kuksa.VAL VSS server") # Debian specifics SET(DEPENDENCY_LIBRARY_LIST diff --git a/src/GrpcConnection.cpp b/kuksa-val-server/src/GrpcConnection.cpp similarity index 100% rename from src/GrpcConnection.cpp rename to kuksa-val-server/src/GrpcConnection.cpp diff --git a/src/JsonResponses.cpp b/kuksa-val-server/src/JsonResponses.cpp similarity index 100% rename from src/JsonResponses.cpp rename to kuksa-val-server/src/JsonResponses.cpp diff --git a/src/MQTTPublisher.cpp b/kuksa-val-server/src/MQTTPublisher.cpp similarity index 100% rename from src/MQTTPublisher.cpp rename to kuksa-val-server/src/MQTTPublisher.cpp diff --git a/src/OverlayLoader.cpp b/kuksa-val-server/src/OverlayLoader.cpp similarity index 100% rename from src/OverlayLoader.cpp rename to kuksa-val-server/src/OverlayLoader.cpp diff --git a/src/Readme.md b/kuksa-val-server/src/Readme.md similarity index 100% rename from src/Readme.md rename to kuksa-val-server/src/Readme.md diff --git a/src/RestV1ApiHandler.cpp b/kuksa-val-server/src/RestV1ApiHandler.cpp similarity index 100% rename from src/RestV1ApiHandler.cpp rename to kuksa-val-server/src/RestV1ApiHandler.cpp diff --git a/src/SubscriptionHandler.cpp b/kuksa-val-server/src/SubscriptionHandler.cpp similarity index 100% rename from src/SubscriptionHandler.cpp rename to kuksa-val-server/src/SubscriptionHandler.cpp diff --git a/src/VSSPath.cpp b/kuksa-val-server/src/VSSPath.cpp similarity index 100% rename from src/VSSPath.cpp rename to kuksa-val-server/src/VSSPath.cpp diff --git a/src/VSSRequestValidator.cpp b/kuksa-val-server/src/VSSRequestValidator.cpp similarity index 100% rename from src/VSSRequestValidator.cpp rename to kuksa-val-server/src/VSSRequestValidator.cpp diff --git a/src/VSSTypeSanitizer.cpp b/kuksa-val-server/src/VSSTypeSanitizer.cpp similarity index 100% rename from src/VSSTypeSanitizer.cpp rename to kuksa-val-server/src/VSSTypeSanitizer.cpp diff --git a/src/VssCommandGet.cpp b/kuksa-val-server/src/VssCommandGet.cpp similarity index 100% rename from src/VssCommandGet.cpp rename to kuksa-val-server/src/VssCommandGet.cpp diff --git a/src/VssCommandProcessor.cpp b/kuksa-val-server/src/VssCommandProcessor.cpp similarity index 100% rename from src/VssCommandProcessor.cpp rename to kuksa-val-server/src/VssCommandProcessor.cpp diff --git a/src/VssCommandSet.cpp b/kuksa-val-server/src/VssCommandSet.cpp similarity index 100% rename from src/VssCommandSet.cpp rename to kuksa-val-server/src/VssCommandSet.cpp diff --git a/src/VssCommandSubscribe.cpp b/kuksa-val-server/src/VssCommandSubscribe.cpp similarity index 100% rename from src/VssCommandSubscribe.cpp rename to kuksa-val-server/src/VssCommandSubscribe.cpp diff --git a/src/VssCommandUnsubscribe.cpp b/kuksa-val-server/src/VssCommandUnsubscribe.cpp similarity index 100% rename from src/VssCommandUnsubscribe.cpp rename to kuksa-val-server/src/VssCommandUnsubscribe.cpp diff --git a/src/VssDatabase.cpp b/kuksa-val-server/src/VssDatabase.cpp similarity index 100% rename from src/VssDatabase.cpp rename to kuksa-val-server/src/VssDatabase.cpp diff --git a/src/VssDatabase_Record.cpp b/kuksa-val-server/src/VssDatabase_Record.cpp similarity index 100% rename from src/VssDatabase_Record.cpp rename to kuksa-val-server/src/VssDatabase_Record.cpp diff --git a/src/WebSockHttpFlexServer.cpp b/kuksa-val-server/src/WebSockHttpFlexServer.cpp similarity index 100% rename from src/WebSockHttpFlexServer.cpp rename to kuksa-val-server/src/WebSockHttpFlexServer.cpp diff --git a/src/grpcHandler.cpp b/kuksa-val-server/src/grpcHandler.cpp similarity index 100% rename from src/grpcHandler.cpp rename to kuksa-val-server/src/grpcHandler.cpp diff --git a/src/kuksa_viss_grpc_client.cpp b/kuksa-val-server/src/kuksa_viss_grpc_client.cpp similarity index 100% rename from src/kuksa_viss_grpc_client.cpp rename to kuksa-val-server/src/kuksa_viss_grpc_client.cpp diff --git a/src/main.cpp b/kuksa-val-server/src/main.cpp similarity index 100% rename from src/main.cpp rename to kuksa-val-server/src/main.cpp diff --git a/test/CMakeLists.txt b/kuksa-val-server/test/CMakeLists.txt similarity index 74% rename from test/CMakeLists.txt rename to kuksa-val-server/test/CMakeLists.txt index c00063ca7..22bff2dfc 100644 --- a/test/CMakeLists.txt +++ b/kuksa-val-server/test/CMakeLists.txt @@ -1,6 +1,6 @@ # # ****************************************************************************** -# Copyright (c) 2018 Robert Bosch GmbH and others. +# Copyright (c) 2018-2022 Robert Bosch GmbH and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 @@ -37,8 +37,8 @@ if(BUILD_TEST_CLIENT) target_link_libraries(${TESTCLIENT_EXE_NAME} PRIVATE ${Boost_LIBRARIES}) target_link_libraries(${TESTCLIENT_EXE_NAME} PRIVATE ${OPENSSL_LIBRARIES}) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/Client.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../kuksa_certificates/CA.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/Client.key ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/CA.pem ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) endif(BUILD_TEST_CLIENT) diff --git a/test/stresstest/Readme.md b/kuksa-val-server/test/stresstest/Readme.md similarity index 100% rename from test/stresstest/Readme.md rename to kuksa-val-server/test/stresstest/Readme.md diff --git a/test/stresstest/config.ini b/kuksa-val-server/test/stresstest/config.ini similarity index 100% rename from test/stresstest/config.ini rename to kuksa-val-server/test/stresstest/config.ini diff --git a/test/stresstest/stress.py b/kuksa-val-server/test/stresstest/stress.py similarity index 100% rename from test/stresstest/stress.py rename to kuksa-val-server/test/stresstest/stress.py diff --git a/test/stresstest/stressClient.py b/kuksa-val-server/test/stresstest/stressClient.py similarity index 100% rename from test/stresstest/stressClient.py rename to kuksa-val-server/test/stresstest/stressClient.py diff --git a/test/testclient.cpp b/kuksa-val-server/test/testclient.cpp similarity index 100% rename from test/testclient.cpp rename to kuksa-val-server/test/testclient.cpp diff --git a/test/unit-test/AccessCheckerTests.cpp b/kuksa-val-server/test/unit-test/AccessCheckerTests.cpp similarity index 100% rename from test/unit-test/AccessCheckerTests.cpp rename to kuksa-val-server/test/unit-test/AccessCheckerTests.cpp diff --git a/test/unit-test/AuthenticatorTests.cpp b/kuksa-val-server/test/unit-test/AuthenticatorTests.cpp similarity index 100% rename from test/unit-test/AuthenticatorTests.cpp rename to kuksa-val-server/test/unit-test/AuthenticatorTests.cpp diff --git a/test/unit-test/CMakeLists.txt b/kuksa-val-server/test/unit-test/CMakeLists.txt similarity index 91% rename from test/unit-test/CMakeLists.txt rename to kuksa-val-server/test/unit-test/CMakeLists.txt index 873d604a0..bde1fa8dd 100644 --- a/test/unit-test/CMakeLists.txt +++ b/kuksa-val-server/test/unit-test/CMakeLists.txt @@ -1,6 +1,6 @@ # # ****************************************************************************** -# Copyright (c) 2018 Robert Bosch GmbH and others. +# Copyright (c) 2018-2022 Robert Bosch GmbH and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 @@ -89,12 +89,12 @@ if(BUILD_UNIT_TEST) target_link_libraries(${UNITTEST_EXE_NAME} PRIVATE ${OPENSSL_LIBRARIES}) target_link_libraries(${UNITTEST_EXE_NAME} PRIVATE jsoncons jwt-cpp gtest_main gmock) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../data/vss-core/vss_release_2.2.json ${CMAKE_CURRENT_BINARY_DIR}/test_vss_rel_2.2.json COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../data/vss-core/vss_release_2.2.json ${CMAKE_CURRENT_BINARY_DIR}/test_vss_rel_2.2.json COPYONLY) # old test json file to satisfy old test cases configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_vss_rel_2.0.json ${CMAKE_CURRENT_BINARY_DIR}/test_vss_rel_2.0.json COPYONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../kuksa_certificates/jwt/jwt.key.pub ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../kuksa_certificates/jwt/jwt.key.pub ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) if (ENABLE_COVERAGE) add_coverage(${UNITTEST_EXE_NAME}) endif() diff --git a/test/unit-test/Gen2GetTests.cpp b/kuksa-val-server/test/unit-test/Gen2GetTests.cpp similarity index 100% rename from test/unit-test/Gen2GetTests.cpp rename to kuksa-val-server/test/unit-test/Gen2GetTests.cpp diff --git a/test/unit-test/Gen2SetTests.cpp b/kuksa-val-server/test/unit-test/Gen2SetTests.cpp similarity index 100% rename from test/unit-test/Gen2SetTests.cpp rename to kuksa-val-server/test/unit-test/Gen2SetTests.cpp diff --git a/test/unit-test/KuksavalUnitTest.cpp b/kuksa-val-server/test/unit-test/KuksavalUnitTest.cpp similarity index 100% rename from test/unit-test/KuksavalUnitTest.cpp rename to kuksa-val-server/test/unit-test/KuksavalUnitTest.cpp diff --git a/test/unit-test/KuksavalUnitTest.hpp b/kuksa-val-server/test/unit-test/KuksavalUnitTest.hpp similarity index 100% rename from test/unit-test/KuksavalUnitTest.hpp rename to kuksa-val-server/test/unit-test/KuksavalUnitTest.hpp diff --git a/test/unit-test/RestV1ApiHandlerTests.cpp b/kuksa-val-server/test/unit-test/RestV1ApiHandlerTests.cpp similarity index 100% rename from test/unit-test/RestV1ApiHandlerTests.cpp rename to kuksa-val-server/test/unit-test/RestV1ApiHandlerTests.cpp diff --git a/test/unit-test/SubscriptionHandlerTests.cpp b/kuksa-val-server/test/unit-test/SubscriptionHandlerTests.cpp similarity index 100% rename from test/unit-test/SubscriptionHandlerTests.cpp rename to kuksa-val-server/test/unit-test/SubscriptionHandlerTests.cpp diff --git a/test/unit-test/UnitTestHelpers.hpp b/kuksa-val-server/test/unit-test/UnitTestHelpers.hpp similarity index 100% rename from test/unit-test/UnitTestHelpers.hpp rename to kuksa-val-server/test/unit-test/UnitTestHelpers.hpp diff --git a/test/unit-test/UpdateMetadataTest.cpp b/kuksa-val-server/test/unit-test/UpdateMetadataTest.cpp similarity index 100% rename from test/unit-test/UpdateMetadataTest.cpp rename to kuksa-val-server/test/unit-test/UpdateMetadataTest.cpp diff --git a/test/unit-test/UpdateVSSTreeTest.cpp b/kuksa-val-server/test/unit-test/UpdateVSSTreeTest.cpp similarity index 100% rename from test/unit-test/UpdateVSSTreeTest.cpp rename to kuksa-val-server/test/unit-test/UpdateVSSTreeTest.cpp diff --git a/test/unit-test/VSSPathTests.cpp b/kuksa-val-server/test/unit-test/VSSPathTests.cpp similarity index 100% rename from test/unit-test/VSSPathTests.cpp rename to kuksa-val-server/test/unit-test/VSSPathTests.cpp diff --git a/test/unit-test/VSSTypeSanitizerTests.cpp b/kuksa-val-server/test/unit-test/VSSTypeSanitizerTests.cpp similarity index 100% rename from test/unit-test/VSSTypeSanitizerTests.cpp rename to kuksa-val-server/test/unit-test/VSSTypeSanitizerTests.cpp diff --git a/test/unit-test/VssCommandProcessorTests.cpp b/kuksa-val-server/test/unit-test/VssCommandProcessorTests.cpp similarity index 100% rename from test/unit-test/VssCommandProcessorTests.cpp rename to kuksa-val-server/test/unit-test/VssCommandProcessorTests.cpp diff --git a/test/unit-test/VssDatabaseTests.cpp b/kuksa-val-server/test/unit-test/VssDatabaseTests.cpp similarity index 100% rename from test/unit-test/VssDatabaseTests.cpp rename to kuksa-val-server/test/unit-test/VssDatabaseTests.cpp diff --git a/test/unit-test/kuksa_grpc_client_mock.cpp b/kuksa-val-server/test/unit-test/kuksa_grpc_client_mock.cpp similarity index 100% rename from test/unit-test/kuksa_grpc_client_mock.cpp rename to kuksa-val-server/test/unit-test/kuksa_grpc_client_mock.cpp diff --git a/test/unit-test/mock/IAccessCheckerMock.hpp b/kuksa-val-server/test/unit-test/mock/IAccessCheckerMock.hpp similarity index 100% rename from test/unit-test/mock/IAccessCheckerMock.hpp rename to kuksa-val-server/test/unit-test/mock/IAccessCheckerMock.hpp diff --git a/test/unit-test/mock/IAuthenticatorMock.hpp b/kuksa-val-server/test/unit-test/mock/IAuthenticatorMock.hpp similarity index 100% rename from test/unit-test/mock/IAuthenticatorMock.hpp rename to kuksa-val-server/test/unit-test/mock/IAuthenticatorMock.hpp diff --git a/test/unit-test/mock/ILoggerMock.hpp b/kuksa-val-server/test/unit-test/mock/ILoggerMock.hpp similarity index 100% rename from test/unit-test/mock/ILoggerMock.hpp rename to kuksa-val-server/test/unit-test/mock/ILoggerMock.hpp diff --git a/test/unit-test/mock/IPublisherMock.hpp b/kuksa-val-server/test/unit-test/mock/IPublisherMock.hpp similarity index 100% rename from test/unit-test/mock/IPublisherMock.hpp rename to kuksa-val-server/test/unit-test/mock/IPublisherMock.hpp diff --git a/test/unit-test/mock/IServerMock.hpp b/kuksa-val-server/test/unit-test/mock/IServerMock.hpp similarity index 100% rename from test/unit-test/mock/IServerMock.hpp rename to kuksa-val-server/test/unit-test/mock/IServerMock.hpp diff --git a/test/unit-test/mock/ISubscriptionHandlerMock.hpp b/kuksa-val-server/test/unit-test/mock/ISubscriptionHandlerMock.hpp similarity index 100% rename from test/unit-test/mock/ISubscriptionHandlerMock.hpp rename to kuksa-val-server/test/unit-test/mock/ISubscriptionHandlerMock.hpp diff --git a/test/unit-test/mock/IVssDatabaseMock.hpp b/kuksa-val-server/test/unit-test/mock/IVssDatabaseMock.hpp similarity index 100% rename from test/unit-test/mock/IVssDatabaseMock.hpp rename to kuksa-val-server/test/unit-test/mock/IVssDatabaseMock.hpp diff --git a/test/unit-test/readme.md b/kuksa-val-server/test/unit-test/readme.md similarity index 100% rename from test/unit-test/readme.md rename to kuksa-val-server/test/unit-test/readme.md diff --git a/test/unit-test/test_vss_rel_2.0.json b/kuksa-val-server/test/unit-test/test_vss_rel_2.0.json similarity index 100% rename from test/unit-test/test_vss_rel_2.0.json rename to kuksa-val-server/test/unit-test/test_vss_rel_2.0.json diff --git a/setup_build.sh b/setup_build.sh deleted file mode 100755 index 400c932bc..000000000 --- a/setup_build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - - #Generate the public key from private key in demo-certs directory - openssl rsa -in ./kuksa_certificates/Client.key -pubout -outform PEM -out ./kuksa_certificates/jwt.pub.key - - rm -rf build - mkdir -p build - - cd build - cmake -DBUILD_TEST_CLIENT=ON .. - - #for time being use native boost lib which is v1.67 - #cmake -DBOOST_ROOT=/home/tspreck/kuksa.libs/libs-built/boost1.67 .. - - #boost v1.72.0 not curently compatible with project! - #cmake -DBOOST_ROOT=/home/tspreck/kuksa.libs/libs-built/boost1.72.0 .. - diff --git a/systemd/kuksa-val.service b/systemd/kuksa-val.service deleted file mode 100644 index 6ef058229..000000000 --- a/systemd/kuksa-val.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=w3c VIS server -After=network.target - -[Service] -WorkingDirectory=/usr/bin/kuksa-val-server -ExecStart=/usr/bin/kuksa-val/kuksa-val-server -Restart=on-abort - -[Install] -WantedBy=multi-user.target From 13aff306b5624a7fe3b3da17152a17ec4d4e2c28 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Tue, 24 May 2022 06:40:59 +0000 Subject: [PATCH 2/7] Fix Github Actions after moving Signed-off-by: Sebastian Schildt --- .github/actions/unit-test/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/unit-test/action.yml b/.github/actions/unit-test/action.yml index 4a86716e4..17eca253b 100644 --- a/.github/actions/unit-test/action.yml +++ b/.github/actions/unit-test/action.yml @@ -7,4 +7,6 @@ runs: args: - -a - out + - -b + - kuksa-val-server/build From 0e8e24a570ed9ec901d237e980c9b476bc234557 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Tue, 24 May 2022 22:20:47 +0200 Subject: [PATCH 3/7] Adapt Dockerfile for kuksa-val-server build Signed-off-by: Sebastian Schildt --- docker/Dockerfile | 4 ++-- docker/Dockerfile.dev | 4 ++-- docker/collect-deployment-artifacts.sh | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f6a3d7fd5..59c3fee64 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -39,8 +39,8 @@ RUN make -j 6 RUN make install ADD . /kuksa.val -RUN rm -rf /kuksa.val/build && mkdir /kuksa.val/build -WORKDIR /kuksa.val/build +RUN rm -rf /kuksa.val/kuksa-val-server/build && mkdir /kuksa.val/kuksa-val-server/build +WORKDIR /kuksa.val/kuksa-val-server/build RUN cmake .. RUN make -j 4 RUN ls diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index a7c2f4e04..808f10410 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -32,8 +32,8 @@ RUN ./b2 -j 6 install ADD . /kuksa.val -RUN rm -rf /kuksa.val/build && mkdir /kuksa.val/build -WORKDIR /kuksa.val/build +RUN rm -rf /kuksa.val/kuksa-val-server/build && mkdir /kuksa.val/kuksa-val-server/build +WORKDIR /kuksa.val/kuksa-val-server/build RUN cmake .. -DBUILD_UNIT_TEST=ON -DCMAKE_BUILD_TYPE=Coverage RUN make -j8 diff --git a/docker/collect-deployment-artifacts.sh b/docker/collect-deployment-artifacts.sh index ded107567..3762e0627 100755 --- a/docker/collect-deployment-artifacts.sh +++ b/docker/collect-deployment-artifacts.sh @@ -10,15 +10,15 @@ # Helper script to collect executables, config and libraries needed for minimal docker mkdir /deploy -cp /kuksa.val/build/src/kuksa-val-server /deploy +cp /kuksa.val/kuksa-val-server/build/src/kuksa-val-server /deploy cp /kuksa.val/docker/startkuksaval.sh /deploy -ldd /kuksa.val/build/src/kuksa-val-server | grep "=>" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /deploy +ldd /kuksa.val/kuksa-val-server/build/src/kuksa-val-server | grep "=>" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /deploy mkdir /deploy/exampleconfig mkdir /deploy/exampleconfig/certs -cp /kuksa.val/build/src/config.ini /deploy/exampleconfig/config.ini -cp /kuksa.val/build/src/vss_release_2.2.json /deploy/exampleconfig/vss.json +cp /kuksa.val/kuksa-val-server/build/src/config.ini /deploy/exampleconfig/config.ini +cp /kuksa.val/kuksa-val-server/build/src/vss_release_2.2.json /deploy/exampleconfig/vss.json cp -r /kuksa.val/kuksa_certificates/* /deploy/exampleconfig/certs/ From 590642d470f2bdc3bac3984be6cd8f251c46f951 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Wed, 25 May 2022 12:50:33 +0200 Subject: [PATCH 4/7] Fix working dir for Jenkins test run Signed-off-by: Sebastian Schildt --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5da522c79..880719879 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ node('docker') { } } 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') ]] From cc9ad4853b22db8aeb5d18860ad7c0a0a0f69590 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Wed, 25 May 2022 22:02:06 +0200 Subject: [PATCH 5/7] Moving docker files Signed-off-by: Sebastian Schildt --- .github/workflows/kuksa_val_docker_amd64.yml | 2 +- .github/workflows/kuksa_val_docker_arm64.yml | 2 +- Jenkinsfile | 6 ++--- doc/build-docker.md | 24 +++--------------- docker/build-clang-coverage.sh | 25 ------------------- docker/build-gcc-coverage.sh | 22 ---------------- .../docker}/Dockerfile | 0 .../docker}/Dockerfile.dev | 0 .../docker}/collect-deployment-artifacts.sh | 0 .../docker}/startkuksaval.sh | 0 10 files changed, 8 insertions(+), 73 deletions(-) delete mode 100755 docker/build-clang-coverage.sh delete mode 100755 docker/build-gcc-coverage.sh rename {docker => kuksa-val-server/docker}/Dockerfile (100%) rename {docker => kuksa-val-server/docker}/Dockerfile.dev (100%) rename {docker => kuksa-val-server/docker}/collect-deployment-artifacts.sh (100%) rename {docker => kuksa-val-server/docker}/startkuksaval.sh (100%) diff --git a/.github/workflows/kuksa_val_docker_amd64.yml b/.github/workflows/kuksa_val_docker_amd64.yml index 9c9ead5bf..bcaef8fff 100644 --- a/.github/workflows/kuksa_val_docker_amd64.yml +++ b/.github/workflows/kuksa_val_docker_amd64.yml @@ -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 diff --git a/.github/workflows/kuksa_val_docker_arm64.yml b/.github/workflows/kuksa_val_docker_arm64.yml index 540d03c3a..aa9c3c12d 100644 --- a/.github/workflows/kuksa_val_docker_arm64.yml +++ b/.github/workflows/kuksa_val_docker_arm64.yml @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 880719879..e14d632ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,18 +26,18 @@ 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" } } diff --git a/doc/build-docker.md b/doc/build-docker.md index f50d03067..cf829c999 100644 --- a/doc/build-docker.md +++ b/doc/build-docker.md @@ -4,17 +4,15 @@ You can build a docker image for KUKSA.val go to the root of your working copy and execute ``` -docker build -f ./docker/Dockerfile -t arm64/kuksa-val:myversion . +docker build -f ./kuksa-val-server/docker/Dockerfile -t arm64/kuksa-val:myversion . ``` -To build the testclient, it expects some default JWT tokens in the current build context. For details check the vss-client [build.sh script](../clients/vss-testclient/build.sh). - You can cross compile an image for other platforms such as `arm64` using dockers `buildx` feature. To set up buildx check the official documentation https://docs.docker.com/buildx/working-with-buildx/. If you have a running buildx setup you can create an arm64 image using ```bash -docker buildx build --platform=linux/arm64 -f ./docker/Dockerfile -t arm64/kuksa-val:myversion . +docker buildx build --platform=linux/arm64 -f ./kuksa-val-server/docker/Dockerfile -t arm64/kuksa-val:myversion . ``` @@ -24,22 +22,6 @@ Not optimized at all, just gets Ubuntu installed and does a first compile. Will To build go to kuksa.val main dir and do ``` -docker build -f docker/Dockerfile.dev -t kuksavaltest . +docker build -f ./kuksa-val-server/docker/Dockerfile.dev -t kuksavaltest . ``` - -## Advanced docker -_Warning_: This section may be out-of date - -Beside all of dependencies already prepared, container image has additional build scripts to help with building of W3C-Server. -Depending on compiler needed, scripts below provide simple initial build configuration to be used and|or extended upon: - - [docker/build-gcc-default.sh](docker/build-gcc-default.sh), - - [docker/build-gcc-coverage.sh](docker/build-gcc-coverage.sh), - - [docker/build-clang-default.sh](docker/build-clang-default.sh), - - [docker/build-clang-coverage.sh](docker/build-clang-coverage.sh) - -In container, scripts are located by default in the `/home/` directory. -Both [build-gcc-default.sh](docker/build-gcc-default.sh) and [build-clang-default.sh](docker/build-clang-default.sh) scripts accept parameters which will be provided to CMake configuration, so user can provide different options to extend default build (e.g add unit test to build). - -**Note:** Default path to git repo in the scripts is set to `/home/kuksa.invehicle`. If host path of the git repo, or internally cloned one, is located on different container path, make sure to update scripts accordingly. - diff --git a/docker/build-clang-coverage.sh b/docker/build-clang-coverage.sh deleted file mode 100755 index 9e0789b4f..000000000 --- a/docker/build-clang-coverage.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -######## -# Build and generate coverage based on unit-tests by default - -# Make or goto out-of-source build Directory -mkdir -p build2 -cd build - -# Configure build -CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_UNIT_TEST=ON .. - -# make everything needed -make -j8 - -mkdir -p coverage-report - -# goto and run unit-tests -ctest - -# convert raw coverage data to indexed -llvm-profdata merge -sparse default.profraw -o default.profdata - -# generate coverage information with llvm-cov -llvm-cov show --format=html ../src/libkuksa-val-server-core.so -instr-profile=default.profdata > ../coverage-report/coverage.html diff --git a/docker/build-gcc-coverage.sh b/docker/build-gcc-coverage.sh deleted file mode 100755 index 50fda9f5c..000000000 --- a/docker/build-gcc-coverage.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -######## -# Build and generate coverage based on unit-tests by default - -# Make or goto out-of-source build Directory -mkdir -p build_test -cd build_test - -# Configure build -CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_UNIT_TEST=ON .. - -# Build -make -j8 - -# goto and run unit-tests -ctest - -mkdir -p coverage-report - -# generate coverage information with gcovr -gcovr -v --html -r ../src/ src/ -o coverage-report/coverage.html diff --git a/docker/Dockerfile b/kuksa-val-server/docker/Dockerfile similarity index 100% rename from docker/Dockerfile rename to kuksa-val-server/docker/Dockerfile diff --git a/docker/Dockerfile.dev b/kuksa-val-server/docker/Dockerfile.dev similarity index 100% rename from docker/Dockerfile.dev rename to kuksa-val-server/docker/Dockerfile.dev diff --git a/docker/collect-deployment-artifacts.sh b/kuksa-val-server/docker/collect-deployment-artifacts.sh similarity index 100% rename from docker/collect-deployment-artifacts.sh rename to kuksa-val-server/docker/collect-deployment-artifacts.sh diff --git a/docker/startkuksaval.sh b/kuksa-val-server/docker/startkuksaval.sh similarity index 100% rename from docker/startkuksaval.sh rename to kuksa-val-server/docker/startkuksaval.sh From 6a4cc588809bb9389afa02d6e49b1e228042ffb1 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Wed, 25 May 2022 23:18:54 +0200 Subject: [PATCH 6/7] Split kuksa-val-server Readme Signed-off-by: Sebastian Schildt --- README.md | 157 ++++--------------------------------- kuksa-val-server/README.md | 157 +++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 142 deletions(-) create mode 100644 kuksa-val-server/README.md diff --git a/README.md b/README.md index 221f629b0..7c05c6adb 100644 --- a/README.md +++ b/README.md @@ -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 -``` diff --git a/kuksa-val-server/README.md b/kuksa-val-server/README.md new file mode 100644 index 000000000..b43735a42 --- /dev/null +++ b/kuksa-val-server/README.md @@ -0,0 +1,157 @@ +# KUKSA.VAL +![kuksa.val Logo](../doc/pictures/logo.png) + +kuksa-val-server is a reature rich in-vehicle data server written in C++ providing authorized access to vehicle data. + + +Check [System Architecture](doc/system-architecture.md) for an overview how KUKSA.val can be used and deployed in a modern Software Defined Vehicle. + +kuksa-val-server serves signals described using the [COVESA VSS data model](https://github.com/COVESA/vehicle_signal_specification). VSS data is provided to applications using a variant based on the W3C VISS Interface or GRPC. 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. + +## Features + - Websocket interface, 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 +``` + +Alternatively you can run a released version directly from the ghcr.io registry, i.e. + +```bash +docker run -it --rm -v $HOME/kuksaval.config:/config -p 127.0.0.1:8090:8090 -e LOG_LEVEL=ALL ghcr.io/eclipse/kuksa.val/kuksa-val:0.2.1-amd64 + +``` + +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...` + +**Note**: If you are using Docker Desktop or Rancher Desktop 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](https://docs.docker.com/desktop/mac/#preferences) or [Rancher Desktop](https://docs.rancherdesktop.io) 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-server folder and execute cmake + +```bash +cd kuksa-val-server +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-server` 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 `kuksa-val-server`. + +## Using kuksa.val with a gRPC Client +Aditionally theres exists a experimental gRPC server. The easist way to test the server is the kuksa_viss_grpc_client. +To run the client follow these steps: + +``` +cd build/src +./kuksa_viss_grpc_client +``` + +If you do not know how to use the client: + +``` +./kuksa_viss_grpc_client --help +``` + + + From 3afcb309094d32484a0542c203138ea4cc06e7c3 Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Thu, 26 May 2022 12:42:06 +0200 Subject: [PATCH 7/7] Fix path to artifact collection in kuksa-val-server docker Signed-off-by: Sebastian Schildt --- kuksa-val-server/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kuksa-val-server/docker/Dockerfile b/kuksa-val-server/docker/Dockerfile index 59c3fee64..8fd6a8075 100644 --- a/kuksa-val-server/docker/Dockerfile +++ b/kuksa-val-server/docker/Dockerfile @@ -44,7 +44,7 @@ WORKDIR /kuksa.val/kuksa-val-server/build RUN cmake .. RUN make -j 4 RUN ls -RUN /kuksa.val/docker/collect-deployment-artifacts.sh +RUN /kuksa.val/kuksa-val-server/docker/collect-deployment-artifacts.sh FROM alpine:3.11