forked from edgeport/cdn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.yml
105 lines (86 loc) · 2.49 KB
/
manifest.yml
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
version: 1.1
type: update
categories:
- apps/dev-tools
id: cdn
baseUrl: https://raw.githubusercontent.com/edgeport/cdn/master
name: HTTP/3 Premium CDN
logo: /images/edgeport-white-logo-70x70-2.png
homepage: https://edgeport.net
description:
short: Enterprise-level HTTP-over-QUIC CDN
targetNodes:
nodeGroup:
- bl
- cp
onBeforeInit: |
var resp = jelastic.dev.scripting.Eval("c05ffa5b45628a2a0c95467ebca8a0b4", session, "cdn.wizard.ui");
return resp.response ? resp.response:resp;
globals:
valueRR: RR
valuePF: PF
appid: c05ffa5b45628a2a0c95467ebca8a0b4
#appName: CDN EdgePort Service
buttons:
- settings: config
action: config
caption: Configure
submitButtonText: Apply
menu:
- caption: Purge
confirmText: Are you sure?
loadingText: We are purging your files
action: purgeSingle
successText: Purge was successfully!
settings: purge
title: Purge
submitButtonText: Submit
- caption: Purge All
confirmText: Are you sure?
loadingText: We are purging your files
action: purge
successText: Purge was successfully!
title: Purge All
submitButtonText: Submit
onInstall:
- eval:
act: install
- if ("${settings.masterEnv:}"):
setGlobals:
envName: ${settings.masterEnv:}
- if (!"${settings.masterEnv:}"):
setGlobals:
envName: ${env.envName}
onAfterScaleOut:
scale: ${event.params.nodeGroup}
onAfterScaleIn:
scale: ${event.params.nodeGroup}
onAfterMigrate:
eval:
act: migrate
onBeforeDelete: cdnUninstall
onUninstall: cdnUninstall
actions:
scale:
if ('${this}' == 'bl' || ('${this}' == 'cp' && !nodes.bl)):
eval:
act: scale
eval:
script: |-
var params = {masterEnv:"${settings.masterEnv:}", envName:"${env.envName}", action:"${this.act:script}", ha:"${settings.ha:}", header:"${settings.header:}", customCname:"${settings.customCname:}", path:"${this.path:}", note:"${settings.note:}"},
resp = jelastic.dev.scripting.Eval("${globals.appid}", session, "cdn.${this.script:install}", params);
return resp.response ? resp.response:resp;
#TODO: send message to owner after change SSL option, strore in DB for charging job
config:
eval:
act: config
purgeSingle:
purge: ${settings.purgefile}
purge:
eval:
script: purge
path: ${this:}
cdnUninstall:
eval:
script: uninstall
success: /text/success.md