-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEdgeImpulseSerialRunnerServiceComponent.yaml
55 lines (55 loc) · 2.71 KB
/
EdgeImpulseSerialRunnerServiceComponent.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
RecipeFormatVersion: "2020-01-25"
ComponentName: "EdgeImpulseSerialRunnerServiceComponent"
ComponentVersion: "1.0.0"
ComponentDescription: "Service Installer for Edge Impulse Serial Runner service"
ComponentPublisher: "EdgeImpulse"
ComponentDependencies:
aws.greengrass.TokenExchangeService:
VersionRequirement: ">=0.0.0"
DependencyType: "HARD"
ComponentConfiguration:
DefaultConfiguration:
Parameters: {
"node_version": "20.18.2",
"device_name": "MyEdgeImpulseDevice",
"sleep_time_sec": 10,
"lock_filename": "/tmp/ei_lockfile_serial_runner",
"iotcore_backoff": "5",
"iotcore_qos": "1",
"ei_bindir": "/usr/local/bin",
"ei_local_model_file": "__none__",
"ei_shutdown_behavior": "__none__",
"ei_ggc_user_groups": "video audio input users dialout",
}
Manifests:
- Name: "Default"
Platform:
os: linux
runtime: "*"
Lifecycle:
setenv: {
"CONFIG_PARAMETERS": "{configuration:/Parameters}"
}
install:
RequiresPrivilege: true
Timeout: 9000
Script: |-
chmod 755 {artifacts:path}/install_serial.sh {artifacts:path}/run_serial.sh {artifacts:path}/launch_serial.sh {artifacts:path}/stop.sh {artifacts:path}/parser.sh
sh {artifacts:path}/install_serial.sh {artifacts:path} {configuration:/Parameters/node_version} {configuration:/Parameters/ei_ggc_user_groups}
run:
Script: |-
sh {artifacts:path}/run_serial.sh {artifacts:path} {configuration:/Parameters/device_name} {configuration:/Parameters/sleep_time_sec} {configuration:/Parameters/lock_filename} {configuration:/Parameters/iotcore_backoff} {configuration:/Parameters/iotcore_qos} {configuration:/Parameters/ei_bindir}
shutdown:
RequiresPrivilege: true
Script: |-
sh {artifacts:path}/stop.sh {artifacts:path} {configuration:/Parameters/lock_filename}
Artifacts:
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/aws-iotcore-connector.ts
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/aws-iotcore-serial-scraper.ts
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/package.json
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/install_serial.sh
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/run_serial.sh
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/launch_serial.sh
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/stop.sh
- Uri: s3://YOUR_S3_ARTIFACT_BUCKET/artifacts/EdgeImpulseServiceComponent/1.0.0/parser.sh