-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanifest.jps
128 lines (127 loc) · 4.2 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
{
"jpsVersion": "0.3",
"jpsType": "update",
"application": {
"logo": "http://www.nopdynamics.com/media/17082/windows-logo.png",
"description": {
"en": "This addon configure Azure Traffic Manager to Jelastic backends."
},
"name": "Azure Traffic Manager Linker Addon",
"type": "java",
"homepage": "https://github.com/jelastic/azure/",
"version": "1.0.0",
"categories": [
"apps/others"
],
"settings": {
"fields": [{
"type": "string",
"name": "azure_login",
"caption": "Azure login",
"required": true,
"default": "${user.email}"
}, {
"type": "string",
"name": "password",
"caption": "Password",
"inputType": "password",
"required": true
}, {
"type": "string",
"name": "resgroup",
"caption": "Resource Group",
"required": true,
"default": "Default"
}, {
"type": "string",
"name": "location",
"caption": "Location",
"required": true
}, {
"type": "string",
"name": "profile_name",
"caption": "Profile name",
"required": true,
"default": "Default"
}, {
"type": "string",
"name": "relative_dns_name",
"caption": "Relative DNS name",
"required": true
}, {
"type": "string",
"name": "monitoring_path",
"caption": "Monitoring path",
"required": true,
"default": "/"
}
]
},
"env": {
"onInit": {
"call": ["install_azure_agent", "register_node_in_traffic_manager"]
}
},
"onUninstall": {
"call": ["remove_registration", "remove_azure_agent"]
},
"procedures": [{
"id": "install_azure_agent",
"onCall": [{
"executeShellCommands": [{
"nodeMission": "bl",
"commands": [
"wget -q \"https://raw.githubusercontent.com/jelastic/azure/master/scripts/AzureTrafficManagerConfigurator.sh\" -O /root/AzureTrafficManagerConfigurator.sh",
"/root/AzureTrafficManagerConfigurator.sh --install"
],
"user": "root"
}
]
}
]
}, {
"id": "register_node_in_traffic_manager",
"onCall": [{
"executeShellCommands": [{
"nodeMission": "bl",
"commands": [
"/root/AzureTrafficManagerConfigurator.sh --username \"${application.settings.first_name}\"--password \"${application.settings.first_name}\" --resource-group \"${application.settings.first_name}\" --location \"${application.settings.first_name}\" --profile-name \"${application.settings.first_name}\" --dns-domain \"${application.settings.first_name}\" --monitoring-path \"${application.settings.first_name}\""
],
"user": "root"
}
]
}
]
},
{
"id": "remove_registration",
"onCall": [{
"executeShellCommands": [{
"nodeMission": "cp",
"commands": [
"echo \"Removing of registration is not supported yet\" >> /var/log/azure_traffic_linker.log"
]
}
]
}
]
}, {
"id": "remove_azure_agent",
"onCall": [{
"executeShellCommands": [{
"nodeMission": "bl",
"commands": [
"/root/AzureTrafficManagerConfigurator.sh --uninstall"
],
"user": "root"
}
]
}
]
}
],
"success": {
"en": "Hello ${application.settings.first_name} </br></br>"
}
}
}