Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleDeployment 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
    --deployconfig-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
    --joc-id=<identifier>              | optional: limits processing to a specific JOC Cockpit 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
    --log-dir=<directory>              | optional: log directory for log output of this script

    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
    --make-dirs                        | creates the specified directories if they do not exist
    --show-logs                        | shows log output of the script

...

  • --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.
  • --deployconfig-dir
    • Specifies the top-level directory holding configuration files that will be copied to an Agent, Controller or JOC Cockpit 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 stored.
    • 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 will be 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.
  • --joc-id
    • Selects the JOC Cockpit ID 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 will be 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.
  • --log-dir
    • If a log directory is specified then the Packaging Script will log information about processing steps to a log file in this directory.
    • File names are created according to the pattern: deployment_package.<deployment-descriptor>.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
    • For example: deployment_package.agent-http-20221204.centostest_primary.2022-12-19T20-50-45.log
    • The --log-dir option is forwarded to the installer scripts that will create individual log files in this directory.

...

Code Block
titleExample for use of Packaging Script
linenumberstrue
#!/bin/sh

set -e

SCRIPT_HOME=$(cd "$(dirname "$0")" >/dev/null && pwd)

DEP_ARCHIVE=${DEP_ARCHIVE:-$(dirname "${SCRIPT_HOME}")/archive}
DEP_BIN=${DEP_BIN:-$(dirname "${SCRIPT_HOME}")/bin}
DEP_CONFIG=${DEP_CONFIG:-$(dirname "${SCRIPT_HOME}")/config}
DEP_DESC=${DEP_DESC:-$(dirname "${SCRIPT_HOME}")/desc}
DEP_LOGS=${DEP_LOGS:-$(dirname "${SCRIPT_HOME}")/logs}
DEP_WORK=${DEP_WORK:-$(dirname "${SCRIPT_HOME}")/work}


${DEP_BIN}/js7_create_deployment_package.sh \
    --deploy-desc=${DEP_DESC}/agent-controller-joc-https-20221204.json \
    --deployconfig-dir=${DEP_CONFIG} \
    --archive-dir=${DEP_ARCHIVE} \
    --script-dir=${DEP_BIN} \
    --work-dir=${DEP_WORK} \
    --log-dir=${DEP_LOGS} \
    --deploy-agent-id=deploymentAgent \
    --keep-script \
    --keep-work \
    --show-logs \
    --make-dirs

# makes use of the indicated Deployment Descriptor file that holds configuration items for Agents
# works with specific values for directories
# keeps copies of the installer scripts and installations in the work area
# creates log files in the indicated directory and forwards the location to installer scripts

...