You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction

The Packaging Script is used in the JS7 - Deployment process for on-premises installations on a JS7 - Deployment Server

  • to install JS7 components such as JOC Cockpit, Controller, Agent in a temporary environment,
  • to create .tar..gz tarball deployment packages of the JS7 components' installation and configuration directories created during installation,
  • to create a Deployment Script per JS7 component. The script is later on used to deploy the packages to target machines.

Packaging Script

The Packaging Script is provided for download and can be used to automate installation, updates, upgrades and patches of JS7 components such as JOC Cockpit, Controller and Agents.

  • The script is available for Linux, MacOS® and AIX® using bash, dash, ksh and zsh POSIX-compatible shells. 
  • The script expects a JS7 - Deployment Descriptor file in .json format that specifies the JS7 components, the installation options, configuration options and deployment options.
  • The script creates
    • the run_install_agent.sh, run_install_controller.sh, run_install_joc.sh Installer Wrapper Scripts that parameterize installation of the JS7 components,
    • the run_deploy_agent.sh, run_deploy_controller.sh, run_deploy_joc.sh Deployment Scripts that are used to transfer tarball deployment packages to target machines.
  • The script terminates with exit code 0 to signal success, with exit code 1 for command line argument errors and with other exit codes for non-recoverable errors.
  • The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services.

Prerequisites

The Packaging Script requires the jq utility to be installed and available from the operating system. 

Download

Find the Deployment Packaging Script for download from JS7 - Download.

Usage

Invoking the Deployment Packaging Script without arguments displays the usage clause:

Deployment Packaging Script js7_create_deployment_package.sh
Usage: js7_create_deployment_package.sh [Options] [Switches]

  Options:
    --deploy-desc=<file>               | required: path to a deployment descriptor file
    --deploy-dir=<directory>           | required: path to the deployment source directory, default: ./config
    --work-dir=<directory>             | required: path to the deployment working directory directory, default: ./work
    --archive-dir=<directory>          | required: path to the deployment archive directory directory, default: ./archive
    --script-dir=<directory>           | optional: path to the script directory directory, default: ./bin
    --deploy-agent-id=<identifier>     | required: Agent ID executing the deployment workflow
    --agent-id=<identifier>            | optional: limits processing to a specific Agent ID
    --controller-id=<identifier>       | optional: limits processing to a specific Controller ID
    --workflow-parallelism=<number>    | optional: limits parallel processes in deployment workflow, default: 100
    --workflow-timezone=<number>       | optional: specifies time zone of deployment workflow, default: Etc/UTC

  Switches:
    -h | --help                        | displays usage
    --dry-run                          | create install script without running the script
    --keep-script                      | keep install script in archive directory
    --keep-work                        | keep temporary installation in work directory
    --show-logs                        | shows log output of the script


Packaging Options

  • --deploy-desc
    • Specifies the path to the .json file that holds the JS7 - Deployment Descriptor.
    • Deployment Descriptors specify which JS7 components should be installed and which installation and configuration options should be used.
  • --deploy-dir
    • Specifies the top-level directory from which configuration files copied to an Agent or Controller installation..
    • By default the ./config directory is used, see JS7 - Deployment Server.
  • --work-dir
    • Specifies the directory that holds the working area to temporarily install JS7 components.
    • By default the ./work directory is used, see JS7 - Deployment Server.
  • --archive-dir
    • Specifies the directory to which deployment packages are written.
    • By default the ./archive directory is used, see JS7 - Deployment Server.
  • --script-dir
  • --deploy-agent-id
    • Specifies the name of the Agent that should execute the Deployment Workflow.
    • This information is added to the Deployment Workflow and can be changed later on in JOC Cockpit.
  • --agent-id
    • Selects the name of an Agent available from the Deployment Descriptor file to which creation of deployment packages should be limited.
  • --controller-id
    • Selects the Controller ID of a Controller available from the Deployment Descriptor file to which creation of deployment packages should be limited.
  • --workflow-parallelism
    • Specifies the max. number of parallel deployments that should be executed by the Deployment Workflow.
    • By default up to 100 parallel deployments are performed.
  • --workflow-timezone
    • Specifies the time zone that is applied to the Deployment Workflow. The time zone is relevant should users wish to modify the included deployment job for consideration of JS7 - Admission Times for Jobs

Switches

  • -h | --help
    • Displays usage.
  • --dry-run
    • Performs a dry-run that will not create deployment packages but will create wrapper scripts for installation of JS7 components only.
    • The wrapper scripts will make use of configuration items specified with the Deployment Descriptor and will parameterize execution of the Installer Scripts, see JS7 - Automated Installation and Update.
  • --keep-script
    • This option is preferably used with the --dry-run option to retain copies of the wrapper scripts for installation of jS7 components, see --dry-run.
  • --keep-work
    • Specifies that temporary installations of JS7 components in the working area will not be removed but will remain in place to allow checking the installation and configuration options in place.
  • --show-logs
    • Displays the log output created by the script.

Examples

The following examples illustrate typical use cases.

Create Deployment Package

Example for use of Packaging Script
./js7_create_deployment_package.sh \
    --deploy-desc=agent-https-20221204.json

# makes use of the indicated deployment descriptor file that holds configuration items for Agents
# creates the home directory if it does not exist

Perform dry-run to receive Wrapper Scripts

Example for use of Packaging Script
./js7_create_deployment_package.sh \
    --deploy-desc=agent-https-20221204.json \
    --keep-script \
    --dry-run

# makes use of the indicated deployment descriptor file that holds configuration items for Agents
# performs a dry-run that will not create packages but will generate wrapper scripts that parameterize calls to the Installer Scripts

Resources



  • No labels