Part 4. Publishing application patterns to Workload Deployer
During the development of application patterns, you can find yourself editing two kinds of artifacts – virtual application patterns and the source code of the components in the patterns. Rational Application Developer provides the integrated development environment for editing source code. Workload Deployer provides the Virtual Application Builder for editing virtual application patterns. To edit an application pattern that was created within Rational Application Developer, you must publish the application pattern to Workload Deployer. This accomplishes two key things:
- The application pattern and associated component projects are exported and delivered to Workload Deployer in a form it can consume and manage.
- Rational Application Developer links the application pattern in the workspace to its counterpart in Workload Deployer so that actions taken against the pattern in Rational Application Developer can be reflected in Workload Deployer or vice versa.
Note that publication is not the same as deployment. When you publish an application pattern in Rational Application Developer to Workload Deployer, the pattern is added to the set of virtual application patterns in the Workload Deployer storehouse. By default, Rational Application Developer does not deploy an instance of the application pattern (though an option to that effect is available).
In this part of the tutorial, you publish your application pattern to Workload Deployer and observe the effects within the Rational Application Developer servers view and in the Workload Deployer dashboard.
- In the Servers view, right-click on the Workload Deployer server
and select Add and Remove to open the Add and
Remove dialog as shown in Figure 15.
Figure 15. The Add and Remove dialog
- Under the list of Available resources, select Webby [Cloud apps].
- Click Add > to move the virtual application pattern over to the list of Configured resources.
- Click Finish.
Rational Application Developer dispatches a background job to export and publish the virtual application pattern to Workload Deployer.
- In the Servers view, the newly added virtual application pattern
appears immediately in the tree as a child of the Workload
Deployer server, but with no state or status.
After a few seconds, the state and status of the Workload Deployer server changes to
[Connected, Publishing...]and remains that way while Rational Application Developer publishes the application.
After a few more seconds, provided publication is successful, the state and status of the Workload Deployer server changes to
[Connected, Synchronized], and the state and status of the Webby application appears as
[Stopped, Synchronized], as shown in Figure 16.
Figure 16. The Servers view after adding the application pattern
The status of "Synchronized" indicates that the virtual application pattern in the Rational Application Developer workspace and on Workload Deployer is in sync with each other. The application state of "Stopped" indicates that Rational Application Developer has published, but not deployed, the virtual application pattern.
Note: You can expand the virtual application pattern to reveal the associated application projects and their constituent modules. However, this is for information purposes only.
Several actions are available on an application under a Workload Deployer server in the Servers view. If you are familiar with using Rational Application Developer to develop for the WebSphere Application Server, some of the actions look familiar. Others are unique to Workload Deployer applications.
In the Servers view, right-click on the published virtual application pattern to open the context menu and review several of its actions. Do not select any of the actions at this time. Table 2 shows the actions in the context menu of an application under a Workload Deployer server and explains what they do.
Table 2. Workload Deployer application context menu actions
|Start||Deploys the application pattern on Workload Deployer.|
|Stop||Terminates the application instance that was previously deployed from Rational Application Developer.|
|Restart||Restarts a Rational Application Developer deployed application pattern.|
|Remove||Removes an application pattern from Workload Deployer, and is equivalent to using the Add and Remove dialog. If there exists a virtual application instance previously deployed from Rational Application Developer, the instance is terminated.|
|Reacquire||Reacquires an application pattern from Workload Deployer into the Rational Application Developer workspace.|
|Detach||Severs the tie between the application pattern in Rational Application Developer and on Workload Deployer.|
|Get information||Opens a dialog with information about the published or deployed application pattern on Workload Deployer.|
- In the Servers view, right-click on the Workload Deployer server and select Launch Dashboard. Depending upon your preferred browser under Window > Web Browser, Rational Application Developer may open the Workload Deployer dashboard in the Rational Application Developer embedded browser, or in a stand-alone browser.
- In the Workload Deployer dashboard, select Patterns > Virtual Applications.
- Under Virtual Application Patterns, select Web Application
Pattern Type 2.0 if it is not already selected as
shown in Figure 17.
Figure 17. Virtual application patterns
- Beneath Web Application Pattern Type 2.0 is a list of application
patterns. Confirm that "Webby" appears in the list.
Note: The other applications in the list may differ from what is shown here.
- Select Webby to review the details of the virtual application pattern.
- From the list of actions for the Webby application pattern as
shown in Figure 18, click Open to open the
Virtual Application Builder.
Figure 18. Virtual application patterns actions
Depending upon your preferred browser, the Virtual Application Builder opens in a new browser tab or a new browser window.
- Select the Web Application component located in the upper left corner of the Virtual Application Builder canvas. The name of the component, "Web Application", may be obscured by an Add policy for application control. Optionally, drag the component away from the corner of the canvas to reveal its name.
- In the properties pane for the component, observe that the
WAR File field is defined with the name of a
WAR file artifact as shown in Figure 19.
Figure 19. The Web Application component
- Close the Virtual Application Builder. If the browser asks you to confirm leaving the tab or window, do so. Leave the Workload Deployer dashboard open.