Installing enterprise application files by adding properties files to a monitored directory
You can use application properties files to install enterprise application files on a server or cluster, update deployed applications or modules, or uninstall deployed applications or modules. Drag or copy a properties file to a monitored directory and the product performs the deployment action described in the properties file. The enterprise application files that you can install, update, or uninstall using properties files include enterprise archive (EAR), web archive (WAR), Java™ archive (JAR), and Session Initiation Protocol (SIP) archive (SAR) files. An enterprise application file must conform to the Java Platform, Enterprise Edition (Java EE) specification.
Before you begin
Develop and assemble the EAR, JAR, WAR, or SAR file. You can use a supported assembly tool such as an IBM® Rational® Application Developer for WebSphere® Software product to specify bindings and assemble the file.
Unlike the procedure described in Installing enterprise application files by adding them to a monitored directory, which does not change existing Java Naming and Directory (JNDI) and other application bindings, you can set bindings in a properties file.
By default, monitored directory deployment is not enabled. Before you can use monitored directory deployment, you must enable it. See Setting monitored directory deployment values.
About this task
You can deploy an EAR, JAR, WAR, or SAR file to an application server or cluster by dragging or copying an application properties file to a monitoredDeployableApps/deploymentProperties monitored directory. The product scans a monitored directory for new properties files no more frequently than every 5 seconds, by default. After finding a new properties file in a monitored directory, the product automatically runs the wsadmin applyConfigProperties command, installs the application or module on the application server or cluster, and starts the application or module.
You do not need to start wsadmin or enter any commands to deploy the application or module. Simply add a properties file to a monitored directory. The product runs the wsadmin applyConfigProperties command for you.
You can also use a properties file to update or delete a deployed application or module. The server or cluster must be running so that the product can detect changes to files in its monitored directory.
The steps assume that you use a graphical file browser to drag or copy the properties file. Alternatively, you can use operating system commands to copy a file into a monitoredDeployableApps/deploymentProperties monitored directory.
Procedure
Results
The product adds a directory having the same name as the file to the installedApps/cell_name directory of the profile.
Also, the product writes messages about the
application deployment to the SystemOut.log file
in the app_server_root/logs/server_name directory.
The messages start with the CWLDD
message key.
The messages indicate that the product deployed the application file and that the application is running.
For installations on a deployment manager monitored directory, the product does not start an application or module automatically if the node agent or server is not running. If a node agent is stopped, the product installs the application or module at the deployment manager level, but does not synchronize the changes with the node and does not start the application or module. The changes will occur at the node the next time the agent is running and a node synchronization occurs. If the server is stopped but the node agent is running, the product installs the application or module and synchronizes the changes with the node, but does not start the server.
Example
The following example properties files provide templates that you can modify to deploy your applications:
- Install an enterprise application on a deployment target
- Install an enterprise application with various task options using the old application output format
- Install an enterprise application with various task options using the simple output format
- Update a single file in a deployed enterprise application
- Remove a single file from a deployed enterprise application
- Update a single module in a deployed enterprise application
- Remove a single module from a deployed enterprise application
- Replace, add, or delete multiple files of a deployed enterprise application
- Replace the entire deployed enterprise application
- Uninstall an application from a deployment target
- Edit the deployment options of a deployed application
- Edit web module deployment properties
Install an enterprise application on a deployment target
Property | Description |
---|---|
Name | Specifies the name of application to install. |
TargetServer | Specifies the name of server on which application to be installed |
TargetNode | Specifies the name of node on which application to install |
EarFileLocation | Specifies the location of the enterprise archive (EAR file). Provide a fully qualified path name. |
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
TargetServer=!{serverName}
TargetNode=!{nodeName}
EarFileLocation=/temp/HelloWorld.ear
#TargetCluster=cluster1
EnvironmentVariablesSection
#
#
#Environment Variables
cellName=myCell
nodeName=myNode
serverName=myServer
Install an enterprise application with various task options using the old application output format
The example properties install an
enterprise application with task options. The properties file displays
all columns, including hidden and non-hidden columns, of install task
and task data values in separate rows. The mutables
row
shows which columns you can edit (true
) and which
you cannot edit (false
).
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=!{applicationName}
EarFileLocation=c:/temp/HelloWorld.ear
#
# SubSection 1.0.2 # MapModulesToServers Section. taskName
# and row0 should not be edited. row0 contains column names
# for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapModulesToServers
mutables={false false true false false false} #readonly
row0={module uri server ModuleVersion moduletype moduletypeDisplay} # readonly
row1={“My Web Module” myWebModule.war,WEB-INF/web.xml
WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} 14
moduletype.web "Web Module"}
row2={"My EJB module" MyEjbModule.jar,META-INF/ejb-jar.xml
WebSphere:cell=!{cellName},node=!{nodeName},server=
!{serverName} 13 moduletype.ejb "EJB Module"}
#
# SubSection 1.0.3 # MapRolesToUsers Section. taskName and
# row0 should not be edited. row0 contains column names for
# the tasks.
#ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapRolesToUsers
row0={role role.everyone role.all.auth.user role.user
role.group role.all.auth.realms role.user.access.ids
role.group.access.ids} #readonly
mutables={false true true true true true true true}
#readonly
row1={administrator AppDeploymentOption.No
AppDeploymentOption.No "adminuser" "admingroup"
AppDeploymentOption.No "" ""}
#
# SubSection 1.0.4 # BindJndiForEJBNonMessageBinding
# Section. taskName and row0 should not be edited. row0
# contains column names for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#Properties
#
taskName=BindJndiForEJBNonMessageBinding
row0={EJBModule EJB uri JNDI ModuleVersion
localHomeJndi remoteHomeJndi} #readonly
mutables={false false false true false true true} #readonly
row1={"My EJB module" myEjb myEjbModule.jar,META-INF/ejb-
jar.xml myEjb 20 "" “"}
#
# SubSection 1.0.5 # MapEJBRefToEJB Section. taskName and
# row0 should not be edited. row0 contains column names for
# the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#Properties
#
taskName=MapEJBRefToEJB
row0={module EJB uri referenceBinding class JNDI
ModuleVersion} #readonly
mutables={false false false false false true false}
#readonly
row1={"My EJB module" myEJB MyEjbModule.jar,META-INF/ejb-
jar.xml myEJB com.ibm.defaultapplication.Increment
Increment 23}
#
# SubSection 1.0.6 # DataSourceFor20EJBModules Section.
# taskName and row0 should not be edited. row0 contains
# column names for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#
#Properties
#
taskName=DataSourceFor20EJBModules
row0={AppVersion EJBModule uri JNDI resAuth
login.config.name auth.props dataSourceProps} #readonly
mutables={false false false true true true true true}
#readonly
row1={13 "My EJB module" MyEjbModule.jar,META-INF/ejb-
jar.xml MyDataSource cmpBinding.perConnectionFactory "" ""
""}
#
# SubSection 1.0.7 # DataSourceFor20CMPBeans Section.
# taskName and row0 should not be edited. row0 contains
# column names for the task.#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=DataSourceFor20CMPBeans
row0={AppVersion EJBVersion EJBModule EJB uri JNDI resAuth
login.config.name auth.props} #readonly
mutables={false false false false false true true true
true} #readonly
row1={13 13 "My EJB module" MyEjb MyEjbModule.jar,META-
INF/ejb-jar.xml myDataSource
cmpBinding.perConnectionFactory "" ""}
#
# SubSection 1.0.8 # MapWebModToVH Section. taskName and
# row0 should not be edited. row0 contains column names for
# the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
# Properties
#
taskName=MapWebModToVH
row0={webModule uri virtualHost} #readonly
mutables={false false true} #readonly
row1={"My Web Application" MyWebModule.war,WEB-INF/web.xml
default_host}
#
#
# SubSection 1.0.9 # CtxRootForWebMod Section. taskName and
# row0 should not be edited. row0 contains column names for
# the task.#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=CtxRootForWebMod
row0={webModule uri web.contextroot} #readonly
mutables={false false true} #readonly
row1={"My Web Application" MyWebModule.war,WEB-INF/web.xml
/}
#
# SubSection 1.0.10 # MapSharedLibForMod Section. taskName
# and row0 should not be edited. row0 contains column names
# for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapSharedLibForMod
row0={module uri sharedLibName} #readonly
mutables={false false true} #readonly
row2={"My Web Application" MyWebModule.war,WEB-INF/web.xml
""}
row1={myApp META-INF/application.xml ""}#
#
# SubSection 1.0.11 # JSPReloadForWebMod Section. taskName
# and row0 should not be edited. row0 contains column names
# for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=JSPReloadForWebMod
row0={webModule uri jspReloadEnabled jspReloadInterval}
#readonly
mutables={false false true true} #readonly
row1={"My Web Application" MyWebModule.war,WEB-INF/ibm-web-
ext.xmi AppDeploymentOption.Yes}
#
#
# SubSection 1.0.35 # SharedLibRelationship Section.
# taskName and row0 should not be edited. row0 contains
# column names for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=SharedLibRelationship
row0={module uri relationship compUnitName matchTarget
origRelationship} #readonly
mutables={false false true true true false} #readonly
row2={"My Web Application" MyWebModule.war,WEB-INF/web.xml
"" "" AppDeploymentOption.Yes ""}
row1={myApp META-INF/application.xml "" ""
AppDeploymentOption.Yes ""}
#
EnvironmentVariablesSection
#
# Environment Variables
#
applicationName=myApp
cellName=myCell
nodeName=myNode
serverName=myServer
Install an enterprise application with various task options using the simple output format
The
example properties install an enterprise application with task options.
The example shows application properties that have been extracted
with the SimpleOutputFormat
option. With this option,
the properties file displays non-hidden columns of application properties
in columnName=value
pairs. Hidden columns of application
properties are not included in the output. You might find that extracting
application properties files with the SimpleOutputFormat
option
produces a format that is easier to read and edit.
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=!{applicationName}
EarFileLocation=c:/temp/HelloWorld.ear
#
# SubSection 1.0.2 # MapModulesToServers Section. taskName
# and lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapModulesToServers
row0={ module="My EJB Module" #readonly
uri=MyEjbModule.jar,META-INF/ejb-jar.xml #readonly
server=WebSphere:cell=!{cellName},node=!{nodeName},
server=!{serverName} }
row1={ module="My Web Module" #readonly
uri=myWebModule.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},node=!{nodeName},
server=!{serverName} }
#
# SubSection 1.0.3 # MapRolesToUsers Section. taskName and
# lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapRolesToUsers
row0={ role="All Role" #readonly
role.everyone=AppDeploymentOption.No
role.all.auth.user=AppDeploymentOption.Yes
role.user=""
role.group=""
role.all.auth.realms=AppDeploymentOption.No
role.user.access.ids=""
role.group.access.ids="" }
#
# SubSection 1.0.4 # BindJndiForEJBNonMessageBinding
# Section. taskName and lines marked as "#readonly" should
# not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#Properties
#
taskName=BindJndiForEJBNonMessageBinding
row0={ EJBModule="My EJB Module" #readonly
EJB=myEjb #readonly
uri=myEjbModule.jar,META-INF/ejb-jar.xml #readonly
JNDI=myEjb
localHomeJndi=""
remoteHomeJndi="" }
#
# SubSection 1.0.5 # MapEJBRefToEJB Section. taskName and
# lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#Properties
#
taskName=MapEJBRefToEJB
row0={ module="My EJB Module" #readonly
EJB=myEJB #readonly
uri=MyejbModule.jar,META-INF/ejb-jar.xml #readonly
referenceBinding=myEJB #readonly
class=com.ibm.defaultapplication.Increment #readonly
JNDI=myejb }
#
# SubSection 1.0.6 # DataSourceFor20EJBModules Section.
# taskName and lines marked as "#readonly" should not be
# edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
#
#Properties
#
taskName=DataSourceFor20EJBModules
row0={ EJBModule="My EJB Module"
#readonly
uri=myEjbModule.jar,META-INF/ejb-jar.xml #readonly
JNDI=MyDatasource
resAuth=cmpBinding.perConnectionFactory
login.config.name=""
auth.props=""
dataSourceProps="" }
#
# SubSection 1.0.7 # DataSourceFor20CMPBeans Section.
# taskName and lines marked as "#readonly" should not be
# edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=DataSourceFor20CMPBeans
row0={ EJBModule="My EJB Module” #readonly
EJB=MyEjb #readonly
uri=MyEjbModule.jar,META-INF/ejb-jar.xml #readonly
JNDI=MyDatasource
resAuth=cmpBinding.perConnectionFactory
login.config.name=""
auth.props="" }
#
# SubSection 1.0.8 # MapWebModToVH Section. taskName and
# lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
# Properties
#
taskName=MapWebModToVH
row0={ webModule="My Web Application" #readonly
uri=myWebModule.war,WEB-INF/web.xml
#readonly
virtualHost=default_host }
#
# SubSection 1.0.9 # CtxRootForWebMod Section. taskName and
# lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
# Properties
#
taskName=CtxRootForWebMod
row0={ webModule="My Web Application" #readonly
uri=myWebModule.war,WEB-INF/web.xml
#readonly
web.contextroot=/ }
#
# SubSection 1.0.10 # MapSharedLibForMod Section.
# taskName and lines marked as "#readonly" should not be
# edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=MapSharedLibForMod
row0={ module=myApp” #readonly
uri=META-INF/application.xml #readonly
sharedLibName="" }
row1={ module="My Web Application" #readonly
uri=MyWebModule.war,WEB-INF/web.xml #readonly
sharedLibName="" }
#
# SubSection 1.0.11 # JSPReloadForWebMod Section. taskName
# and lines marked as "#readonly" should not be
# edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=JSPReloadForWebMod
row0={ webModule="My Web Application" #readonly
uri=MyWebModule.war,WEB-INF/web.xml
#readonly
jspReloadEnabled=AppDeploymentOption.Yes
jspReloadInterval=10 }
#
# SubSection 1.0.35 # SharedLibRelationship Section.
# taskName and lines marked as "#readonly" should not be
# edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=SharedLibRelationship
row0={ module=myApp #readonly
uri=META-INF/application.xml #readonly
relationship=""
matchTarget=AppDeploymentOption.Yes }
row1={ module="My Web Application" #readonly
uri=MyWebModule.war,WEB-INF/web.xml
#readonly
relationship=""
matchTarget=AppDeploymentOption.Yes }
EnvironmentVariablesSection
#
# Environment Variables
#
applicationName=myApp
cellName=myCell
nodeName=myNode
serverName=myServer
Update a single file in a deployed enterprise application
The example properties add a single file to a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=add
contentType=file
contentURI=test.war/com/ibm/addMe.jsp
contentFile=/temp/addMe.jsp
Remove a single file from a deployed enterprise application
The example properties delete a single file from a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=delete
contentType=file
contentURI=test.war/com/ibm/addMe.jsp
Update a single module in a deployed enterprise application
The example properties add a single module to a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=add
contentType=moduleFile
#contextRoot=”/mywebapp” # required for web module only
contentURI=Increment.jar
contentFile=/apps/app1/Increment.jar
deployEJB=false
Remove a single module from a deployed enterprise application
The example properties delete a single module from a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=delete
contentType=moduleFile
contentURI=test.war
Replace, add, or delete multiple files of a deployed enterprise application
This option specifies to update multiple files of an installed application by uploading a compressed file. Depending on the contents of the compressed file, a single use of this option can replace files in, add new files to, and delete files from the installed application. Each entry in the compressed file is treated as a single file and the path of the file from the root of the compressed file is treated as the relative path of the file in the installed application.
To replace a file, a file in the compressed file must have the same relative path as the file to be updated in the installed application.
To add a new file to the installed application, a file in the compressed file must have a different relative path than the files in the installed application.
The
relative path of a file in the installed application is formed by
concatenation of the relative path of the module, if the file is inside
a module, and the relative path of the file from the root of the module
separated by a forward slash (/
).
To remove
a file from the installed application, specify metadata in the compressed
file using a file named META-INF/ibm-partialapp-delete.props at
any archive scope. The ibm-partialapp-delete.props
file
must be an ASCII file that lists files to be deleted in that archive
with one entry for each line. The entry can contain a string pattern
such as a regular expression that identifies multiple files. The file
paths for the files to be deleted must be relative to the archive
path that has the META-INF/ibm-partialapp-delete.props file.
For
more information about the metadata .props file
to include in compressed files, see the Replace, add, or delete
multiple files
section in Preparing for application update settings.
The example properties use the myAppPartial.zip
compressed
file to update a deployed application named hello
:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=update
contentType=partialapp
contentFile=/temp/MyApp/myAppPartial.zip
Replace the entire deployed enterprise application
The example properties update the entire deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=hello
Update=true
operationType=update
contentType=app
contentFile=/apps/app1/newApp1.ear
useDefaultBindings=true
Uninstall an application from a deployment target
The example properties uninstall a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
DELETE=true
# Properties
Name=hello
Edit the deployment options of a deployed application
The example properties update the deployment options of a deployed application:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
# Properties
Name=!{applicationName}
#
# SubSection 1.0.1 # AppDeploymentOptions Section. taskName
# and row0 should not be edited. row0 contains column names
# for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=!{applicationName}
#
#
# Properties
#
taskName=AppDeploymentOptions
row1={$(APP_INSTALL_ROOT)/$(CELL)
AppDeploymentOption.Yes
AppDeploymentOption.No
AppDeploymentOption.No
AppDeploymentOption.No
""
off .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755
"WASX.SERV1 [x0617.27]"
AppDeploymentOption.No
AppDeploymentOption.No}
mutables={true true true true true true true true false true true}
row0={installed.ear.destination
distributeApp
useMetaDataFromBinary
createMBeansForResources
reloadEnabled
reloadInterval
validateinstall
filepermission
buildVersion
allowDispatchRemoteInclude
allowServiceRemoteInclude} #readonly
#
EnvironmentVariablesSection
#
#
#Environment Variables
applicationName=newhello
Edit web module deployment properties
The example properties edit the deployment properties of a web module:
#
# WebModuleDeployment
#
ResourceType=WebModuleDeployment
ImplementingResourceType=Application
ResourceId=Cell=!{cellName}:Deployment=!{applicationName}:ApplicationDeployment=
:WebModuleDeployment=uri#web.war
#
#Properties
#
startingWeight=90000 #integer,required,default(1)
deploymentId=1 #required
classloaderMode=PARENT_FIRST ENUM(PARENT_FIRST|PARENT_LAST),default(PARENT_FIRST)
altDD=null
uri=web.war #required
#applicationDeployment=Cell=!{cellName}:Deployment=!{applicationName}:ApplicationDeployment=
#ObjectName(ApplicationDeployment)
EnvironmentVariablesSection
#
#
#Environment Variables
cellName=myCell
applicationName=myApp
What to do next
If the properties file deploys an application or module, test the deployed application or module. For example, enter the URL for a deployed application in a web browser and examine the performance of the application.
If the deployment is not successful, read messages in the SystemOut.log file, fix the error condition, and add the properties file to the monitored directory again.