-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdeploy.xml
289 lines (248 loc) · 14.8 KB
/
deploy.xml
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<?xml version="1.0"?>
<project name="jdg-cross-datacenter-replication-bundle" default="main" xmlns:rhq="antlib:org.rhq.bundle">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<rhq:bundle name="cross-datacenter-replication-bundle" version="1.0" description="JDG 6.6 Cross Datacenter Replication Bundle">
<rhq:input-property
name="xsite.site1.ip"
description="The IP address of Site 1"
required="true"
defaultValue="${xsite.site1.ip}"
type="string" />
<rhq:input-property
name="xsite.site2.ip"
description="The IP address of Site 2"
required="true"
defaultValue="${xsite.site2.ip}"
type="string" />
<rhq:input-property
name="xsite.admin.username"
description="The admin username for the management console"
required="true"
defaultValue="${xsite.admin.username}"
type="string" />
<rhq:input-property
name="xsite.admin.password"
description="The admin password for the management console"
required="true"
defaultValue="${xsite.admin.password}"
type="string" />
<rhq:input-property
name="xsite.site1.eap.offset"
description="The port-offset of EAP instance of Site 1"
required="true"
defaultValue="${xsite.site1.eap.offset}"
type="string" />
<rhq:input-property
name="xsite.site2.eap.offset"
description="The port-offset of EAP instance of Site 2"
required="true"
defaultValue="${xsite.site2.eap.offset}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg1.offset"
description="The port-offset of 1st JDG instance EAP of Site 1"
required="true"
defaultValue="${xsite.site1.jdg1.offset}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg2.offset"
description="The port-offset of 2nd JDG instance EAP of Site 1"
required="true"
defaultValue="${xsite.site1.jdg2.offset}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg3.offset"
description="The port-offset of 3rd JDG instance EAP of Site 1"
required="true"
defaultValue="${xsite.site1.jdg3.offset}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg1.offset"
description="The port-offset of 1st JDG instance EAP of Site 2"
required="true"
defaultValue="${xsite.site2.jdg1.offset}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg2.offset"
description="The port-offset of 2nd JDG instance EAP of Site 2"
required="true"
defaultValue="${xsite.site2.jdg2.offset}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg3.offset"
description="The port-offset of 3rd JDG instance EAP of Site 2"
required="true"
defaultValue="${xsite.site2.jdg3.offset}"
type="string" />
<rhq:input-property
name="xsite.site1.eap.log_name"
description="The log filename for the EAP instance of Site 1"
required="true"
defaultValue="${xsite.site1.eap.log_name}"
type="string" />
<rhq:input-property
name="xsite.site2.eap.log_name"
description="The log filename for the EAP instance of Site 2"
required="true"
defaultValue="${xsite.site2.eap.log_name}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg1.log_name"
description="The log filename for the 1st JDG instance of Site 1"
required="true"
defaultValue="${xsite.site1.jdg1.log_name}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg2.log_name"
description="The log filename for the 2nd JDG instance of Site 1"
required="true"
defaultValue="${xsite.site1.jdg2.log_name}"
type="string" />
<rhq:input-property
name="xsite.site1.jdg3.log_name"
description="The log filename for the 3rd JDG instance of Site 1"
required="true"
defaultValue="${xsite.site1.jdg3.log_name}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg1.log_name"
description="The log filename for the 1st JDG instance of Site 2"
required="true"
defaultValue="${xsite.site2.jdg1.log_name}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg2.log_name"
description="The log filename for the 2nd JDG instance of Site 2"
required="true"
defaultValue="${xsite.site2.jdg2.log_name}"
type="string" />
<rhq:input-property
name="xsite.site2.jdg3.log_name"
description="The log filename for the 3rd JDG instance of Site 2"
required="true"
defaultValue="${xsite.site2.jdg3.log_name}"
type="string" />
<rhq:input-property
name="xsite.site1.backup_repl"
description="Option whether the backup replication should happen SYNC or ASYNC"
required="true"
defaultValue="${xsite.site1.backup_repl}"
type="string" />
<rhq:input-property
name="xsite.site1.backup_failure_policy"
description="Option whether backup failure should be IGNORE, FAIL or WARN"
required="true"
defaultValue="${xsite.site1.backup_failure_policy}"
type="string" />
<rhq:input-property
name="xsite.site2.backup_repl"
description="Option whether the backup replication should happen SYNC or ASYNC"
required="true"
defaultValue="${xsite.site2.backup_repl}"
type="string" />
<rhq:input-property
name="xsite.site2.backup_failure_policy"
description="Option whether backup failure should be IGNORE, FAIL or WARN"
required="true"
defaultValue="${xsite.site2.backup_failure_policy}"
type="string" />
<rhq:input-property
name="eap.folder.name"
description="Folder name for EAP depending on the release"
required="true"
defaultValue="${eap.folder.name}"
type="string" />
<rhq:input-property
name="jdg.folder.name"
description="Folder name for JDG depending on the release"
required="true"
defaultValue="${jdg.folder.name}"
type="string" />
<rhq:input-property
name="eap.binary.name"
description="Binary (.zip) name for EAP depending on the release"
required="true"
defaultValue="${eap.binary.name}"
type="string" />
<rhq:input-property
name="jdg.binary.name"
description="Binary (.zip) name for JDG depending on the release"
required="true"
defaultValue="${jdg.binary.name}"
type="string" />
<rhq:input-property
name="jgroups.stack"
description="JGroups stack (tcp/udp) to use" required="true"
defaultValue="${jgroups.stack}"
type="string" />
<rhq:deployment-unit name="cross-datacenter-replication" preinstallTarget="preinstall" postinstallTarget="postinstall" compliance="full">
<rhq:archive name="binaries/${jdg.binary.name}" exploded="true"/>
<rhq:archive name="binaries/${eap.binary.name}" exploded="true"/>
<rhq:file name="configuration/eap-standalone.xml" destinationFile="${rhq.deploy.dir}/${eap.folder.name}/standalone/configuration/eap-standalone.xml" replace="true" />
<rhq:file name="configuration/jdg-site-1.xml" destinationFile="${rhq.deploy.dir}/${jdg.folder.name}/standalone/configuration/jdg-site-1.xml" replace="true" />
<rhq:file name="configuration/jdg-site-2.xml" destinationFile="${rhq.deploy.dir}/${jdg.folder.name}/standalone/configuration/jdg-site-2.xml" replace="true" />
<rhq:file name="configuration/jdg-site-1-tcp.xml" destinationFile="${rhq.deploy.dir}/${jdg.folder.name}/standalone/configuration/jdg-site-1-tcp.xml" replace="true" />
<rhq:file name="configuration/jdg-site-2-tcp.xml" destinationFile="${rhq.deploy.dir}/${jdg.folder.name}/standalone/configuration/jdg-site-2-tcp.xml" replace="true" />
<rhq:file name="scripts/pump-data-into-site1-via-hotrod.sh" destinationFile="${rhq.deploy.dir}/scripts/pump-data-into-site1-via-hotrod.sh" replace="true" />
<rhq:file name="scripts/pump-data-into-site2-via-hotrod.sh" destinationFile="${rhq.deploy.dir}/scripts/pump-data-into-site2-via-hotrod.sh" replace="true" />
<rhq:file name="binaries/hotrod-demo.jar" destinationFile="${rhq.deploy.dir}/runtime/hotrod-demo.jar"/>
<rhq:file name="scripts/start-site1-eap6.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site1-eap6.sh" replace="true" />
<rhq:file name="scripts/stop-site1-eap6.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site1-eap6.sh" replace="true" />
<rhq:file name="properties/site1-eap6.properties" destinationFile="${rhq.deploy.dir}/properties/site1-eap6.properties" replace="true" />
<rhq:file name="scripts/start-site1-jdg-cluster.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site1-jdg-cluster.sh" replace="true" />
<rhq:file name="scripts/stop-site1-jdg-cluster.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site1-jdg-cluster.sh" replace="true" />
<rhq:file name="scripts/start-site1-jdg-node.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site1-jdg-node.sh" replace="true" />
<rhq:file name="scripts/stop-site1-jdg-node.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site1-jdg-node.sh" replace="true" />
<rhq:file name="properties/site1-jdg1.properties" destinationFile="${rhq.deploy.dir}/properties/site1-jdg1.properties" replace="true" />
<rhq:file name="properties/site1-jdg2.properties" destinationFile="${rhq.deploy.dir}/properties/site1-jdg2.properties" replace="true" />
<rhq:file name="properties/site1-jdg3.properties" destinationFile="${rhq.deploy.dir}/properties/site1-jdg3.properties" replace="true" />
<rhq:file name="scripts/start-site2-eap6.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site2-eap6.sh" replace="true" />
<rhq:file name="scripts/stop-site2-eap6.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site2-eap6.sh" replace="true" />
<rhq:file name="properties/site2-eap6.properties" destinationFile="${rhq.deploy.dir}/properties/site2-eap6.properties" replace="true" />
<rhq:file name="scripts/start-site2-jdg-cluster.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site2-jdg-cluster.sh" replace="true" />
<rhq:file name="scripts/stop-site2-jdg-cluster.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site2-jdg-cluster.sh" replace="true" />
<rhq:file name="scripts/start-site2-jdg-node.sh" destinationFile="${rhq.deploy.dir}/scripts/start-site2-jdg-node.sh" replace="true" />
<rhq:file name="scripts/stop-site2-jdg-node.sh" destinationFile="${rhq.deploy.dir}/scripts/stop-site2-jdg-node.sh" replace="true" />
<rhq:file name="properties/site2-jdg1.properties" destinationFile="${rhq.deploy.dir}/properties/site2-jdg1.properties" replace="true" />
<rhq:file name="properties/site2-jdg2.properties" destinationFile="${rhq.deploy.dir}/properties/site2-jdg2.properties" replace="true" />
<rhq:file name="properties/site2-jdg3.properties" destinationFile="${rhq.deploy.dir}/properties/site2-jdg3.properties" replace="true" />
</rhq:deployment-unit>
</rhq:bundle>
<target name="preinstall">
<echo>Downloading the shared cross-site-required-archives.zip into ${rhq.deploy.dir}/binaries</echo>
<get src="https://drive.google.com/uc?export=download&id=0BxJhoZ1V34QHZ1Fpek9mU0Z1Smc"
verbose="true"
usetimestamp="true"
skipexisting="true"
dest="binaries/cross-site-required-archives.zip"/>
<unzip src="binaries/cross-site-required-archives.zip" dest="binaries"/>
</target>
<target name="postinstall">
<copy file="binaries/jdg-visualizer.war" todir="${rhq.deploy.dir}/${eap.folder.name}/standalone/deployments"/>
<touch file="${rhq.deploy.dir}/${eap.folder.name}/standalone/deployments/jdg-visualizer.war.dodeploy"/>
<mkdir dir="${rhq.deploy.dir}/runtime"/>
<copy todir="${rhq.deploy.dir}/runtime/site1-eap6-standalone">
<fileset dir="${rhq.deploy.dir}/${eap.folder.name}/standalone">
<exclude name="tmp/"/>
</fileset>
</copy>
<copy todir="${rhq.deploy.dir}/runtime/site2-eap6-standalone">
<fileset dir="${rhq.deploy.dir}/${eap.folder.name}/standalone">
<exclude name="tmp/"/>
</fileset>
</copy>
<copy todir="${rhq.deploy.dir}/runtime/jdg-standalone">
<fileset dir="${rhq.deploy.dir}/${jdg.folder.name}/standalone"/>
</copy>
<copy file="configuration/mgmt-users.properties" todir="${rhq.deploy.dir}/runtime/site1-eap6-standalone/configuration" overwrite="true"/>
<copy file="configuration/mgmt-users.properties" todir="${rhq.deploy.dir}/runtime/site2-eap6-standalone/configuration" overwrite="true"/>
<copy file="configuration/mgmt-users.properties" todir="${rhq.deploy.dir}/runtime/jdg-standalone/configuration" overwrite="true"/>
<chmod perm="ugo+rx">
<fileset dir="${rhq.deploy.dir}">
<include name="**/*.sh"/>
<include name="**/*.bat"/>
</fileset>
</chmod>
</target>
<target name="main" />
</project>