-
Notifications
You must be signed in to change notification settings - Fork 6
/
manifest.jps
86 lines (86 loc) · 3.67 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
{
"jpsType": "install",
"application": {
"id": "mariadbreplic",
"categories": [
"apps/clustered-dbs", "apps/clusters"
],
"logo": "https://raw.githubusercontent.com/jelastic-jps/mariadb-replication/master/images/maria.png",
"description": {
"text": "Primary-secondary replication is used to solve performance problems, to support the db backups, and to alleviate system failures. It enables data from one database server (primary) to be replicated to another (secondary)"
},
"startPage": "${nodes.sqldb.url}",
"success": {
"text": "The environment with multiple databases has been successfully created. The login and password of your database servers are sent to your email.\nPlease wait a minute for the replication settings to be completed. The process can be monitored in the <b>cron > mysql</b> file of your database servers. This file becomes empty when the configurations are finished. <br><br /> <table style='font-size:13px; border: none;'><tr><td>Admin panel URL:</td><td style='padding-left: 10px;'><a href='${nodes.mariadb.url}' target='_blank'>${nodes.mariadb.url}/</a></td></tr></table><br />To add custom domain name for your MariaDB installation follow the steps described in our <a href='http://docs.jelastic.com/custom-domains' target='_blank'>documentation",
"email": "The environment with multiple databases has been successfully created. The login and password of your database servers are sent to your email.\nPlease wait a minute for the replication settings to be completed. The process can be monitored in the <b>cron > mysql</b> file of your database servers. This file becomes empty when the configurations are finished. <br><br /> <table style='font-size:13px; border: none;'><tr><td>Admin panel URL:</td><td style='padding-left: 10px;'><a href='${nodes.mariadb.url}' target='_blank'>${nodes.mariadb.url}/</a></td></tr></table><br />To add custom domain name for your MariaDB installation follow the steps described in our <a href='http://docs.jelastic.com/custom-domains' target='_blank'>documentation"
},
"name": "MariaDB Database Replication",
"env": {
"topology": {
"nodes": [{
"cloudlets": 8,
"count": 2,
"nodeType": "mariadb"
}
]
}
},
"onInstall": {
"call": "configureReplication"
},
"procedures": [{
"id": "configureReplication",
"onCall": [{
"replaceInFile": [{
"nodeMission": "sqldb",
"path": "${SYSTEM_ETC}/my.cnf",
"replacements": [{
"pattern": ".*log-bin.*",
"replacement": "log-bin=mysql-bin"
}, {
"pattern": ".*autoconfiguration mark.*",
"replacement": "\n"
}
]
}
]
}, {
"replaceInFile": [{
"nodeId": "${nodes.sqldb[0].id}",
"path": "${SYSTEM_ETC}/my.cnf",
"replacements": [{
"pattern": "server-id\\s*= 1",
"replacement": "server-id = 2"
}
]
}
]
}, {
"restartNodes": [{
"nodeMission": "sqldb"
}
]
}, {
"executeShellCommands": [{
"nodeId": "${nodes.sqldb[0].id}",
"commands": [
"mysql -uroot -p${nodes.sqldb.password} -e \"GRANT REPLICATION SLAVE ON *.* TO rpl@${nodes.sqldb[1].address} IDENTIFIED BY 'rpl';\" 2>&1",
"mysqlreplicate --master=root:${nodes.sqldb.password}@${nodes.sqldb[0].address} --slave=root:${nodes.sqldb.password}@${nodes.sqldb[1].address} --rpl-user=rpl:rpl 2>&1"
]
}
]
}, {
"restartNodes": [{
"nodeMission": "sqldb"
}
]
}
]
}
],
"type": "java",
"homepage": "http://docs.jelastic.com/mariadb-master-slave-replication",
"version": "0.1"
},
"jpsVersion": "0.5"
}