The IBM Pattern Lab uses an asset-based approach to create reusable and customizable components that collectively make an automation package for a given software product or solution deployment. Rapid time-to-value using automated middleware assets decreases the time and costs associated with solution deployment. In addition, the quality of the product and user satisfaction increases.
Step 1: Introducing the Windows OS Preparation Script Package capabilities
This script package will prepare the Windows operating system parts for deployment of other script packages that require specific operating system configurations and which rely on an operating system restart.
The underlying operating system part, which this script package has been tested on, is Windows Server 2008 R2 64-bit.
For Version 1 of the Windows OS Preparation Script Package, you need to join a Windows operating system to an Active Directory Domain Server, wait 2 minutes for all the actions to take place, including the reboot of the operating system.
Step 2: Identifying the script package parameters
All the parameters found in the following two tables are exposed through the script package parameters in the IBM Workload Deployer Interface. Table 1 identifies these operating system preparation parameters.
Table 1. OS preparation parameters
|Parameter name||Parameter description||Example|
|The IP address of the Active Directory Server you want the operating system to be joined in.|
|The domain user that has the right to create computer accounts on the domain controller. The format should be: [domain]\[username]|
| Password for the domain user given
as a value of the |
Step 3: Acquiring the script package prerequisites
The following list presents the prerequisites before running this script package:
- An Active Directory domain must be available.
- Make sure the computer name length does not exceed a maximum number of characters allowed (which is 15), or does not contain characters that are not allowed. For more information, see Naming conventions in Active Directory.
- In addition to using a computer name that adheres to Microsoft® conventions, the computer name must be unique. If the computer name already exists in the Active Directory, the script package will fail.
- After joining the domain, the computer is rebooted after 2 minutes due to a delay some servers experience when they are added to a domain. Wait while the computer is rebooted before running any other script packages.
Step 4: Deploying the script package in a virtual system pattern
This section describes the steps to create a virtual system pattern and deploy it in your PureApplication System environment. Additionally, you will find details on how to check the status of your deployment.
Preparing a virtual system pattern for deployment
The script package comes in a form of a zip archive using the following naming convention:
In some cases, when the product (that the script package installs and configures) is installed on multiple platforms, the platform is specified in the name to avoid confusion.
In PureApplication System terminology, this is called a script package. This script package has to be part of a virtual system pattern, which in the end, is deployed and managed under the form of a virtual system instance.
To create and deploy the script package, follow these steps:
- Login to your environment's IBM Workload Deployer interface.
- To add the script package you have received, click (on the upper bar)
on Catalog > Script Packages and press the green
plus icon in the menu bar. Enter the name for the script package to be
created and press OK, as shown in Figure 1 and Figure
Figure 1. Open the script packages section
Figure 2. Name the script package
- Now import the script package archive you have been provided by
clicking on the grayed out Browse from the right side
of the Script package file field. Select the archive
from your local file system and then click the Upload
button, as shown in Figure 3.
Figure 3. Import a script package archive
- Prior to using the script package, you need to accept the license. To
do this, follow the highlighted areas shown in Figures 4 through 7.
Figure 4. Bring up the license window
Figure 5. List the license contents
Figure 6. Accept the license
Figure 7. Finish the license acceptance process
- Immediately after you have imported your script package (while still in the Script Package view), you have the option to select when this script package will be executed (see Figure 8). The Execute field needs to be set to one of the two values shown in Table 2.
Table 2. Script Package Execution settings
|Value||When to select|
|at virtual system creation||Select this when your OS Part (operating system image) on which this script package will be run has satisfied all the prerequisites described in Step 2: Identifying the script package parameters and Step 3: Acquiring the script package prerequisites in this article, as well as any external dependencies you might have in your desired topologies (for example, an external database).|
|when I initiate it||Select this when the prerequisites are not met or external dependencies require an action first.|
- If you have selected when I initiate it as shown in
Figure 8 after you have built your virtual system pattern and you
click Deploy (see Figure 13),
this will create your virtual host and install the operating system.
However, hold off on executing the script package until this is
manually invoked. Figure 8 shows the script package option discussed
in this section.
Figure 8. Execute options for a script package
- Against each of the script packages, you will see the Execute now button, which you will have to click and follow the on screen instructions to execute your script package. Figure 15 outlines the script package section of a virtual system instance, where the Execute now button is found (in the referenced figure, the script package has not executed yet).
- To create a virtual system pattern, click (on the upper bar) on
Patterns > Virtual Systems. Then click on the
green plus icon in the menu bar, provide a name and a description for
the virtual system pattern, and press OK, as shown in
Figure 9 and Figure 10.
Figure 9. Select a virtual system pattern
Figure 10. Create a virtual system pattern
- To compose or orchestrate the newly created virtual system pattern,
click on the Edit button on the upper right side of
the bar, as shown in Figure 11.
Figure 11. Edit mode of your virtual system pattern
- In the new screen, drag and drop the parts from the palette on the
left to the editing area. You will need to add a Windows Server 2008
R2 64-bit image and the script package created in the previous steps.
When finished, click on Done Editing as shown in
Figure 12. Edit your virtual system pattern
You have created a virtual system pattern, which you can deploy as many times as you need in your environment.
- Next, deploy the new virtual system pattern. In your IBM Workload
Deployer console, go to Patterns > Virtual
Systems. Click on the previously created system pattern.
On the right side of the upper bar, click on the
Deploy button as shown in Figure 13.
Figure 13. Deploy your virtual system pattern
- After clicking the Deploy button, the following
information is requested:
- Virtual System Name: This is the name of the virtual system pattern instance.
- Environment: Your IBM Workload Deployer administrator should provide the necessary information.
- OS Part parameters: This is where you complete the values for the required operating system level parameters.
- Script Package parameters (found under the OS Part sub page): You will find details in this article.
Note that the only mandatory fields are those starred (*) and the Instance Name.
After completing the field values as they are documented in Step 2: Identifying the script package parameters, click on the OK button.
Your virtual system pattern is now deploying. The deployment will finish when either the first, or both of the following actions are completed:
- The operating system of the deployed virtual machine has been installed and the virtual machine is now started.
- The script packages within the virtual system pattern you are deploying have been successfully executed.
The execution of the script packages in the later action above is conditioned by the value set for the "Execute Now" option of each of the script packages added to the specific virtual system pattern, which is described earlier in this guide.
Step 5: Checking the status of your deployment
- To check the status of your virtual system pattern deployment, click
on Instances > Virtual System as shown in Figure
Figure 14. Check the status of the virtual system pattern deployment
- In the newly opened window you will find, on the left frame, the virtual system pattern instance you have created. Click on it. If there are too many instances, you can use the search filter (which you can find at the top of the left frame) and type in some characters that are part of the virtual system pattern instance name you had created earlier.
- At this point, in the frame on the right side of the page, there are
details about your deployment. However, at this stage, the following
two are the most important:
- Current status: This shows what the current deployment is doing. For example, starting virtual image, deploying pattern, registering virtual image, and so on.
- Virtual machines: This provides information
about the current status of the virtual machine, its hardware
and network details, as well as status of the script packages
that have been deployed, currently in deployment process, or
that can be deployed. The network details provide the virtual
machine's IP address and hostname. Figure 16 provides an
example and includes the areas of most interest in the
deployment of a script package.
For the script package run, Figure 16 describes a situation where the script packages have been executed at virtual system deployment, while Figure 15 shows an example of a Script Package set to execute only "when I initiate it". That fact is confirmed by the (none) attribute, which signifies the absence of logs for the specific script package (since it has not been executed yet).
Figure 15. Script package status with "when I initiate it" execute option
Figure 16. Information about the IP and script package status
- To connect to the deployed virtual machine, a connection can be made to the IP outlined in Figure 16, using either the Remote Desktop for Windows or the ssh client for Linux/Unix.
- In Figure 16, the log files are displayed against each script. The
remote_std_out.logoutlines what the script package has done during deployment and contains both errors and details of a normal script package run. In a successful deployment, you see the following lines at the end:
SPiN ended: successfully :-) ===========================End of SPIN LOG ========================= INFO:Java(TM) 6 Update 34 (64-bit) is installed INFO:Uninstalling: Java(TM) 6 Update 34 (64-bit) Version: 6.0.340 INFO:Successfull uninstall
remote_std_out.log file at the end of each deployment will provide
the latest level of assurance for a successful execution.
This article described how to deploy the Windows OS Preparation automation package and to automatically add a provisioned Windows host in the IBM PureApplication System environment to an existing Microsoft Active Directory™ domain server. This eliminated the need to manually access and modify the provisioned host.
- Other IBM Pattern Lab quick start guides:
- IBM PureSystems web site
- Using the Image Construction and Composition Tool
- Creating Windows images for use in IBM PureApplication System
- IBM PureApplication System Information Center
- IBM PureSystems Centre
- IBM PureSystems resources on developerWorks