-
Notifications
You must be signed in to change notification settings - Fork 3
/
recipe.json
executable file
·77 lines (77 loc) · 2.07 KB
/
recipe.json
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"RecipeFormatVersion": "2020-01-25",
"ComponentName": "aws.greengrass.labs.TheThingsStackLoRaWAN",
"ComponentVersion": "COMPONENT_VERSION",
"ComponentDescription": "The Things Stack LoRaWAN",
"ComponentPublisher": "Amazon",
"ComponentConfiguration": {
"DefaultConfiguration": {
"secretArn": "$SECRET_ARN",
"accessControl": {
"aws.greengrass.SecretManager": {
"aws.greengrass.labs.TheThingsStackLoRaWAN:secrets:1": {
"policyDescription": "Allows access to The Things Stack configuration secret",
"operations": [
"aws.greengrass#GetSecretValue"
],
"resources": [
"$SECRET_ARN"
]
}
}
}
}
},
"ComponentDependencies": {
"aws.greengrass.DockerApplicationManager": {
"VersionRequirement": "^2.0.0"
},
"aws.greengrass.SecretManager": {
"VersionRequirement": "^2.0.0",
"DependencyType": "HARD"
}
},
"Manifests": [
{
"Platform": {
"os": "linux"
},
"Lifecycle": {
"Install": {
"RequiresPrivilege": true,
"script": "cp -R {artifacts:decompressedPath}/tts/* .\npip3 install awsiotsdk PyYAML\npython3 -u install.py {configuration:/secretArn}"
},
"Startup": {
"RequiresPrivilege": true,
"script": "python3 -u share_certs.py\ndocker-compose up -d stack"
},
"Shutdown": {
"RequiresPrivilege": true,
"script": "docker-compose down"
},
"Recover": {
"RequiresPrivilege": true,
"script": "docker-compose down"
}
},
"Artifacts": [
{
"URI": "docker:$DOCKER_IMAGE_TTS"
},
{
"URI": "docker:$DOCKER_IMAGE_DB"
},
{
"URI": "docker:$DOCKER_IMAGE_REDIS"
},
{
"URI": "s3://BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/tts.zip",
"Unarchive": "ZIP",
"Permission": {
"Read": "ALL"
}
}
]
}
]
}