-
Notifications
You must be signed in to change notification settings - Fork 0
/
lucee.bom
245 lines (237 loc) · 10.9 KB
/
lucee.bom
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
brooklyn.catalog:
publish:
description: |
Lucee is open source software that implements a lightweight dynamically-typed scripting language for the Java virtual machine (JVM), facilitating the rapid development of web applications that compile directly to Java bytecode. Lucee is compatible with contemporary CFML script and tag language variants, and provides configurable support for legacy CFML.
license_code: Apache-2.0
defaults:
luceeIconUrl: &luceeIconUrl "http://docs.lucee.org/assets/images/lucee-logo-bw.png"
items:
- "https://github.com/brooklyncentral/common-catalog-utils/releases/download/v0.1.0/common.bom"
- id: lucee
name: "Lucee"
description: |
A Lucee node
itemType: entity
iconUrl: *luceeIconUrl
item:
id: lucee
name: "Lucee"
type: centos7-software-process
brooklyn.parameters:
- name: lucee.version
label: "Lucee Version"
description: |
The version of lucee to download and install
type: string
default: 5.2.4.037-pl0
- name: luceepass
label: "Lucee Password"
description: |
The password that will be used for the Lucee Administrators at install time. This password must be 6 characters or more.
type: string
default: luce3pas5word9
- name: tomcatport
label: "Tomcat Port"
description: |
The port number Tomcat will use for it's internal web server (coyote). This port is what's used by default for Apache mod_proxy_html.
type: integer
default: 8888
- name: tomcatshutdownport
label: "Tomcat Shutdown Port"
description: |
The Tomcat shutdown port number. This port should not be open to the Internet.
type: integer
default: 8005
- name: tomcatajpport
label: "Tomcat AJP Port"
description: |
This is the port the AJP listener will be connecting to. This port is used by mod_jk and mod_proxy_ajp and is requried to be available to your apache server if you are using either of those connection methods.
type: integer
default: 8009
- name: systemuser
label: "System User"
description: |
This is the user account that Lucee will run as on your system. If this user account doesn't exist at Install time, a user and group account will be made using this name and Lucee will run as this system user.
type: string
default: root
- name: startatboot
label: "Start at boot"
description: |
This is a BOOLEAN value, meaning it must be true or false. The default setting of "true" will copy the lucee_ctl script to the /etc/init.d/ directory and use system commands to set the service to start at boot time. Setting the variable to "false" will cause the script to only exist in the installation directory. /opt/lucee/lucee_ctl for example.
type: boolean
default: true
- name: installconn
label: "Install the Apache Connector"
description: |
This is a BOOLEAN value, meaning it must be true or false.
This value tells the installer to install the Apache connector. (Ignored on Windows) This variable must be set to [true] if any of the Apache-specific variables are to have any relevance. If this variable is set to [false], the Apache-specific variables will be ignored.
type: boolean
default: true
- name: apachecontrolloc
label: "apachectl location"
description: |
Specifies the location of the "apachectl" control script.
type: string
default: /usr/sbin/apachectl
- name: apachemodulesloc
label: "Apache modules location"
description: |
Specifies the location for new Apache modules. Default value changes depending on default system and the existence of the default directory.
(RHEL/32): [/usr/lib/httpd/modules]
(RHEL/64): [/usr/lib64/httpd/modules]
(Debian/32): [/usr/lib/apache2/modules]
(Debian/64): [/usr/lib64/apache2/modules]
type: string
default: /usr/lib64/httpd/modules
- name: apacheconfigloc
label: "Apache config location"
description: |
Specifies the location of the primary Apache configuration script. Global installs for mod_proxy and mod_cfml will be placed in this file.
(RHEL): [/etc/httpd/conf/httpd.conf]
(Debian): [/etc/apache2/apache2.conf]
type: string
default: /etc/httpd/conf/httpd.conf
- name: apachelogloc
label: "Apache log location"
description: |
Specifies the location of the Apache log files. Used in the configuration of the connector logs for mod_jk.
(RHEL): [/var/log/httpd/]
(Debian): [/var/log/apache2/]
type: string
default: /var/log/httpd/
- name: lucee.location
label: "Lucee Download Location"
description: |
The location of the Lucee setup file
type: string
default: /tmp/lucee-linux-x64-installer.run
- name: installiis
label: "Install IIS Connector"
description: |
This value tells the installer to install the connector for IIS, the BonCode Connector. (Ignored on Linux) By setting this variable to [true], the Windows Lucee Installer will launch the BonCode Connector installer silently during the install process. You will see several DOS windows pop-up during the connector install process as the BonCode Connector varifies modules and installs what it needs.
type: boolean
default: true
brooklyn.enrichers:
- type: org.apache.brooklyn.enricher.stock.Transformer
brooklyn.config:
enricher.triggerSensors:
- $brooklyn:sensor("host.address")
enricher.targetSensor: $brooklyn:sensor("main.uri")
enricher.targetValue: $brooklyn:formatString("http://%s/lucee/admin/server.cfm", $brooklyn:attributeWhenReady("host.address"))
- type: org.apache.brooklyn.enricher.stock.Transformer
brooklyn.config:
enricher.triggerSensors:
- $brooklyn:sensor("host.subnet.address")
enricher.targetSensor: $brooklyn:sensor("main.uri.mapped.subnet")
enricher.targetValue: $brooklyn:formatString("http://%s/lucee/admin/server.cfm", $brooklyn:attributeWhenReady("host.subnet.address"))
- type: org.apache.brooklyn.enricher.stock.Transformer
brooklyn.config:
enricher.triggerSensors:
- $brooklyn:sensor("host.name")
enricher.targetSensor: $brooklyn:sensor("main.uri.mapped.public")
enricher.targetValue: $brooklyn:formatString("http://%s/lucee/admin/server.cfm", $brooklyn:attributeWhenReady("host.name"))
brooklyn.initializers:
- type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
brooklyn.config:
name: deployURL
description: |
Deploys a file from a URL
parameters:
url:
description: |
The url to download the file from
required: true
path:
description: |
deployment path
required: true
command: |
sudo wget -O /var/www/html/${path} ${url}
- type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
brooklyn.config:
name: deployFile
description: |
Deploys a file from a string
parameters:
content:
description: |
The file content
required: true
path:
description: |
deployment path
required: true
command: |
sudo tee /var/www/html/${path} <<-EOF
${content}
EOF
brooklyn.config:
shell.env:
LUCEE_DOWNLOAD_LOCATION: $brooklyn:config("lucee.location")
LUCEE_VERSION: $brooklyn:config("lucee.version")
LUCEE_PASSWORD: $brooklyn:config("luceepass")
TOMCAT_PORT: $brooklyn:config("tomcatport")
TOMCAT_SHUTDOWN_PORT: $brooklyn:config("tomcatshutdownport")
TOMCAT_JPA_PORT: $brooklyn:config("tomcatajpport")
SYSTEM_USER: $brooklyn:config("systemuser")
START_AT_BOOT: $brooklyn:config("startatboot")
INSTALL_APACHE_CONNECTOR: $brooklyn:config("installconn")
APACHE_CONTROL_LOCATION: $brooklyn:config("apachecontrolloc")
APACHE_MODULES_LOCATION: $brooklyn:config("apachemodulesloc")
APACHE_CONFIG_LOCATION: $brooklyn:config("apacheconfigloc")
APACHE_LOG_LOCATION: $brooklyn:config("apachelogloc")
INSTALL_IIS: $brooklyn:config("installiis")
install.command: |
sudo yum install -y httpd mod_ssl wget
wget -O ${LUCEE_DOWNLOAD_LOCATION} http://cdn.lucee.org/lucee-${LUCEE_VERSION}-linux-x64-installer.run
customize.command: |
chmod +x ${LUCEE_DOWNLOAD_LOCATION}
sudo /usr/sbin/setsebool -P httpd_can_network_connect=1 || true
sudo ${LUCEE_DOWNLOAD_LOCATION} --mode unattended \
--luceepass ${LUCEE_PASSWORD} \
--tomcatport ${TOMCAT_PORT} \
--tomcatshutdownport ${TOMCAT_SHUTDOWN_PORT} \
--tomcatajpport ${TOMCAT_JPA_PORT} \
--systemuser ${SYSTEM_USER} \
--startatboot ${START_AT_BOOT} \
--installconn ${INSTALL_APACHE_CONNECTOR} \
--apachecontrolloc ${APACHE_CONTROL_LOCATION} \
--apachemodulesloc ${APACHE_MODULES_LOCATION} \
--apacheconfigloc ${APACHE_CONFIG_LOCATION} \
--apachelogloc ${APACHE_LOG_LOCATION} \
--installiis ${INSTALL_IIS}
# see http://docs.lucee.org/guides/Various/installation-installer-documentation/installation-linux/installing-in-unattended-mode.html
launch.command: |
sudo /opt/lucee/lucee_ctl start
checkRunning.command: |
sudo /opt/lucee/lucee_ctl status | grep running
- id: lucee-template
version: "1.0.1-SNAPSHOT" # BROOKLYN_LUCEE_VERSION
name: Lucee Deployment
itemType: template
iconUrl: *luceeIconUrl
license: Apache-2.0
item:
booklyn.config:
defaultDisplayName: Lucee Deployment
services:
- type: centos7-software-process
name: Lucee Server
provisioning.properties:
inboundPorts:
- 22
- 80
- 8080
- 8443
- 31001
- 31880
- 3306
brooklyn.config:
children.startable.mode: FOREGROUND
checkRunning.command: |
echo true
brooklyn.children:
- type: lucee
- type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
id: tomcat
name: Tomcat