-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmanifest.yaml
49 lines (44 loc) · 1.93 KB
/
manifest.yaml
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
type: install
id: mongodb-replica-set
name: MongoDB Replica Set
categories:
- apps/clusters
homepage: http://www.mongodb.org/
baseUrl: https://raw.githubusercontent.com/jelastic-jps/mongodb/master
logo: /images/mongodb-70x70.png
description: |
Three member replica sets provide enough redundancy to survive most network partitions and other system failures.
These sets also have sufficient capacity for many distributed read operations.
Replica sets should always have an odd number of members.
This ensures that elections will proceed smoothly. For more about designing replica sets, see the [Replication overview](https://docs.mongodb.com/manual/replication/).
onBeforeInit: |
var minSameNodes = 3;
var settings = jps.settings || {fields: []};
var fields = settings.fields;
var quotas = jelastic.billing.account.GetQuotas('environment.maxsamenodescount').array;
for (var i = 0; i < quotas.length; i++){
var q = quotas[i], n = toNative(q.quota.name);
if (n == 'environment.maxsamenodescount' && q.value < minSameNodes) {
fields.push(
{"type": "compositefield","height": 0,"hideLabel": true,"width": 0,"items": [{"height": 0,"type": "string","required": true}]}
);
};
}
return { result: 0, settings: settings };
onBeforeInstall: |
var resp = api.environment.control.GetTemplates(appid, session), mongoTemplate = "mongodb-dockerized";
if (resp.result !== 0) return resp;
for (var i = 0; i < resp.array.length; i++) {
if (resp.array[i].nodeType == "mongo") {
mongoTemplate = "mongo";
break;
}
}
return {result: 0, "nodes":[{"nodeType":mongoTemplate,"count":3,"cloudlets":16,"nodeGroup":"nosqldb","scalingMode":"STATELESS","skipNodeEmails":true,"cluster": true}]};
nodes: definedInOnBeforeInstall
success:
email: false
text: |
**Admin Panel**: [${nodes.nosqldb.url}](${nodes.nosqldb.url})
**User**: admin
**Password**: has been sent to your email box