-
Notifications
You must be signed in to change notification settings - Fork 0
/
EdgeImpulseSerialRunnerServiceComponent.yaml
47 lines (47 loc) · 2.49 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
---
RecipeFormatVersion: '2020-01-25'
ComponentName: EdgeImpulseSerialRunnerServiceComponent
ComponentVersion: '1.0.0'
ComponentDescription: 'Service Installer for Edge Impulse Serial Runner service'
ComponentPublisher: EdgeImpulse
ComponentConfiguration:
DefaultConfiguration:
Parameters: {
"node_version": "20.12.1",
"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_ggc_user_groups": "video audio input users dialout"
}
Manifests:
- Platform:
os: all
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
/bin/bash {artifacts:path}/install_serial.sh {artifacts:path} {configuration:/Parameters/node_version} {configuration:/Parameters/ei_ggc_user_groups}
run:
script: |-
/bin/bash {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: |-
/bin/bash {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