Skip to content

Commit ffc8b95

Browse files
Remove k3d and dapr (#122)
1 parent 9639248 commit ffc8b95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+132
-1199
lines changed

.dapr/components/pubsub.yaml

-31
This file was deleted.

.dapr/config.yaml

-26
This file was deleted.

.devcontainer/Dockerfile

+1-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@
1212
#
1313
# SPDX-License-Identifier: Apache-2.0
1414

15-
FROM ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.2
16-
17-
# Force dapr to use localhost traffic
18-
ENV DAPR_HOST_IP="127.0.0.1"
19-
# Add daprd to the path for the VS Code Dapr extension.
20-
ENV PATH=$PATH:/home/vscode/.dapr/bin
15+
FROM ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.3
2116

2217
ENV DOCKER_BUILDKIT=1
2318

.devcontainer/devcontainer.json

-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@
3838
// Add the IDs of extensions you want installed when the container is created.
3939
"extensions": [
4040
"ms-python.python",
41-
"ms-azuretools.vscode-dapr",
4241
"ms-azuretools.vscode-docker",
4342
"rpdswtk.vsmqtt",
4443
"dotjoshjohnson.xml",
45-
"ms-kubernetes-tools.vscode-kubernetes-tools",
4644
"matangover.mypy",
4745
"anweber.vscode-httpyac",
4846
"ms-python.mypy-type-checker",

.github/workflows/ci.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ jobs:
5959
- name: Run Linters
6060
uses: pre-commit/[email protected]
6161

62-
- name: Run the daparized databroker binary
62+
- name: Run the databroker binary
6363
run: |
64-
./.vscode/scripts/ensure-dapr.sh DAPR --task
6564
./.vscode/scripts/run-mosquitto.sh --task &
66-
./.vscode/scripts/run-vehicledatabroker.sh DAPR --task &
65+
./.vscode/scripts/run-vehicledatabroker.sh --task &
6766
sleep 10s
6867
6968
- name: Run unit and integration tests

.github/workflows/project-creation.yaml

+10-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
repository: eclipse-velocitas/cli
4949
path: cli
50-
ref: v0.6.3
50+
ref: v0.7.0
5151

5252
- name: Checkout SDK repo
5353
uses: actions/checkout@v4
@@ -60,6 +60,13 @@ jobs:
6060
cd cli
6161
npm i && npm run build && npx oclif manifest && npm i -g .
6262
63+
- name: Checkout vehicle-app-template
64+
uses: actions/checkout@v4
65+
with:
66+
repository: eclipse-velocitas/vehicle-app-template
67+
path: vehicle-app-template
68+
ref: main
69+
6370
- name: Create project
6471
shell: bash
6572
run: |
@@ -76,12 +83,12 @@ jobs:
7683
velocitas
7784
7885
# copy "full" package-index.json from CLI repo
79-
cp ../cli/testbench/test-create/vehicle-app-template/package-index.json ./package-index.json
86+
cp ../vehicle-app-template/package-index.json ./package-index.json
8087
CREATE_ARGS="-n MyApp"
8188
if [ "${{ matrix.example }}" != "no-example" ]; then
8289
CREATE_ARGS="-e ${{ matrix.example }}"
8390
fi
84-
velocitas create -l python $CREATE_ARGS
91+
velocitas create -c vapp-core-python $CREATE_ARGS
8592
8693
- name: Install dependencies
8794
shell: bash
@@ -108,7 +115,6 @@ jobs:
108115
pre-commit run --all-files && \
109116
pip3 install -r .devcontainer/tests/automated_tests/requirements.txt && \
110117
cat app/AppManifest.json && \
111-
velocitas exec grpc-interface-support generate-sdk && \
112118
pytest -sx .devcontainer/tests/automated_tests
113119
114120
- name: Upload logs

.project-creation/.skeleton/Dockerfile

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@
1515
# syntax=docker/dockerfile:1.2
1616

1717
# Build stage, to create the executable
18-
FROM --platform=$TARGETPLATFORM ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.2 as builder
18+
FROM --platform=$TARGETPLATFORM ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.3 as builder
1919
ARG TARGETARCH
2020

2121
RUN apt-get update && apt-get install -y python3-dev
2222

23-
COPY ./.velocitas.json /workspace/.velocitas_org.json
23+
COPY ./.velocitas.json /workspace/.velocitas.json
2424
COPY ./app /workspace/app
2525

26-
# FIXME: For build tooling we only need "devenv-devcontainer-setup", we should be able to
27-
# filter this without manual jq intervention...
28-
RUN cat ./workspace/.velocitas_org.json | jq 'del(.packages[] | select(.name|test(".*devenv-devcontainer-setup.*")|not))' > ./workspace/.velocitas.json
29-
3026
# Remove this installation for Arm64 once staticx has a prebuilt wheel for Arm64
3127
RUN /bin/bash -c 'set -ex && \
3228
ARCH=`uname -m` && \
@@ -44,7 +40,7 @@ RUN pip3 install --no-cache-dir pyinstaller==5.9.0 \
4440

4541
WORKDIR /workspace
4642

47-
RUN velocitas init
43+
RUN velocitas init -v
4844

4945
WORKDIR /workspace/app
5046

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
velocitas-sdk==0.13.1
1+
velocitas-sdk==0.14.0

.project-creation/.skeleton/requirements.in

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414

1515
grpcio==1.59.0
1616
protobuf==4.24.4
17-
dapr==1.11.0
1817
cloudevents==1.10.0
1918
aiohttp==3.9.3

.project-creation/.skeleton/requirements.txt

+3-17
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
# pip-compile
66
#
77
aiohttp==3.9.3
8-
# via
9-
# -r requirements.in
10-
# dapr
8+
# via -r requirements.in
119
aiosignal==1.3.1
1210
# via aiohttp
1311
async-timeout==4.0.3
@@ -16,18 +14,14 @@ attrs==23.1.0
1614
# via aiohttp
1715
cloudevents==1.10.0
1816
# via -r requirements.in
19-
dapr==1.11.0
20-
# via -r requirements.in
2117
deprecation==2.1.0
2218
# via cloudevents
2319
frozenlist==1.4.0
2420
# via
2521
# aiohttp
2622
# aiosignal
2723
grpcio==1.59.0
28-
# via
29-
# -r requirements.in
30-
# dapr
24+
# via -r requirements.in
3125
idna==3.4
3226
# via yarl
3327
multidict==6.0.4
@@ -37,14 +31,6 @@ multidict==6.0.4
3731
packaging==23.2
3832
# via deprecation
3933
protobuf==4.24.4
40-
# via
41-
# -r requirements.in
42-
# dapr
43-
python-dateutil==2.8.2
44-
# via dapr
45-
six==1.16.0
46-
# via python-dateutil
47-
typing-extensions==4.8.0
48-
# via dapr
34+
# via -r requirements.in
4935
yarl==1.9.2
5036
# via aiohttp

.project-creation/templates/.devcontainer/tests/automated_tests/runtime_test.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ def _set_env(self, runtime: str) -> None:
3131
mqtt_port = 1883
3232
vdb_port = 55555
3333

34-
if runtime == "runtime_k3d":
35-
mqtt_port = 31883
36-
vdb_port = 30555
37-
3834
os.environ["MQTT_PORT"] = f"{mqtt_port}"
3935
os.environ["VDB_PORT"] = f"{vdb_port}"
4036

@@ -53,7 +49,7 @@ def _disable_mocking(self) -> None:
5349
"""
5450
)
5551

56-
@parameterized.expand(["runtime_k3d", "runtime_kanto"])
52+
@parameterized.expand(["runtime_kanto"])
5753
def test_runtime(self, runtime):
5854
self._set_env(runtime)
5955
self._disable_mocking()

.project-creation/templates/.vscode/launch.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
"name": "VehicleApp",
1313
"program": "${workspaceFolder}/app/src/main.py",
1414
"console": "integratedTerminal",
15-
"preLaunchTask": "dapr-sidecar-start",
16-
"postDebugTask": "dapr-sidecar-stop",
1715
"env": {
18-
"APP_PORT": "50008",
19-
"DAPR_HTTP_PORT": "3500",
20-
"DAPR_GRPC_PORT": "50001",
21-
"VEHICLEDATABROKER_DAPR_APP_ID": "vehicledatabroker"
16+
"SDV_MIDDLEWARE_TYPE": "native",
17+
"SDV_VEHICLEDATABROKER_ADDRESS": "grpc://127.0.0.1:55555",
18+
"SDV_MQTT_ADDRESS": "mqtt://127.0.0.1:1883"
2219
}
2320
}
2421
]

0 commit comments

Comments
 (0)