Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi #205

Merged
merged 29 commits into from
Dec 15, 2022
Merged

Multi #205

Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
04e25a4
Update manifest.jps
lazarenkoalexey Feb 23, 2022
a1befe0
Merge branch 'jelastic-jps:master' into multi
lazarenkoalexey Feb 28, 2022
484cdf6
Update manifest.jps
lazarenkoalexey Feb 28, 2022
159c2aa
small fixes
lazarenkoalexey Feb 28, 2022
47c3462
changed baseUrl
lazarenkoalexey Feb 28, 2022
77219d0
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 6, 2022
8eb9275
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 7, 2022
eedde49
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
8f356eb
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
30f2f66
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
0e4a13c
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
d2efc4d
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
6982b5f
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
6d1919e
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 8, 2022
956a945
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 14, 2022
886fe0e
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 16, 2022
268c42f
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 17, 2022
ae078e4
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 18, 2022
1ee6121
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 18, 2022
47f211a
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 18, 2022
6e319fa
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Mar 18, 2022
817fdb2
WP-189 [Elastic WordPress Edition][Multiregion][LE] env has test ssl …
lazarenkoalexey Apr 14, 2022
5c06b74
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Jul 19, 2022
aef8482
removed test flag
lazarenkoalexey Jul 19, 2022
48ada50
added custom domains to another cluster environment
lazarenkoalexey Jul 20, 2022
223f02a
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Jul 21, 2022
0a9ed5a
WP-8 [WP Standalone Multiregional] LE for multiregion deployment
lazarenkoalexey Aug 12, 2022
3ae0993
changed baseUrl
lazarenkoalexey Dec 15, 2022
1fed566
Merge branch 'stage' into multi
lazarenkoalexey Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 127 additions & 20 deletions manifest.jps
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ targetNodes:
- jenkins2

homepage: https://github.com/jelastic-jps/lets-encrypt
baseUrl: https://raw.githubusercontent.com/jelastic-jps/lets-encrypt/master
baseUrl: https://raw.githubusercontent.com/jelastic-jps/lets-encrypt/stage
logo: images/letsencrypt.png

description:
Expand All @@ -60,9 +60,11 @@ description:

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:
Expand Down Expand Up @@ -111,29 +113,70 @@ onInstall:
undeployHook: ${settings.undeployHook:}
undeployHookType: ${settings.undeployHookType:}
test: ${settings.test:}
- installScript
- 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):
script: |
return {result: 0}
- else:
installScript
- else:
installScript


onUninstall:
- callScript:
action: uninstall
- 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}
- if (globals.isSecondaryEnv):
script: |
return {result: 0}
- delete

onBeforeDelete: delete

onAfterClone:
install: ${baseUrl}/manifest.jps?_r=${fn.random}
envName: ${event.response.env.envName}
nodeGroup: ${globals.nodeGroup}
settings:
customDomains: ''
nodeGroup: ${globals.nodeGroup}
deployHookType: ${globals.deployHookType}
undeployHookType: ${globals.undeployHookType}
withExtIp: ${globals.withExtIp}
webroot: ${globals.webroot}
webrootPath: ${globals.webrootPath}
fallbackToX1: ${globals.fallbackToX1}
test: ${globals.test}
installLE:
envName: ${event.response.env.envName}

onAfterConfirmTransfer: installScript

Expand All @@ -157,18 +200,82 @@ actions:
fallbackToX1: ${globals.fallbackToX1}
test: ${globals.test}
clientVersion: ${globals.version_acme-sh:}

callScript:
script: |
var j = jelastic, resp = j.dev.scripting.Eval(appid, 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:
- callScript:
action: auto-update
configure: installScript
- 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):
script: |
return {result: 0}
- installScript

delete:
script: |
jelastic.dev.scripting.DeleteScript('${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}
webroot: ${globals.webroot}
webrootPath: ${globals.webrootPath}
fallbackToX1: ${globals.fallbackToX1}
test: ${globals.test}

createScript:
script: |
return jelastic.dev.scripting.CreateScript("${this.scriptName}", "js", "${this.code:}")

success: /text/success.md