source: release-kits/lirk3/bin/ant-installer/web/manual/manual/OptionalTasks/serverdeploy.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 11.7 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18
19<head>
20<meta http-equiv="Content-Language" content="en-us">
21<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22<title>ServerDeploy Task</title>
23
24</head>
25
26<body>
27
28<h2><a name="serverdeploy">ANT ServerDeploy User Manual</a></h2>
29<p>by</p>
30<!-- Names are in alphabetical order, on last name -->
31<ul>
32<li>Christopher A. Longo (<a href="mailto:[email protected]">[email protected]</a>)</li>
33<li>Cyrille Morvan (<a href="mailto:[email protected]">[email protected]</a>)</li>
34</ul>
35
36</p>
37<hr>
38<p> At present the tasks support:<br>
39
40<ul>
41<li><a href="http://www.bea.com" target="_top">Weblogic</a> servers</li>
42<li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a>
432.4 Open Source EJB server</li>
44</ul>
45Over time we expect further optional tasks to support additional J2EE Servers.
46</p>
47
48<hr>
49
50<table border="1" cellpadding="2" cellspacing="0">
51<tr><td>Task</td><td colspan="2">Application Servers</td></tr>
52<tr><td rowspan="4"><a href="#serverdeploy_element">serverdeploy</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr>
53<tr><td><a href="#serverdeploy_generic">generic</a></td><td>Generic task</td></tr>
54<tr><td><a href="#serverdeploy_jonas">jonas</a></td><td>JOnAS 2.4</td></tr>
55<tr><td><a href="#serverdeploy_weblogic">weblogic</a></td><td>Weblogic</td></tr>
56
57</table>
58
59<a name="serverdeploy_element"></a>
60<h2>ServerDeploy element</h2>
61
62<h3><b>Description:</b></h3>
63
64<p>The <code>serverdeploy</code> task is used to run a "hot" deployment tool for
65vendor-specific J2EE server. The task requires nested elements which define
66the attributes of the vendor-specific deployment tool being executed.
67Vendor-specific deployment tools elements may enforce rules for which
68attributes are required, depending on the tool.
69</p>
70
71<h3>Parameters:</h3>
72<table border="1" cellpadding="2" cellspacing="0">
73 <tr>
74 <td valign="top"><b>Attribute</b></td>
75 <td valign="top"><b>Description</b></td>
76 <td valign="top"><b>Required</b></td>
77 </tr>
78 <tr>
79 <td valign="top">action</td>
80 <td valign="top">This is the action to be performed. For most cases this
81 will be "deploy". Some tools support additional actions, such as "delete", "list",
82 "undeploy", "update"...</td>
83 <td>Yes</td>
84 </tr>
85 <tr>
86 <td valign="top">source</td>
87 <td valign="top">A fully qualified path/filename of the component to be deployed.
88 This may be an .ear, .jar, .war, or any other type that is supported by the server.
89 </td>
90 <td>Tool dependent</td>
91 </tr>
92</table>
93
94<h3>Nested Elements</h3>
95
96<p>The serverdeploy task supports a nested <code>classpath</code> element to set the classpath.</p>
97
98<h3>Vendor-specific nested elements</h3>
99
100<h3>Parameters used for all tools:</h3>
101<table border="1" cellpadding="2" cellspacing="0">
102 <tr>
103 <td valign="top"><b>Attribute</b></td>
104 <td valign="top"><b>Description</b></td>
105 <td valign="top"><b>Required</b></td>
106 </tr>
107 <tr>
108 <td valign="top">classpath</td>
109 <td valign="top">The classpath to be passed to the JVM running the tool.
110 The classpath may also be supplied as a nested element.</td>
111 <td>Tool dependent</td>
112 </tr>
113 <tr>
114 <td valign="top">server</td>
115 <td valign="top">The address or URL for the server where the component will be deployed.</td>
116 <td>Tool dependent</td>
117 </tr>
118 <tr>
119 <td valign="top">username</td>
120 <td valign="top">The user with privileges to deploy applications to the server.</td>
121 <td>Tool dependent</td>
122 </tr>
123 <tr>
124 <td valign="top">password</td>
125 <td valign="top">The password of the user with privileges to deploy applications to the server.</td>
126 <td>Tool dependent</td>
127 </tr>
128</table>
129
130<p>Also supported are nested vendor-specific elements.</p>
131
132<a name="serverdeploy_generic"></a>
133<h3>Generic element</h3>
134This element is provided for generic Java-based deployment tools.
135The generic task accepts (but does not require) nested <code>arg</code>
136and <code>jvmarg</code> elements.
137A JVM will be spawned with the provided attributes. It is recommended
138that a vendor-specific element be used over the generic one if at all
139possible.
140<p>The following attributes are supported by the generic element.</p>
141<p>
142<table border="1" cellpadding="2" cellspacing="0">
143 <tr>
144 <td valign="top"><b>Attribute</b></td>
145 <td valign="top"><b>Description</b></td>
146 <td valign="top"><b>Required</b></td>
147 </tr>
148 <tr>
149 <td valign="top">classname</td>
150 <td valign="top">This is the fully qualified classname of the Java based
151 deployment tool to execute.</td>
152 <td>Yes</td>
153 </tr>
154</table>
155</p>
156
157<h3>Nested Elements</h3>
158<p>The generic element supports nested <code>&lt;arg&gt;</code> and <code>&lt;jvmarg&gt;</code> elements.</p>
159
160<h3>Example</h3>
161
162<p>This example shows the use of generic deploy element to deploy a component
163using a Java based deploy tool:</p>
164
165<pre>
166 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.ear&quot;&gt;
167 &lt;generic classname="com.yamato.j2ee.tools.deploy.DeployTool"
168 classpath=&quot;${classpath}&quot;
169 username=&quot;${user.name}&quot;
170 password=&quot;${user.password}&quot;&gt;
171 &lt;arg value="-component=WildStar"/&gt;
172 &lt;arg value="-force"/&gt;
173 &lt;jvmarg value="-ms64m"/&gt;
174 &lt;jvmarg value="-mx128m"/&gt;
175 &lt;/generic&gt;
176 &lt;/serverdeploy&gt;
177</pre>
178
179<a name="serverdeploy_weblogic"></a>
180<h3>WebLogic element</h3>
181<p>
182The WebLogic element contains additional attributes to run the
183<code>weblogic.deploy</code> deployment tool.
184<p>Valid actions for the tool are <code>deploy</code>, <code>undeploy</code>,
185<code>list</code>, <code>update</code>, and <code>delete</code>.
186<p>If the action is <code>deploy</code> or <code>update</code>,
187the <code>application</code> and <code>source</code> attributes must be set.
188If the action is <code>undeploy</code> or <code>delete</code>,
189the <code>application</code> attribute must be set. If the <code>username</code>
190attribute is omitted, it defaults to "system". The <code>password</code> attribute is
191required for all actions.
192<p>
193<table border="1" cellpadding="2" cellspacing="0">
194 <tr>
195 <td valign="top"><b>Attribute</b></td>
196 <td valign="top"><b>Description</b></td>
197 <td valign="top"><b>Required</b></td>
198 </tr>
199 <tr>
200 <td valign="top">application</td>
201 <td valign="top">This is the name of the application being deployed</td>
202 <td>Yes</td>
203 </tr>
204 <tr>
205 <td valign="top">component</td>
206 <td valign="top">This is the component string for deployment targets.
207 It is in the form <code>&lt;component&gt;:&lt;target1&gt;,&lt;target2&gt;...</code>
208 Where component is the archive name (minus the .jar, .ear, .war
209 extension). Targets are the servers where the components will be deployed</td>
210 <td>no</td>
211 </tr>
212 <tr>
213 <td valign="top">debug</td>
214 <td valign="top">If set to true, additional information will be
215 printed during the deployment process.</td>
216 <td>No</td>
217 </tr>
218</table>
219
220
221<h3>Examples</h3>
222
223<p>This example shows the use of serverdeploy to deploy a component to a WebLogic server:</p>
224
225<pre>
226 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.ear&quot;&gt;
227 &lt;weblogic application=&quot;myapp&quot;
228 server=&quot;t3://myserver:7001&quot;
229 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
230 username=&quot;${user.name}&quot;
231 password=&quot;${user.password}&quot;
232 component=&quot;ejb_foobar:myserver,productionserver&quot;
233 debug=&quot;true&quot;/&gt;
234 &lt;/serverdeploy&gt;
235</pre>
236
237<p>This example shows serverdeploy being used to delete a component from a
238WebLogic server:</p>
239
240<pre>
241 &lt;serverdeploy action=&quot;delete&quot; source=&quot;${lib.dir}/ejb_myApp.jar&quot;/&gt
242 &lt;weblogic application=&quot;myapp&quot;
243 server=&quot;t3://myserver:7001&quot;
244 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
245 username=&quot;${user.name}&quot;
246 password=&quot;${user.password}&quot;/&gt;
247 &lt;/serverdeploy&gt;
248</pre>
249
250<a name="serverdeploy_jonas"></a>
251<h3>JOnAS (Java Open Application Server) element</h3>
252<p>
253The JOnAS element contains additional attributes to run the
254<code>JonasAdmin</code> deployment tool.
255<p>Valid actions for the tool are <code>deploy</code>, <code>undeploy</code>,
256<code>list</code> and <code>update</code>.
257<p>You can't use <code>user</code> and <code>password</code> property with this
258task.
259<p>
260<table border="1" cellpadding="2" cellspacing="0">
261 <tr>
262 <td valign="top"><b>Attribute</b></td>
263 <td valign="top"><b>Description</b></td>
264 <td valign="top"><b>Required</b></td>
265 </tr>
266 <tr>
267 <td valign="top">jonasroot</td>
268 <td valign="top">The root directory for JOnAS.</td>
269 <td>Yes</td>
270 </tr>
271 <tr>
272 <td valign="top">orb</td>
273 <td valign="top">Choose your ORB : RMI, JEREMIE, DAVID, ... If omitted, it defaults
274 to the one present in classpath. The corresponding JOnAS JAR is
275 automatically added to the classpath. If your orb is DAVID (RMI/IIOP) you must
276 specify davidhost and davidport properties.</td>
277 <td>No</td>
278 </tr>
279 <tr>
280 <td valign="top">davidhost</td>
281 <td valign="top">The value for the system property : <code>david.CosNaming.default_host</code> .</td>
282 <td>No</td>
283 </tr>
284 <tr>
285 <td valign="top">davidport</td>
286 <td valign="top">The value for the system property : <code>david.CosNaming.default_port</code> .</td>
287 <td>No</td>
288 </tr>
289 <tr>
290 <td valign="top">classname</td>
291 <td valign="top">This is the fully qualified classname of the Java based
292 deployment tool to execute. Default to <code>org.objectweb.jonas.adm.JonasAdmin</code></td>
293 <td>No</td>
294 </tr>
295
296</table>
297
298<h3>Nested Elements</h3>
299<p>The jonas element supports nested <code>&lt;arg&gt;</code> and <code>&lt;jvmarg&gt;</code> elements.</p>
300
301
302<h3>Examples</h3>
303
304<p>This example shows the use of serverdeploy to deploy a component to a JOnAS server:</p>
305
306<pre>
307 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.jar&quot;&gt;
308 &lt;jonas server=&quot;MyJOnAS&quot; jonasroot="${jonas.root}"&gt;
309
310 &lt;classpath&gt;
311 &lt;pathelement path=&quot;${jonas.root}/lib/RMI_jonas.jar&quot;/&gt;
312 &lt;pathelement path=&quot;${jonas.root}/config/&quot;/&gt;
313 &lt;/classpath&gt;
314 &lt;/jonas&gt;
315 &lt;/serverdeploy&gt;
316</pre>
317
318<p>This example shows serverdeploy being used to list the components from a
319JOnAS server and a WebLogic server:</p>
320
321<pre>
322 &lt;serverdeploy action=&quot;list&quot;/&gt
323 &lt;jonas jonasroot=&quot;${jonas.root}&quot; orb=&quot;JEREMIE&quot;/&gt;
324 &lt;weblogic application=&quot;myapp&quot
325 server=&quot;t3://myserver:7001&quot;
326 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
327 username=&quot;${user.name}&quot;
328 password=&quot;${user.password}&quot;/&gt;
329 &lt;/serverdeploy&gt;
330</pre>
331
332
333
334</body>
335</html>
Note: See TracBrowser for help on using the repository browser.