-
Notifications
You must be signed in to change notification settings - Fork 3
/
manifest.jps
92 lines (82 loc) · 2.7 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
type: install
id: xwiki
name: XWiki
version: 1.7
logo: https://raw.githubusercontent.com/jelastic-jps/xwiki/master/images/xwiki_logo.png
baseUrl: https://raw.githubusercontent.com/jelastic-jps/xwiki/master
homepage: http://www.xwiki.org/
description: XWiki is a professional wiki that has powerful extensibility features
such as scripting in pages, plugins and a highly modular architecture.
categories:
- apps/content-management
env:
sslstate: true
topology:
engine: openjdk8
nodes:
- cloudlets: 32
fixedCloudlets: 8
nodeType: tomcat9
- cloudlets: 8
fixedCloudlets: 2
nodeType: mariadb10
onInstall:
- upload
- deploy
- set-directory
- xwiki-sql-settings
- set-SQL-settings
- restart
actions:
upload:
upload:
- nodeType: tomcat9
sourcePath: ${baseUrl}/libs/mariadb-java-client-2.7.2.jar
destPath: "/opt/tomcat/lib/mariadb-java-client-2.7.2.jar"
deploy:
deploy:
archive: https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/13.2/xwiki-platform-distribution-war-13.2.war
name: xwiki-platform-distribution-war-13.2.war
context: ROOT
set-directory:
replaceInFile:
nodeType: tomcat9
path: /opt/tomcat/webapps//ROOT/WEB-INF/xwiki.properties
replacements:
- pattern: '# environment.'
replacement: 'environment.'
cmd [tomcat9]: echo /var/lib/xwiki/data/ >> /etc/jelastic/redeploy.conf
xwiki-sql-settings:
replaceInFile:
nodeType: tomcat9
path: /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
replacements:
- pattern: 'connection.password">xwiki'
replacement: 'connection.password">${user.appPassword}'
- pattern: mariadb://localhost/xwiki
replacement: mariadb://${nodes.sqldb.address}/xwiki
cmd [tomcat9]: |-
sed -i '107i <!--' /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
sed -i '122i -->' /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
sed -i '156i -->' /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
sed -i '173d ' /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
user: root
set-SQL-settings:
prepareSqlDatabase:
- nodeType: mariadb10
loginCredentials:
user: root
password: "${nodes.sqldb.password}"
newDatabaseName: xwiki
newDatabaseUser:
name: xwiki
password: "${user.appPassword}"
cmd [mariadb10]: mysql -u root -p${nodes.sqldb.password} -e "grant all privileges on *.* to 'xwiki'@'%'"
restart:
- restartNodes:
nodeGroup: sqldb
- restartNodes:
nodeGroup: cp
success:
email: /text/success-text.md
text: /text/success-text.md