You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app-service-template/README.md
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,28 +7,28 @@ This sample application service--**app-new-service**--is configured with default
7
7
Follow the instructions below to try this sample application service:
8
8
9
9
1. Prepare your local development environment with following dependencies:
10
-
- python 3.10 or above
10
+
- python 3.10
11
11
- docker
12
12
- make
13
13
- git
14
14
15
15
2. As the app service will use default Message Bus trigger to consume events from EdgeX MessageBus, we have to run up EdgeX core services and device-virtual service to simulate the EdgeX events in your local environment. The easiest way to run up EdgeX services is through script available from https://github.com/edgexfoundry/edgex-compose:
- switch into the `edgex-compose/compose-builder` directory
18
-
-`make run no-secty ds-virtual mqtt-bus keeper`
18
+
-`make run no-secty ds-virtual`
19
19
20
20
3. By the completion of above step, you will have EdgeX core services, device-virtual service, and an MQTT broker running as docker container in your local environment, and you can examine their running status by using command: `docker ps -a`. Note that the running device-virtual service will periodically generate EdgeX events and publish them to EdgeX message bus, and you can observe those EdgeX events by using following command:
4. Now we have EdgeX services up and running, the next step is to copy contents of this repository to your local environment by using following command:
5. Switch into the `app-functions-sdk-python` directory
27
27
28
28
6. Examine the code of `app-service-template/main.py` to understand how to write a custom application service using the App Functions Python SDK.
29
29
30
-
7. Create a virtual environment in the root of the repository in your local environment:
31
-
-`python3 -m venv venv`
30
+
7. Create a virtual environment based on python3.10 in the root of the repository in your local environment:
31
+
-`python3.10 -m venv venv`
32
32
33
33
8. Switch to the virtual environment:
34
34
-`source ./venv/bin/activate`
@@ -45,5 +45,10 @@ Follow the instructions below to try this sample application service:
45
45
46
46
12. Once the app-new-service is running, it will consume EdgeX events from the EdgeX message bus, filter for events coming from **Random-Integer-Device**, and then re-publish the events to an external MQTT broker **test.mosquitto.org** via **test_topic** topic. To observe those events being published to **test.mosquitto.org**, you can use following command:
0 commit comments