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.
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 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/
. - The system runs a series of pre-upgrade checks (see Managing DNS/DHCP Server Updates).
- 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
- 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.
- If the customization backup action was successful, the system applies the full update to the target server.
- When the update completes, the system calls the customization script with
the
-r
("restore") parameter:customize.sh -r
- 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
- If you haven't already done so, import the customization package into BSUS.
- Click Dashboard on the header bar, then click the tab for the batch to which you want to assign the script.
- Click the down arrow on the batch's tab and choose Modify.
- 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. - 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.
- 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
- Go to the BlueCat Server Update Services dashboard (click the Dashboard tab in the BSUS header).
- Click the down arrow of the batch whose customization package you want to run and select Run Customizations.
- 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