-
Notifications
You must be signed in to change notification settings - Fork 10
/
recipe.json
executable file
·71 lines (71 loc) · 1.89 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
{
"RecipeFormatVersion": "2020-01-25",
"ComponentName": "aws.greengrass.labs.HomeAssistant",
"ComponentVersion": "COMPONENT_VERSION",
"ComponentDescription": "Home Assistant",
"ComponentPublisher": "Amazon",
"ComponentConfiguration": {
"DefaultConfiguration": {
"secretArn": "$SECRET_ARN",
"accessControl": {
"aws.greengrass.SecretManager": {
"aws.greengrass.labs.HomeAssistant:secrets:1": {
"policyDescription": "Allows access to the Home Assistant 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}/home-assistant/* .\npip3 install awsiotsdk\npython3 -u install.py {configuration:/secretArn}"
},
"Startup": {
"RequiresPrivilege": true,
"script": "docker-compose up -d"
},
"Shutdown": {
"RequiresPrivilege": true,
"script": "docker-compose down"
},
"Recover": {
"RequiresPrivilege": true,
"script": "docker-compose down"
}
},
"Artifacts": [
{
"URI": "docker:$DOCKER_IMAGE"
},
{
"URI": "s3://BUCKET_NAME/COMPONENT_VERSION/home-assistant.zip",
"Unarchive": "ZIP",
"Permission": {
"Read": "ALL"
}
}
]
}
]
}