-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe.json
115 lines (115 loc) · 5.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"RecipeFormatVersion": "2020-01-25",
"ComponentName": "aws.greengrass.clientdevices.mqtt.EMQX",
"ComponentType": "aws.greengrass.generic",
"ComponentDescription": "The EMQX MQTT broker component provides an MQTT v5 broker, based on the EMQX MQTT broker, for client devices to connect to your Greengrass core device.\n\nOn Windows operating systems this software includes code distributed under the Microsoft Software License Terms - Microsoft Visual Studio Community 2022. By downloading this software, you agree to that code's license terms, which can be found at https://visualstudio.microsoft.com/license-terms/vs2022-ga-community.",
"ComponentPublisher": "AWS",
"ComponentConfiguration": {
"DefaultConfiguration": {
"accessControl": {
"aws.greengrass.clientdevices.Auth": {
"aws.greengrass.clientdevices.mqtt.EMQX:auth:1": {
"policyDescription": "Access to client device auth operations.",
"operations": [
"aws.greengrass#SubscribeToCertificateUpdates",
"aws.greengrass#VerifyClientDeviceIdentity",
"aws.greengrass#GetClientDeviceAuthToken",
"aws.greengrass#AuthorizeClientDeviceAction"
],
"resources": [
"*"
]
}
}
},
"dockerOptions": "-p 8883:8883",
"crtLogLevel": "",
"requiresPrivilege": "true",
"restartIdentifier": "",
"startupTimeoutSeconds": "90",
"ipcTimeoutSeconds": "5"
}
},
"ComponentDependencies": {
"aws.greengrass.clientdevices.Auth": {
"VersionRequirement": ">=2.2.0 <2.5.0",
"DependencyType": "SOFT"
}
},
"Manifests": [
{
"Platform": {
"os": "windows"
},
"Lifecycle": {
"startup": {
"script": "{artifacts:decompressedPath}\\emqx\\emqx\\plugins\\gg-1.0.0\\gg-1.0.0\\priv\\write_config.exe && {artifacts:decompressedPath}\\emqx\\emqx\\bin\\emqx.cmd console",
"timeout": "{configuration:/startupTimeoutSeconds}"
},
"setEnv": {
"EMQX_PLUGINS__INSTALL_DIR": "{artifacts:decompressedPath}\\emqx\\emqx\\plugins",
"ORIG_EMQX_NODE__DATA_DIR": "{artifacts:decompressedPath}\\emqx\\emqx\\data",
"ORIG_EMQX_NODE__ETC_DIR": "{artifacts:decompressedPath}\\emqx\\emqx\\etc",
"EMQX_NODE__DATA_DIR": "{work:path}\\v2\\data",
"EMQX_NODE__ETC_DIR": "{work:path}\\v2\\etc",
"EMQX_LISTENERS__SSL__DEFAULT__SSL_OPTIONS__KEYFILE": "{work:path}\\v2\\data\\key.pem",
"EMQX_LISTENERS__SSL__DEFAULT__SSL_OPTIONS__CERTFILE": "{work:path}\\v2\\data\\cert.pem",
"IPC_TIMEOUT_SECONDS": "{configuration:/ipcTimeoutSeconds}",
"RESTART_IDENTIFIER": "{configuration:/restartIdentifier}",
"CRT_LOG_LEVEL": "{configuration:/crtLogLevel}",
"RESTART_NODE_CONF": "{configuration:/emqxConfig/node}",
"RESTART_CLUSTER_CONF": "{configuration:/emqxConfig/cluster}",
"RESTART_RPC_CONF": "{configuration:/emqxConfig/rpc}"
},
"shutdown": {
"script": "{artifacts:decompressedPath}\\emqx\\emqx\\bin\\emqx.cmd stop"
}
},
"Artifacts": [
{
"URI": "s3://BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/emqx.zip",
"Unarchive": "ZIP",
"Permission": {
"Read": "OWNER",
"Execute": "OWNER"
}
}
]
},
{
"Platform": {
"os": "linux"
},
"Lifecycle": {
"install": {
"requiresPrivilege": "{configuration:/requiresPrivilege}",
"script": "docker rmi aws-greengrass-emqx:amd64\ndocker load --input {artifacts:path}/aws-greengrass-emqx.amd64.tar.gz"
},
"startup": {
"requiresPrivilege": "{configuration:/requiresPrivilege}",
"timeout": "{configuration:/startupTimeoutSeconds}",
"script": "case $DOCKER_EXTRA in \\{configuration:*) DOCKER_EXTRA=\"\";; esac; docker run --rm --name emqx $DOCKER_EXTRA -v $AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT:$AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT -e SVCUID -e AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT -e EMQX_LISTENERS__SSL__DEFAULT__BIND -e CRT_LOG_LEVEL -e IPC_TIMEOUT_SECONDS -e RESTART_IDENTIFIER aws-greengrass-emqx:amd64",
"setEnv": {
"DOCKER_EXTRA": "{configuration:/dockerOptions}",
"EMQX_LISTENERS__SSL__DEFAULT__BIND": "{configuration:/emqx/listener.ssl.default.bind}",
"RESTART_IDENTIFIER": "{configuration:/restartIdentifier}",
"CRT_LOG_LEVEL": "{configuration:/crtLogLevel}",
"IPC_TIMEOUT_SECONDS": "{configuration:/ipcTimeoutSeconds}",
"RESTART_NODE_CONF": "{configuration:/emqxConfig/node}",
"RESTART_CLUSTER_CONF": "{configuration:/emqxConfig/cluster}",
"RESTART_RPC_CONF": "{configuration:/emqxConfig/rpc}"
}
},
"shutdown": {
"requiresPrivilege": "{configuration:/requiresPrivilege}",
"script": "docker stop emqx"
}
},
"Artifacts": [
{
"URI": "s3://BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/aws-greengrass-emqx.amd64.tar.gz"
}
]
}
]
}