-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmanifest.jps
80 lines (67 loc) · 3.21 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
type: install
id: xwiki
name: XWiki
version: 1.7
logo: https://raw.githubusercontent.com/jelastic-jps/xwiki/master/images/xwiki_logo.png
homepage: https://www.xwiki.org/
description: XWiki is an open-source, light and powerful wiki platform that is designed to help you create and manage content collaboratively. Due to highly modular architecture, XWiki allows you to deploy a professional wiki with extensibility features such as scripting in pages and plugins.
categories:
- apps/content-management
baseUrl: https://raw.githubusercontent.com/jelastic-jps/xwiki/master
mixins:
- configs/vers.yaml
env:
sslstate: true
topology:
engine: openjdk17
nodes:
- cloudlets: 32
fixedCloudlets: 8
nodeType: tomcat9
- cloudlets: 8
fixedCloudlets: 2
nodeType: mariadb10
globals:
hibernate_cfg: /opt/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
onInstall:
- deploy
- set-directory
- set-sql-settings
- xwiki-sql-settings
- restart
actions:
deploy:
deploy:
archive: https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/${globals.version_xwiki}/xwiki-platform-distribution-war-${globals.version_xwiki}.war
name: xwiki-platform-distribution-war-${globals.version_xwiki}.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:
cmd [tomcat9]: |-
curl -fsSL "https://dlm.mariadb.com/Connectors/java/connector-java-${globals.version_connector_java}/mariadb-java-client-${globals.version_connector_java}.jar" -o /opt/tomcat/lib/mariadb-java-client-${globals.version_connector_java}.jar
sed -i 's/<property name="hibernate.connection.password">xwiki<\/property>/<property name="hibernate.connection.password">${user.appPassword}<\/property>/' ${globals.hibernate_cfg}
sed -i 's/mariadb:\/\/localhost\/xwiki/mariadb:\/\/${nodes.sqldb.address}\/xwiki/' ${globals.hibernate_cfg}
sed -i '/Configuration for the default database./,/-->/{/<!--/s/<!--//; /-->/{s/-->//}}' ${globals.hibernate_cfg}
sed -i '/Configuration for the default database/,/<mapping resource="mailsender.hbm.xml"/{s/^/<!-- /;s/$/ -->/}' ${globals.hibernate_cfg}
sed -i '/<!-- MariaDB configuration/,/-->/{s/^[[:space:]]*<!-- //;s/-->[[:space:]]*$//}' ${globals.hibernate_cfg}
sed -i '/MariaDB configuration/,/<[[:space:]]*property/{/^[[:space:]]*<property/!s/^/ <!-- /; /^[[:space:]]*<property/!s/$/ -->/}' ${globals.hibernate_cfg}
set-sql-settings:
cmd[mariadb10]: |-
MYSQL_PWD=${nodes.sqldb.password} mysql -uroot -e "CREATE DATABASE xwiki;"
MYSQL_PWD=${nodes.sqldb.password} mysql -uroot -e "CREATE USER 'xwiki'@'%' IDENTIFIED BY '${user.appPassword}';"
MYSQL_PWD=${nodes.sqldb.password} mysql -uroot -e "GRANT ALL PRIVILEGES ON xwiki.* TO 'xwiki'@'%' WITH GRANT OPTION;"
restart:
- restartNodes:
nodeGroup: sqldb
- restartNodes:
nodeGroup: cp
success:
email: /text/success-email.md
text: /text/success-text.md