Working with upgrade customization packages - Adaptive Applications - BlueCat Gateway - 22.1

BlueCat Server Update Services Administration Guide

Locale
English (United States)
Product name
BlueCat Gateway
Version
22.1

As of version 22.1, the BlueCat Server Update Services app (BSUS) supports the use of customization packages for customers who require additional server customization beyond that provided by BlueCat Address Manager. Customization packages let you preserve and restore customizations specific to a system that might get lost or overwritten during an update.

Customization packages are not provided by BlueCat. You create them yourself. Customization packages are ZIP files that contain:

  • A bash script that performs a set of customized actions before an upgrade is performed, then a separate set of actions after an upgrade completes.
  • Any support files needed by that script.

Typically, pre-upgrade actions would copy data or information and post-upgrade actions would restore them. However, you can use customization packages for whatever purpose you want.

After you create a customization package, you can import it into BSUS, then assign it to a Server Batch.

Warning: This feature is intended for advanced users only. Apart from the items described below, BSUS makes no attempt to monitor, control, or otherwise validate contents of a customization package. The content, actions, and effects of customization packages are left entirely to the user.

How are customization packages applied during an update?

Customization packages are applied only under the following circumstances:

  • During a full scheduled or manual update, if the scheduled event's Apply checkbox is ticked, BSUS downloads the package to the server and calls both the package's backup (-b) and restore (-r) scripts.
  • When creating a Server Batch, editing a Server Batch, or moving a server between Server Batches:
    • If you select the Install only checkbox, BSUS only downloads the package to the target BDDS server, without running it.
    • If you also select the Install and Apply checkbox, BSUS both downloads the package to the target BDDS server and calls only the package's restore (-r) script. BSUS does not run the backup (-b) portion of the script.
When a customization package is applied with an update event, it is run with the update as follows.
  1. When a new update is sent to the DNS server, the Server Batch's associated is included with it. Contents of this package are extracted and stored on the target server in the folder /home/bluecat/preserved_scripts/customizations/.
  2. The system runs a series of pre-upgrade checks (see Managing DNS/DHCP Server Updates).
  3. If those checks pass, if this is a full scheduled or manual update, and if the Apply checkbox was selected, the system calls the customization script with the -b ("backup") parameter:

    customize.sh -b

  4. If the script returns with an error (any number other than 0), the update is completely aborted. BSUS logs the failure as an event, asking the user to investigate.
  5. If the customization backup action was successful, the system applies the full update to the target server.
  6. When the update completes, the system calls the customization script with the -r ("restore") parameter:

    customize.sh -r

  7. Results from the upgrade operation are sent back to BSUS. If the customization restoration action was unsuccessful, an event is flagged to ask the user to investigate.

Assigning a customization package to a Server Batch

To assign a customization package to a Server Batch

  1. If you haven't already done so, import the customization package into BSUS.
  2. Click Dashboard on the header bar, then click the tab for the batch to which you want to assign the script.
  3. Click the down arrow on the batch's tab and choose Modify.
  4. In Customization Options, decide what you want BSUS to do with the customization package associated with the server batch right now.
    • To install the server's customization package onto each target server right now, select the Install only check box.
    • To also run the customization package on the server after it is installed right now, also select the Install and Apply checkbox.
    Tip: To run a customization package during a scheduled update, tick the Apply checkbox when scheduling the update.
  5. In Select Customization, select the customization package that you want to associate with the Server Batch. You can select from any package that was imported into BSUS.
  6. When you're done, click Finish.

For more details on configuring Server Batches for an upgrade, see Configuring Server Batches.

Manually running a customization package

To manually run a Server Batch's customization package on all of its servers:
  1. Go to the BlueCat Server Update Services dashboard (click the Dashboard tab in the BSUS header).
  2. Click the down arrow of the batch whose customization package you want to run and select Run Customizations.
  3. Choose whether you want to run the package's backup script (-b), restore script (-r), or both, then click Next.

    On each of the batch's servers, BSUS uploads the customization package (if necessary) then runs the package's scripts as specified