Walkthrough: Build a simple BLPackage to distribute content
This topic walks you through the process of distributing content (such as applications, hotfixes, configuration files, and so on) using a TrueSight Server Automation feature called a BLPackage. It includes the following sections:
The video demonstrates the process of building a BLPackage to distribute content.
This walkthrough is intended for users of TrueSight Server Automation who are unfamiliar with how BLPackages work, what they can do, and how to build a simple BLPackage.
The goal of this topic is to demonstrate how to create and edit a simple BLPackage.
What is a BLPackage?
A BLPackage bundles configuration changes so they can be deployed to managed servers. Using a BLPackage, you can make additions, deletions, and modifications to multiple managed servers simultaneously.
You can think of a BLPackage as a bundle of code, configuration, and content. A BLPackage consists of an instruction set and the files needed to change a server's configuration. When you create a BLPackage, TrueSight Server Automation automatically creates the instruction set. If necessary, you can customize those instructions by editing the BLPackage.
BLPackages are important because when built correctly, they become a reusable building block of infrastructure. For example, after you develop a solid BLPackage for Apache, you can reuse it in development and production environments, and you can feel confident that every server's Apache will be correctly configured, consistent, and properly managed according to your best practices.
Beyond that, other users can leverage your packages to obtain additional value. A web developer can use your Apache package as the foundation for their own package that deploys their own production code. Together, those two packages can be bundled as part of a deployment job and pushed to servers at the same time. This forms the foundation of how advanced users can use TrueSight Server Automation to build application service stacks that include OS configuration, base software packages, and the application specific code itself.
What does this walkthrough show?
This walkthrough shows how to package the hosts file, which is used to map host names to IP addresses. You can later deploy this package to multiple managed servers that run different versions of Windows.
TrueSight Server Automation is capable of building far more complex BLPackages, including configuration items and settings within those objects. For this walkthrough, however, we demonstrate a simple use case.
What do I need to do before I get started?
Make sure you have the TrueSight Server Automation Console installed on your workstation, and that you've got the appropriate level of permissions to create packages.
For this walkthrough, you log on as BLAdmin, the default superuser for TrueSight Server Automation. Note that in live deployments, BMC recommends that you grant access based on roles with a narrower set of permissions.
How to distribute content using a BLPackage
Using the TrueSight Server Automation Console, expand the Depot folder at left and navigate to a subfolder where you can store a BLPackage. Right-click the subfolder and select New > BLPackage.
In TrueSight Server Automation, the Depot is the central location where all content lives. This is where files, BLPackages, patches, and other objects are created, edited, deleted, and generally managed. It has a folder structure that you can use to organize your content. BMC provides a starter structure, but you can add your own folders and hierarchy.
Consider how you want to structure your folders. Make sure you do not create too complex a folder hierarchy, which can make it hard to find content.
A wizard opens. On the first page of the wizard, for Package name, enter a name, such as
Eventually you will create many BLPackages, so assign a descriptive name that makes this package easy to find.
Add the file or files that you want to bundle into the package.
One of the useful features of TrueSight Server Automation is that you don't need to have the file on your local computer in order to include it in a package. If the file(s) you want exist on a server with an agent installed, you can pull them in from a remote machine. In order to do that, on the next page, in the Server Objects box, click Add .
A dialog shows a list of all managed servers — servers with agents installed and registered with the TrueSight Server Automation Application Server
A BLPackage is added to the Depot in the sub folder you selected in the first step.
Select the BLPackage you just created, right-click, and select Open.
|7||TrueSight Server Automation displays the contents of the BLPackage you have created.|
Select the one entry under the name "BLPackage."
At right, TrueSight Server Automation shows attributes about the selected entry.
|9||At right, for the Path attribute, select WINDOWS in the path /C/WINDOWS/system32/drivers/etc/hosts.|
Click the Select Property icon.
A list of variables opens.
In the list, scroll down and click the arrow to the right of TARGET.
A sublist opens. This is a list of variables that can be applied to target servers—that is, servers to which you are deploying changes.
In the sublist, scroll down and click WINDIR.
TrueSight Server Automation replaces Windows in the path with a variable so the path now reads
When the hosts file is deployed to different managed servers, TrueSight Server Automation will replace the variable with the name of the appropriate directory, depending on which version of Windows is running on the target server.
On the tab that provides the name of the BLPackage, click the X. TrueSight Server Automation prompts you to save your changes.
Wrapping it up
At this point you've:
- Created a new package to hold a file or files that you want to deploy to your infrastructure
- Pulled in those files from remote machines that have agents installed on them
- Understood the basic concepts of using parameters to add variables
Where to go from here
Now that you know how to create a BLPackage, you can move on to organizing dynamic content using smart groups.