-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe.yaml
52 lines (52 loc) · 1.91 KB
/
recipe.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
---
RecipeFormatVersion: '2020-01-25'
ComponentName: aws.greengrass.labs.CustomSecureTunneling
ComponentVersion: '1.0.1'
ComponentDescription: A component for Secure Tunneling in a customized container.
ComponentPublisher: Amazon
ComponentDependencies:
aws.greengrass.DockerApplicationManager:
VersionRequirement: ~2.0.0
aws.greengrass.TokenExchangeService:
VersionRequirement: ~2.0.0
ComponentConfiguration:
DefaultConfiguration:
accessControl:
aws.greengrass.ipc.mqttproxy:
aws.greengrass.labs.CustomSecureTunneling:mqttproxy:1:
policyDescription: Allows access to subscribe to new Secure Tunneling notifications.
operations:
- "aws.greengrass#SubscribeToIoTCore"
resources:
- "$aws/things/+/tunnels/notify"
Manifests:
- Platform:
os: linux
Lifecycle:
Install:
RequiresPrivilege: true
Script: |-
docker load -i {artifacts:path}/image.tar.gz
Run:
RequiresPrivilege: true
Script: |-
docker run \
--name=greengrass_custom_secure_tunneling \
--network=host \
--rm \
-e AWS_REGION \
-e AWS_IOT_THING_NAME \
-e AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT \
-e SVCUID \
-e HTTP_PROXY \
-v {kernel:rootPath}/ipc.socket:{kernel:rootPath}/ipc.socket \
greengrass_custom_secure_tunneling:NEXT_PATCH
Shutdown:
RequiresPrivilege: true
script: |-
echo "Stopping the greengrass_custom_secure_tunneling container..."
docker stop greengrass_custom_secure_tunneling
echo "Removing the greengrass_custom_secure_tunneling container..."
docker rm greengrass_custom_secure_tunneling
Artifacts:
- URI: s3://REPLACE_BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/image.tar.gz