-
Notifications
You must be signed in to change notification settings - Fork 5
/
manifest.jps
54 lines (54 loc) · 2.1 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
{
"jpsVersion": "0.99",
"jpsType": "update",
"id": "java-vertical-scaling",
"name": "Java Memory Agent",
"categories": [
"apps/dev-and-admin-tools"
],
"targetNodes": {
"nodeGroup": "*"
},
"version": "1.1",
"homepage": "https://github.com/jelastic-jps/java-memory-agent/",
"logo": "https://raw.githubusercontent.com/jelastic-jps/java-memory-agent/master/images/java-agent-small-logo.png",
"description": {
"text": "Java Memory Agent is an applicable add-on to optimize Java-run containers in confines of RAM usage. It adjusts the main JVM memory settings based on the amount of allocated resources and integrates Garbage Collector to release the unused RAM.<div class='warning-lower' style='color:#b7c3da'><b>Note:</b> Jelastic-managed Java stacks are optimized in a similar way out-of-box.</div>",
"short": "Java Memory Agent for container RAM usage optimization"
},
"globals": {
"baseUrl": "https://raw.githubusercontent.com/jelastic-jps/java-memory-agent/master/scripts",
"homeDir": "/java_agent"
},
"onInstall": "install",
"onAfterRedeployContainer": "install",
"onUninstall": {
"cmd": [
"/bin/bash ${globals.homeDir}/java --uninstall >> /var/log/run.log 2>&1"
],
"nodeGroup" : "${targetNodes.nodeGroup}",
"user": "root"
},
"actions": {
"install": [{
"cmd": [
"while $(pgrep 'apk|apt|yum' 1> /dev/null); do sleep 1; echo waiting... >> /var/log/run.log 2>&1; done",
"mkdir -p ${globals.homeDir}",
"wget ${globals.baseUrl}/supervisor.sh -O ${globals.homeDir}/java",
"wget ${globals.baseUrl}/memoryConfig.sh -O ${globals.homeDir}/memoryConfig.sh",
"wget ${globals.baseUrl}/variablesparser.sh -O ${globals.homeDir}/variablesparser.sh",
"wget ${globals.baseUrl}/../lib/jelastic-gc-agent.jar -O ${globals.homeDir}/jelastic-gc-agent.jar",
"/bin/bash ${globals.homeDir}/java --install >> /var/log/run.log"
],
"nodeGroup" : "${targetNodes.nodeGroup}",
"user": "root"
}, {
"restartContainers": {
"nodeGroup" : "${targetNodes.nodeGroup}"
}
}]
},
"success": {
"text": "Your Java container(s) RAM usage has been successfully optimized!"
}
}