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:
- What is a BLPackage?
- What does this walkthrough show?
- What do I need to do before I get started?
- How to distribute content using a BLPackage
- Wrapping it up
- Where to go from here
The video demonstrates the process of building a BLPackage to distribute content.
Introduction
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
| Step | Example screen |
---|---|---|
1 | 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. | |
2 | A wizard opens. On the first page of the wizard, for Package name, enter a name, such as Deploy Config File. Then click Next. | |
3 | 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
| |
4 | A dialog shows a list of all managed servers — servers with agents installed and registered with the TrueSight Server Automation Application Server
| |
5 | Click Finish. A BLPackage is added to the Depot in the sub folder you selected in the first step. | |
6 | Select the BLPackage you just created, right-click, and select Open. | |
7 | TrueSight Server Automation displays the contents of the BLPackage you have created. | |
8 | 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. | |
10 | Click the Select Property icon. A list of variables opens. | |
11 | 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. | |
12 | In the sublist, scroll down and click WINDIR.
| |
13 | 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. | |
14 | 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.