-
Notifications
You must be signed in to change notification settings - Fork 45
/
manifest.jps
275 lines (249 loc) · 8.9 KB
/
manifest.jps
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
version: 1.3
type: update
build: 202402271353
id: letsencrypt-ssl-addon
name: Let's Encrypt Free SSL
categories:
- apps/dev-and-admin-tools
targetEditions: [ "devops", "wordpress", "lite_do", "lite_vultr", "lite_gc", "ultimate", "light", "business" ]
targetNodes:
nodeType: [
tomcat6, tomcat7, tomcat8, tomcat85, tomcat9, tomcat,
tomee, tomee-dockerized,
glassfish3, glassfish4, glassfish,
jetty, jetty6,
apache, apache2,
nginxphp, nginxphp-dockerized,
litespeedphp, litespeedadc,
lemp, llsmp,
apache2-ruby, apache-ruby,
nginx-ruby, nginxruby,
nginx, nginx-dockerized,
haproxy,
apache-lb,
varnish, varnish-dockerized,
payara,
wildfly,
nodejs,
apache-python,
jenkins, jenkins2
]
homepage: https://github.com/jelastic-jps/lets-encrypt
baseUrl: https://raw.githubusercontent.com/jelastic-jps/lets-encrypt/master
logo: images/letsencrypt.png
description:
text: /text/description.md
short: Free tool to configure support of secured SSL connection for an environment,
by either internal or custom domain name.
globals:
scriptSufix: letsencrypt-ssl
app_id: letsencrypt-ssl-addon
mixins:
- configs/vers.yaml
- https://raw.githubusercontent.com/jelastic-jps/common/main/clustered-addon-utils.yml
settings:
fields:
- type: string
name: customDomains
vtype: domainlist
caption: External Domain(s)
placeholder: leave blank to get a test certificate for this environment domain
required: false
tooltip: |
Each of the specified external domains should be preliminarily bound via DNS record to the external IP of the node where add-on is installed (either directly via <a href="https://docs.jelastic.com/custom-domains/#how-to-configure-dns-record" target="_blank">A Record</a> or through CDN / external balancer proxy).<br><br>
<b>Note:</b> Leave this field blank for issuing a test SSL certificate bound to the internal environment domain.
onBeforeRedeployContainer [${targetNodes.nodeGroup}]:
callScript:
action: backup-scripts
onAfterRedeployContainer [${targetNodes.nodeGroup}]:
callScript:
action: restore-scripts
onAfterStart:
callScript:
action: check-for-update
buttons:
- confirmText: Do you want to update attached SSL certificate(s)?
loadingText: Updating...
action: update
caption: Update Now
successText: /text/success.md
- caption: Configure
settings: main
action: configure
onInstall:
- cmd[${targetNodes.nodeGroup}]: |-
[[ -e /usr/bin/python ]] || ln -s /usr/bin/python3 /usr/bin/python
user: root
- setGlobals:
nodeId: ${settings.nodeId:}
nodeGroup: ${targetNodes.nodeGroup:}
withExtIp: ${settings.withExtIp:}
withIntSSL: ${settings.withIntSSL:true}
webroot: ${settings.webroot:}
webrootPath: ${settings.webrootPath:}
fallbackToX1: ${settings.fallbackToX1:}
deployHook: ${settings.deployHook:}
deployHookType: ${settings.deployHookType:}
undeployHook: ${settings.undeployHook:}
undeployHookType: ${settings.undeployHookType:}
test: ${settings.test:}
envAppid: ${env.appid}
- checkClustering:
nodeGroup: ${globals.nodeGroup}
app_id: ${globals.app_id}
- if (globals.cluster):
- createFile:
envName: ${globals.secondaryEnvName}
nodeGroup: ${globals.nodeGroup}
app_id: ${globals.app_id}
- if (!globals.isOppositeExecuted):
- markExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- if (globals.isSecondaryEnv):
installLE:
envName: ${globals.primaryEnvName}
- else:
installLE:
envName: ${globals.secondaryEnvName}
- removeExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- if (globals.isSecondaryEnv):
return:
type: success
- else:
installScript
- else:
installScript
onUninstall:
- checkClustering:
nodeGroup: ${globals.nodeGroup}
app_id: letsencrypt-ssl-addon
- if (globals.cluster):
- markExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- if (!globals.isOppositeExecuted):
- if (globals.isSecondaryEnv):
- executeAction:
envName: ${globals.primaryEnvName}
nodeGroup: ${globals.nodeGroup}
action: uninstall
app_id: ${globals.app_id}
- else:
- executeAction:
envName: ${globals.secondaryEnvName}
nodeGroup: ${globals.nodeGroup}
action: uninstall
app_id: ${globals.app_id}
- removeExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- callScript:
action: uninstall
- delete
onBeforeDelete: delete
onAfterClone:
installLE:
envName: ${event.response.env.envName}
onAfterConfirmTransfer: installScript
actions:
installScript:
script: /scripts/create-installation-script.js?_r=${fn.random}
params:
scriptName: ${env.envName}-${targetNodes.nodeGroup}-${globals.scriptSufix}
baseUrl: ${baseUrl}
cronTime: 0 ${fn.random(1,6)},${fn.random(10,14)},${fn.random(15,20)} * * *
customDomains: ${settings.customDomains}
nodeId: ${globals.nodeId}
nodeGroup: ${globals.nodeGroup}
deployHook: ${globals.deployHook}
deployHookType: ${globals.deployHookType}
undeployHook: ${globals.undeployHook}
undeployHookType: ${globals.undeployHookType}
withExtIp: ${globals.withExtIp}
withIntSSL: ${globals.withIntSSL}
webroot: ${globals.webroot}
webrootPath: ${globals.webrootPath}
appId: ${globals.app_id}
fallbackToX1: ${globals.fallbackToX1}
test: ${globals.test}
clientVersion: ${globals.version_acme-sh:}
envAppid: ${globals.envAppid}
callScript:
script: |
var targetAppid = api.dev.apps.CreatePersistence ? "${globals.envAppid}" : appid;
var resp = api.dev.scripting.Eval(targetAppid, session, '${env.envName}-${targetNodes.nodeGroup}-${globals.scriptSufix}', {action:'${this.action}'});
if (resp.result == 0 && typeof resp.response === 'object' && resp.response.result != 0) resp = resp.response;
return resp;
update:
- checkClustering:
nodeGroup: ${globals.nodeGroup}
app_id: ${globals.app_id}
- if (globals.cluster):
- if (globals.isSecondaryEnv):
executeAction:
envName: ${globals.primaryEnvName}
nodeGroup: ${globals.nodeGroup}
action: update
app_id: ${globals.app_id}
- else:
callScript:
action: auto-update
- else:
callScript:
action: auto-update
configure:
- checkClustering:
nodeGroup: ${globals.nodeGroup}
app_id: letsencrypt-ssl-addon
- if (globals.cluster):
- if (!globals.isOppositeExecuted):
- markExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- if (globals.isSecondaryEnv):
executeAction:
envName: ${globals.primaryEnvName}
nodeGroup: ${globals.nodeGroup}
action: configure
app_id: ${globals.app_id}
- else:
executeAction:
envName: ${globals.secondaryEnvName}
nodeGroup: ${globals.nodeGroup}
action: configure
app_id: ${globals.app_id}
- removeExecutedEnvFile:
nodeGroup: ${targetNodes.nodeGroup}
app_id: ${globals.app_id}
- if (globals.isSecondaryEnv):
return:
type: success
- installScript
delete:
script: |
var targetAppid = api.dev.apps.CreatePersistence ? "${globals.envAppid}" : appid;
api.dev.scripting.DeleteScript(targetAppid, session, '${env.envName}-${targetNodes.nodeGroup}-${globals.scriptSufix}');
return {result:0}
installLE:
install: ${baseUrl}/manifest.jps
envName: ${this.envName}
nodeGroup: ${globals.nodeGroup}
settings:
customDomains: ${settings.customDomains}
nodeGroup: ${globals.nodeGroup}
deployHookType: ${globals.deployHookType}
undeployHookType: ${globals.undeployHookType}
withExtIp: ${globals.withExtIp}
withIntSSL: ${globals.withIntSSL}
webroot: ${globals.webroot}
webrootPath: ${globals.webrootPath}
fallbackToX1: ${globals.fallbackToX1}
test: ${globals.test}
createScript:
script: |
var targetAppid = api.dev.apps.CreatePersistence ? "${globals.envAppid}" : appid;
return api.dev.scripting.CreateScript(targetAppid, session, "${this.scriptName}", "js", "${this.code:}")
success: /text/success.md