Page tree

This topic walks you through the process of distributing content (such as applications, hotfixes, configuration files, and so on) using a BMC BladeLogic Server Automation (BSA) feature called a BLPackage. It includes the following sections:

The video at right demonstrates the process of building a BLPackage to distribute content.

https://youtu.be/kgfKPbTvdvc Open link

Introduction

This walkthrough is intended for users of BSA 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, BSA 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 BSA 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.  

BSA 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 BSA 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 BSA. 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

 StepExample screen
1

Using the BSA 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 BSA, 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.

Tip

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.

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.

Tip

Eventually you will create many BLPackages, so assign a descriptive name that makes this package easy to find.

3

Add the file or files that you want to bundle into the package.

One of the useful features of BSA 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 BSA Application Server

  1. In the dialog, navigate to a server that contains the configuration file you want to deploy. Expand that server.
  2. Expand File System and navigate to the configuration file you want to deploy.
  3. Select the configuration file and click the right-arrow to move your selection to the list at right.
  4. Click OK.
5

Click Finish.

A BLPackage is added to the Depot in the subfolder you selected in the first step.

6

Select the BLPackage you just created, right-click, and select Open.

7BSA displays the contents of the BLPackage you have created.
8

Select the one entry under the name "BLPackage."

At right, BSA shows attributes about the selected entry.

9At 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

BSA replaces Windows in the path with a variable so the path now reads /C/??TARGET.WINDIR??/system32/drivers/etc/hosts.

When the hosts file is deployed to different managed servers, BSA 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. BSA 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