Example Deployment Plan Files
This section provides example Deployment Plan files.
Example 1 - Replace a File
This example Deployment Plan performs these actions on all applicable Security Gateways:
- Backs up the file
/opt/productname/conf.txt
on the remote Security Gateway to the /opt/CPcdt/ConfigurationBackupFiles/
directory on the Management Server. - Sends a file
/opt/CPcdt/conf.txt
from the Management Server to the remote Security Gateway as the /opt/productname/conf.txt
file.
Example XML file for this Deployment Plan:
<?xml version="1.0" encoding="UTF-8"?>
<CDT_Deployment_Plan>
<plan_settings>
<name value="Change configuration file" />
<description value="Example deployment plan - replace a file " />
<update_cpuse value="true" />
</plan_settings>
<!-- Backup the configuration file -->
<pull_file remote_path="/opt/produc tname/conf.txt" local_dir="/opt/CPcdt/ConfigurationBackupFil es/" />
<!-- Push the new configuraion file -->
<push_file local_ path="/opt/CPcdt/conf.txt" remote_path="/opt/productname/conf.txt" />
< /CDT_Deployment_Plan>
|
Example 2 - Run a Script to Get Information
This example Deployment Plan performs these actions on all applicable Security Gateways:
- Runs the script
getInformation.sh
, found on the Management Server in the /home/admin/
directory.This script:
- Collects the desired information on the remote Security Gateway (such as the installed policy, the installed license, and so on)
- Saves its log to the
/home/admin/log.txt
file on the remote Security Gateway
Example script:
#!/bin/bash
LOG_FILE="/home/admin/log.txt"
cpstat -f policy >> $LOG_FILE
cplic print -x >> $LOG_FILE
exit 0
|
- Pulls the file
/home/admin/log.txt
from the remote Security Gateway and saves it in the /opt/CPcdt/information/
directory on the Management Server.
Example XML file for this Deployment Plan:
<?xml version="1.0" encoding="UTF-8"?>
<CDT_Deployment_Plan>
<plan_settings>
<name value="Get information from the gateways" />
<description value="Example deployment plan - run a script to get information" />
<update_cpuse value="true" />
</plan_settings>
<!-- The script 'getInformation.sh' redirects its output to the '/home/admin/log.txt' -->
<execute_script path="/home/admin/getInformation.sh" />
<pull_file remote_path="/home/admin/log.txt" local_dir="/opt/CPcdt/information/" />
</CDT_Deployment_Plan>
|
Example 3 - Take Gaia Snapshot and Install a Package
This example Deployment Plan performs these actions on all applicable Security Gateways:
- Takes the Gaia snapshot on the remote Security Gateway.
- Downloads the CPUSE package of the R80.10 Jumbo Hotfix Accumulator from the Check Point Cloud on the remote Security Gateway.
The package download action on the remote Security Gateway is not marked as critical.
- If the package download on the remote Security Gateway fails, the CDT sends the package from the Management Server to the remote Security Gateway and imports it with CPUSE.
If the package download on the remote Security Gateway succeeds, the CDT does not send the package from the Management Server to the remote Security Gateway.
- Installs the package on the remote Security Gateway.
Example XML file for this Deployment Plan:
<?xml version="1.0" encoding="UTF-8"?>
<CDT_Deployment_Plan>
<plan_settings>
<name value="Example deployment plan - tak e Gaia snapshot and install a package" />
<description value="Cre ate Gaia snapshot and then install HF on the remote machines" />
<update_cpuse value="true" / >
</plan_settings>
<!-- Create a snaphot on remote machine -->
<create_snapshot name="backup" description="R80.10 b ackup snapshot before Jumbo Hotfix installation" />
<!-- Install Jumbo Hotfix for R80.10 -
If the download from the CP Cloud fails,
use the CDT import and install actions -->
<!-- (1) Download this package (not critical) -->
<download_from_cloud path="/home/admi n/Check_Point_R80_10_JUMBO_HF_Bundle_T97_FULL.tgz" iscritical="fals e" />
<!-- (2) If download from CP Cloud failed, use the CDT import and install actions -->
<import_package path="/home/admin/Check_Point_R80_10_JUMBO_HF_Bundle_T97_FULL.tgz" />
<install_package path="/home/admin/Check_Point_R80_10_JUMBO_HF_Bundle_T97 _FULL.tgz" />
</CDT_Deployment_Plan>
|
Example 4 - Update CPUSE, Send, Import, and Verify the Package
This example Deployment Plan performs these actions on all applicable Security Gateways:
- Sends the package from the Management Server (from
/home/admin/Check_Point_R80_10_JUMBO_HF_Bundle_T97_FULL.tgz
) to the remote Security Gateway and imports it with CPUSE. - Verifies the package with CPUSE on the remote Security Gateway to make sure it can be installed.
Example XML file for this Deployment Plan:
<?xml version="1.0" encoding="UTF-8"?>
<CDT_Deployment_Plan>
<plan_settings>
<name value="Example deployment plan - update CPUSE, send, import, and verify the package" />
<description value="Up date CPUSE, import and verify th e package on the remote machines" />
<update_cpuse value ="true" />
</plan_settings>
<!-- Use the CDT import and verify actions -->
<import_package path="/home/admin/Check_Point _R80_10_JUMBO_HF_Bundle_T97_FULL.tgz" />
<verify_package pa th="/home/admin/Check_Point_R80_10_JUMBO_HF_Bundle_T97_FULL.tgz" />
</ CDT_Deployment_Plan>
|
Example 5 - Run a Script, Uninstall a Hotfix, Perform Upgrade, Install a Hotfix, Log and Send Email, Pull a File
This example Deployment Plan performs these actions on all applicable Security Gateways:
- Runs the script
preScript.sh
, found on the Security Management Server or Multi-Domain Security Management Server in the /home/admin/cdt/
directory. This script is not marked as critical. - Uninstalls the CPUSE package of the R75.46 Jumbo Hotfix Accumulator.
- Imports and installs the CPUSE package for the R77.30 Major Upgrade (from
/home/admin/R77.30_Install_and_Upgrade.tgz
).On clusters, the Connectivity Upgrade is deactivated, because the value of the attribute "ConnectivityUpgrade
" is "false
".
- Adds a log entry and sends an email message noting that the installation has finished.
- Imports and installs the package for the R77.30 Hotfix2 (from
/home/admin/R77.30_HF2.tgz
). - Pulls the file
/home/admin/file_to_pull.txt
from the Security Gateways and saves it in the /home/admin/
directory on the Security Management Server or Multi-Domain Security Management Server.
Example XML file for this Deployment Plan:
<?xml version="1.0" encoding="UTF-8"?>
<CDT_Deployment_Plan>
<plan_settings>
<name value="Example deployment plan" />
<description value="Example deployment plan - Run a script, uninstall a hotfix, perform upgrade, install a hotfix, log and send email, pull a file" />
<update_cpuse value="true" />
<connectivityupgrade value="false" />
</plan_settings>
<!-- Path to the script -->
<execute_script path="/home/admin/cdt/preScript.sh" iscritical="false" />
<!-- Use the CDT uninstall actions -->
<uninstall_cpuse_package filename="R75.46_JUMBO_HF.tgz" />
<!-- Use the CDT import and install actions to upgrade -->
<import_package path="/home/admin/R77.30_Install_and_Upgrade.tgz" />
<install_package path="/home/admin/R77.30_Install_and_Upgrade.tgz" />
<!-- Create a log -->
<log level="NORMAL" value="Finished installing major upgrade." />
<!-- Send an email -->
<send_email to="cdt.admin@checkpoint.com" subject="Major upgrade completed" body="Finished installation of R77.30 major upgrade, preparing to install R77.30 HF2." />
<!-- Use the CDT import and install actions -->
<import_package path="/home/admin/R77.30_HF2.tgz" />
<install_package path="/home/admin/R77.30_HF2.tgz" />
<!-- Path to file that needs to be pulled -->
<pull_file remote_path="/home/admin/file_to_pull.txt" local_dir="/home/admin/" />
</CDT_Deployment_Plan>
|