forked from jelastic-jps/liferay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.jps
83 lines (73 loc) · 2.37 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
---
version: '1.5'
type: install
name: Liferay
baseUrl: https://raw.githubusercontent.com/jelastic-jps/
logo: liferay/master/images/liferay.png
homepage: http://www.liferay.com/
description:
text: liferay/master/texts/description.md
short: Leading Open Source web-based platforms to build portals
success: liferay/master/texts/success.md
categories:
- apps/cms
globals:
DB_USER: "liferay"
DB_PASS: ${fn.password(8)}
skipNodeEmails: true
nodes:
- cloudlets: 18
nodeType: tomcat9
engine: java8
links: sqldb:DB
- cloudlets: 8
count: 2
nodeType: mysql
tag: 5.7.22
env:
ON_ENV_INSTALL: ""
onInstall:
- installJps:
jps: ${baseUrl}mysql-cluster/master/scripts/ms-mm-configuration.jps
settings:
path: "${baseUrl}mysql-cluster/master"
db_user: "${globals.DB_USER}"
db_pass: "${globals.DB_PASS}"
scheme: "master"
nodeGroup: sqldb
- changerights
- deployArchive
- createDb
- restartNodes:
- nodeGroup: cp
actions:
changerights:
cmd[cp]: chmod 777 /opt
user: root
deployArchive:
cmd [cp]: |-
cd /opt
wget https://sourceforge.net/projects/lportal/files/Liferay%20Portal/7.1.0%20GA1/liferay-ce-portal-tomcat-7.1.0-ga1-20180703012531655.zip/download -O /opt/liferay.zip
unzip /opt/liferay.zip -d /opt
mv /opt/liferay-ce-portal-7.1.0-ga1 /opt/liferay
cp -R /opt/liferay/data /opt
cp -R /opt/liferay/license /opt
cp -R /opt/liferay/osgi /opt
cp -R /opt/liferay/tools /opt
cp -R /opt/liferay/work /opt
cp -R /opt/liferay/.liferay-home /opt
rm -fR /opt/tomcat/webapps/ROOT/*
cp -nR /opt/liferay/tomcat-9.0.6/* /opt/tomcat/
cp /opt/liferay/tomcat-9.0.6/conf/catalina.properties /opt/tomcat/conf
cat << EOF > /opt/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://sqldb.${env.domain}/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=${globals.DB_USER}
jdbc.default.password=${globals.DB_PASS}
schema.run.enabled=true
schema.run.minimal=true
EOF
cp /opt/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties /opt
createDb:
cmd[${nodes.sqldb.master.id}]:
mysql -u${globals.DB_USER} -p${globals.DB_PASS} -h DB -e "CREATE DATABASE IF NOT EXISTS lportal;"