WildFly Exploded Deployments with CLI: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 14: Line 14:


Expanding the archive in the deployment directory works but care must be taken not to interfere with the deployment scanner that monitors that directory.
Expanding the archive in the deployment directory works but care must be taken not to interfere with the deployment scanner that monitors that directory.
<blockquote style="background-color: Gold; border: solid thin Goldenrod;">
:<br>The name of the exploded root directory must end in the same extension as the JEE archive it is extracted from. If test.ear is deployed, then the exploded root directory name must end in .ear.<br><br>
</blockquote>


==Trigger the Deployment via CLI==
==Trigger the Deployment via CLI==

Revision as of 00:00, 1 April 2016

Internal

Overview

Exploded deployments are not deployed by default by a WildFly instance. They can be triggered by configuring the deployment scanner, using marker files or via CLI. The procedure to trigger the deployment with CLI is described below.

Procedure

"Explode" the JEE archive

Expand the JEE archive. The archive can be expanded in any local directory accessible to the application server, not necessarily under the deployments directory.

Expanding the archive in the deployment directory works but care must be taken not to interfere with the deployment scanner that monitors that directory.


The name of the exploded root directory must end in the same extension as the JEE archive it is extracted from. If test.ear is deployed, then the exploded root directory name must end in .ear.

Trigger the Deployment via CLI

Connect the CLI to the application server instance. For more details on how to connect CLI see Connect to a Controller.

Trigger the deployment with the following command, providing appropriate values to the "runtime-name" and the "path" attributes.

[standalone@localhost:9999 /] /deployment=test:add(runtime-name="test.ear", enabled=true, content=[{"path"=>"/Users/ovidiu/runtime/jboss-eap-6.4/profiles/msc/deployments/mBanking.ear", "archive"=>false}])

The "runtime-name" is the name under which your deployment will be known to the application server. If the deployment is successful, the name will be found under /deployment CLI structure.

The "path" is the absolute path on the local file system. Note that the name of the directory does not have to have any specific extension.


The Deployment Database

    <deployments>
        <deployment name="my-test-deployment" runtime-name="test.ear">
            <fs-exploded path="/Users/ovidiu/tmp/test-exploded-dir.ear"/>
        </deployment>
    </deployments>