Creating the initial development pattern
Once the necessary script packages exist in the WebSphere CloudBurst catalog, you can create a WebSphere CloudBurst pattern that represents the application environment detailed earlier.
First, create a pattern that represents this application environment in a development setting. To do this, click the Patterns link on the top toolbar. Since you will deploy this pattern into development environments, you want to use as few compute resources as possible. With that in mind, create a pattern that when deployed results in an entire WebSphere Application Server cell running in a single virtual machine.
First, click the green cross to create a new pattern. When the dialog panel appears, provide a name for the new pattern, a short description, and choose the virtual image on which to base the pattern.
Figure 5. New pattern dialog
Next, navigate to the Pattern Editor for the new pattern by clicking on the pencil icon in the upper right-hand corner. Once in the pattern editor, drag and drop a single deployment manager part from the left-hand side of the page to the empty canvas on the right.
Figure 6. Including the deployment manager part
Ignore the warning message regarding the absence of custom nodes federated to the deployment manager because in this case, you will build the entire cell in the virtual machine represented by the deployment manager part.
In the drop-down menu on the left-hand side, select Script Packages. Now choose the script packages you want to use in this pattern. In addition to the two created earlier:
- also include a script package to set up the entire cell in a single virtual machine and
- include a script package to create an application server cluster within the cell.
Figure 7. Pattern with script packages
By placing these script packages on the deployment manager part, you ensure that they run from within the virtual machine containing the deployment manager node.
The script packages will be able to successfully complete their tasks by using a combination of the information you supply during deployment and the information WebSphere CloudBurst makes available in the /etc/virtualimage.properties file of each virtual machine it creates.
Once you are done editing the new pattern, click the Done editing link in the top right-hand corner of the pattern editor page. This brings you back to the details page for the Account Management Cluster — Development pattern. Here's where you lock the pattern down by clicking the lock icon in the top right-hand corner of the page.
Now you can start the deployment process by clicking Deploy. Provide a name for the new virtual system (in our case, "AcctMgmt Cluster — Dev"). After that, click Configure virtual parts and then Deployment manager link to configure the single deployment manager part.
Besides containing the deploy-time configuration information that is common for most pattern parts:
- Virtual machine CPU and memory allocation
- WebSphere Application Server node name and cell name, and
- Password information
your pattern includes four script packages, each of which has its own set of configuration by way of the variables it defines. Figure 8 shows the configuration information for the Create cell and Create cluster script packages.
Figure 8. Configuration for cell and cluster creation
To create the cell, specify a node name prefix ("AcctMgmtNode"), the number of nodes to create (2), and the number of IBM HTTP Server instances to create (1). To create the WebSphere Application Server cluster, simply specify the cluster name ("AcctMgmtCluster") and the member name prefix ("amServer").
The other configuration information you supply is for the script packages that install the Account Management application and create the DB2 data source for the application.
Figure 9. Configuration for the application and data source
All of the values shown in Figures 8 and 9 are available to your scripts when invoked by WebSphere CloudBurst.
After you are done specifying the deploy-time configuration, click OK to begin the deployment process. WebSphere CloudBurst directs you to the virtual systems page where you can monitor the status of the deployment. When the deployment process is complete, the status for the virtual system reflects that it is in the started state.
At that point, expand the Virtual machines section, then expand the section for the deployment manager virtual machine. Near the bottom of the deployment manager VM section, use the WebSphere link shown in Figure 10 to login to the WebSphere Application Server administration console.
Figure 10. Logging into the WebSphere Application Server admin console
Once in the administration console, you can verify that the correct configuration was established. Besides checking that the WebSphere Application Server nodes and cluster exist, you also want to verify the correct configuration of the DB2 data source and Account Management application.
To check the DB2 data source, expand the Resources section, then the JDBC section and click the Data sources link. You should see the amDataSource we specified during deployment.
Figure 11. The DB2 data source in the administration console
In addition, the Account Management application should appear in the enterprise applications listing of the console.
Figure 12. Account Management application in the administration console
At this point, the WebSphere Application Server environment is fully configured and ready to use for your development purposes.