-
Notifications
You must be signed in to change notification settings - Fork 5
/
manifest.jps
83 lines (79 loc) · 3.18 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
type: install
id: opencms
name: OpenCms
homepage: http://www.opencms.org/
startPage: overview/
logo: /images/opencms.png
description: OpenCms from Alkacon Software is a professional, easy to use website
content management system. OpenCms helps content managers worldwide to create and
maintain beautiful websites fast and efficiently.
categories:
- apps/content-management
- apps/cms
baseUrl: https://raw.githubusercontent.com/jelastic-jps/opencms/master
mixins:
- configs/vers.yaml
ssl: true
engine: openjdk11
nodes:
- cloudlets: 32
fixedCloudlets: 1
nodeType: tomcat9
- cloudlets: 8
fixedCloudlets: 2
nodeType: mariadb10
onInstall:
- deployApp
- set-SQL-settings
- add-autonfig-file
- run-setup
- restart
actions:
deployApp:
- cmd[cp]: |-
cd /tmp/;
curl -fsSL "http://www.opencms.org/downloads/opencms/opencms-${globals.version_opencms}.zip" -o /tmp/opencms.zip;
unzip -o opencms.zip -d opencms;
mv opencms/opencms.war /opt/tomcat/webapps/ROOT.war;
sudo jem service stop; rm -rf /opt/tomcat/webapps/ROOT; sudo jem service start;
set-SQL-settings:
prepareSqlDatabase:
- nodeType: mariadb10
loginCredentials:
user: root
password: "${nodes.sqldb.password}"
newDatabaseUser:
name: opencms
password: "${user.appPassword}"
cmd [mariadb10]: mysql -u root -p${nodes.sqldb.password} -e "grant all privileges
on *.* to 'opencms'@'%'"
add-autonfig-file:
- cmd[cp]: |-
echo "setup.webapp.path=/opt/tomcat/webapps/ROOT" >> /opt/tomcat/webapps/setup.properties
echo "setup.default.webapp=ROOT" >> /opt/tomcat/webapps/setup.properties
echo "setup.install.components=workplace,demo" >> /opt/tomcat/webapps/setup.properties
echo "jdbc:mysql://${nodes.sqldb.address}/" >> /opt/tomcat/webapps/setup.properties
echo "db.product=mysql" >> /opt/tomcat/webapps/setup.properties
echo "db.provider=mysql" >> /opt/tomcat/webapps/setup.properties
echo "db.create.user=root" >> /opt/tomcat/webapps/setup.properties
echo "db.create.pwd=${nodes.sqldb.password}" >> /opt/tomcat/webapps/setup.properties
echo "db.worker.user=opencms" >> /opt/tomcat/webapps/setup.properties
echo "db.worker.pwd=${user.appPassword}" >> /opt/tomcat/webapps/setup.properties
echo "db.connection.url=jdbc:mysql://${nodes.sqldb.address}/" >> /opt/tomcat/webapps/setup.properties
echo "db.name=db_opencms" >> /opt/tomcat/webapps/setup.properties
echo "db.create.db=true" >> /opt/tomcat/webapps/setup.properties
echo "db.create.tables=true" >> /opt/tomcat/webapps/setup.properties
echo "db.dropDb=true" >> /opt/tomcat/webapps/setup.properties
echo "db.jdbc.driver=org.gjt.mm.mysql.Driver" >> /opt/tomcat/webapps/setup.properties
echo "server.url=https://${env.domain}" >> /opt/tomcat/webapps/setup.properties
echo "server.id=OpenCmsServer" >> /opt/tomcat/webapps/setup.properties
run-setup:
- cmd[cp]: |-
cd /opt/tomcat/webapps/ROOT/WEB-INF
bash setup.sh -path /opt/tomcat/webapps/setup.properties >> /var/log/run.log 2>&1
restart:
- restartContainers:
nodeGroup: sqldb
- restartContainers:
nodeGroup: cp
success: /text/success-text.md