Skip to content

Commit

Permalink
[10802] Improve local runtime scripts (eclipse-velocitas#17)
Browse files Browse the repository at this point in the history
* [10802] Improve local runtime scripts

Signed-off-by: Dennis Meister <dennis.meister@bosch.com>

* [10802] Fix linting

Signed-off-by: Dennis Meister <dennis.meister@bosch.com>

* [11025/11031] fix GitHub workflow to support external contributors (eclipse-velocitas#23)

* fix: fix GitHub workflow to support external contributors

* fix: update the name of the notice file

* fix: rename deployment script to deploy_image_from_artifact.sh

* fix: remove head_refs from all readonly jobs (eclipse-velocitas#24)

* Change UTILS_DIRECTORY for consistency

Signed-off-by: Dennis Meister <dennis.meister@bosch.com>

Signed-off-by: Dennis Meister <dennis.meister@bosch.com>
Co-authored-by: Ebrahim.A <ebrahim.ameen@bosch.com>
  • Loading branch information
dennismeister93 and emsameen committed Aug 29, 2022
1 parent ed6b533 commit 95a5b72
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .vscode/scripts/runtime/k3d/deploy_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ then
SERVICES=$(echo $DEPENDENCIES | jq '.services')

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY=$(dirname `cd ..; dirname "$0"`)/utils
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

docker pull $DATABROKER_IMAGE:$DATABROKER_TAG
Expand Down
6 changes: 3 additions & 3 deletions .vscode/scripts/runtime/local/run-feedercan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ echo "#######################################################"
echo "### Running FeederCan ###"
echo "#######################################################"

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY=$(dirname `cd ..; dirname "$0"`)/utils
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

### Override default files for feedercan
CONFIG_DIR="$ROOT_DIRECTORY/deploy/runtime/k3d/volume"

Expand Down
4 changes: 4 additions & 0 deletions .vscode/scripts/runtime/local/run-mosquitto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ source $UTILS_DIRECTORY/get-appmanifest-data.sh

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

#Terminate existing running services
RUNNING_CONTAINER=$(docker ps | grep "$MOSQUITTO_IMAGE" | awk '{ print $1 }')

Expand Down
6 changes: 3 additions & 3 deletions .vscode/scripts/runtime/local/run-vehicledatabroker-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ echo "#######################################################"
echo "### Running VehicleDataBroker CLI ###"
echo "#######################################################"

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY=$(dirname `cd ..; dirname "$0"`)/utils
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

sudo chown $(whoami) $HOME

# Needed because of how the databroker release is tagged
Expand Down
6 changes: 3 additions & 3 deletions .vscode/scripts/runtime/local/run-vehicledatabroker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ echo "#######################################################"
echo "### Running Databroker ###"
echo "#######################################################"

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY=$(dirname `cd ..; dirname "$0"`)/utils
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

DATABROKER_PORT='55555'
export DATABROKER_GRPC_PORT='52001'
#export RUST_LOG="info,databroker=debug,vehicle_data_broker=debug"
Expand Down
6 changes: 3 additions & 3 deletions .vscode/scripts/runtime/local/run-vehicleservices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ echo "#######################################################"
echo "### Running VehicleServices ###"
echo "#######################################################"

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

# Get Data from AppManifest.json and save to ENV
UTILS_DIRECTORY=$(dirname `cd ..; dirname "$0"`)/utils
UTILS_DIRECTORY="$ROOT_DIRECTORY/.vscode/scripts/runtime/utils"
source $UTILS_DIRECTORY/get-appmanifest-data.sh

# Configure Service Specific Requirements
Expand Down Expand Up @@ -66,8 +68,6 @@ run_service() {
--config $ROOT_DIRECTORY/.dapr/config.yaml &
}

ROOT_DIRECTORY=$( realpath "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../../../.." )

DEPENDENCIES=$(cat $ROOT_DIRECTORY/app/AppManifest.json | jq .[].dependencies)
SERVICES=$(echo $DEPENDENCIES | jq '.services')

Expand Down
44 changes: 44 additions & 0 deletions AppManifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"Name": "seatadjuster",
"Port": 50008,
"Dockerfile": "./src/VehicleApp/Dockerfile",
"dependencies": {
"services": [
{
"name": "seatservice",
"image": "ghcr.io/eclipse/kuksa.val.services/seat_service",
"version": "v0.1.0"
}
],
"runtime": [
{
"name": "mosquitto",
"image": "eclipse-mosquitto",
"version": "2.0.14"
},
{
"name": "databroker",
"image": "ghcr.io/eclipse/kuksa.val/databroker",
"version": "v0.17.0"
},
{
"name": "feedercan",
"image": "ghcr.io/eclipse/kuksa.val.feeders/dbc2val",
"version": "v0.1.0"
}
],
"python": {
"version": "3.9"
},
"dapr": {
"cli": {
"version": "1.7.1"
},
"runtime": {
"version": "1.8.1"
}
}
}
}
]

0 comments on commit 95a5b72

Please sign in to comment.