There is an excellent article written by Lara Ziosi (you can find it here) which inspired me to write this post and showing you how to add Target to Module with uDeploy.
In our scenario we have a WebSphere Application Server cell and we are going to install an ear and map a Web Module to a Web Server target.
Usually during ear installation the target is an Application Server or Cluster but sometimes we need to map our application also to a Web Server like IHS, Apache or something else.
First of all create a component of type “WebSphere Enterprise Application”, then create two component processes. The first is a classic deploy process ( see Install Enterprise Application on WebSphere Application Server with uDeploy) while the second : “Add target To Module” has just one step: “Add Target to Module” from the “Application Deployment for WebSphere plug-in“.
Simply fill the Module URI property with the Uri of the module. For example: ALPHA_WAR.war,WEB-INF/web.xml
Go to Resources and add the component to Cluster and to Web Server like in the figure below:
Then add two differents Tags to the component according to the role:
Add resources above to your environment:
Then create an Application Process where “Stop Cluster“, “Install Ear” and “Start Cluster” are limited to Resource Tag: “ClusterForInstall” and “Map Module to IHS” is limited to Resource Tag: ” WebServerForMapping“
In this way the ear will be installed into the Cluster and the mapped to IHS as we wanted.