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
    --config-dir=<directory>           | required: path to configuration directory, default: ../config
    --work-dir=<directory>             | required: path to working directory, default: ../work
    --archive-dir=<directory>          | required: path to archive directory, default: ../archive
    --release-dir=<directory>          | required: path to release directory holding JS7 installation files, default: ../release
    --script-dir=<directory>           | optional: path to script directory, default: ../bin
    --deploy-agent-id=<identifier>     | optional: Agent ID executing the deployment workflow, default: primaryAgent
    --agent-id=<id[,id]>               | optional: list of Agent IDs to which processing will be limited
    --controller-id=<id[,id]>          | optional: list of Controller IDs to which processing will be limited
    --joc-id=<id[,id]>                 | optional: list of JOC Cockpit Instance IDs to which processing will be limited
    --workflow-parallelism=<number>    | optional: max. parallel processes in deployment workflow, default: 100
    --workflow-timezone=<number>       | optional: time zone of the 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
    --make-dirs                        | creates the specified directories if they do not exist
    --keep-script                      | keep install script in archive directory
    --keep-work                        | keep temporary installation in work directory
    --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.
  • --config-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 Area.
  • --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 Area.
  • --archive-dir
    • Specifies the directory to which deployment packages are stored.
    • By default the ../archive directory is used, see JS7 - Deployment Server.
  • --release-dir
    • Specifies the directory in which the .tar.gz installer files for JS7 releases are stored.
    • By default the ../release directory is used, see JS7 - Deployment Area.
  • --script-dir
  • --deploy-agent-id
    • Specifies the name of the Agent that should execute jobs in 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 Agent IDs available from the Deployment Descriptor file to which creation of Deployment Packages should be limited.
    • If more than one Agent ID is specified the Agent IDs are separated by comma.
  • --controller-id
    • Selects the Controller IDs of Controllers available from the Deployment Descriptor file to which creation of Deployment Packages should be limited.
    • If more than one Controller ID is specified the Controller IDs are separated by comma.
    • Note that in a Controller Cluster its members use the same Controller ID, therefore Deployment Packages are created for all members.
  • --joc-id
    • Selects the JOC Cockpit Instance IDs available from the Deployment Descriptor file to which creation of Deployment Packages should be limited.
    • If more than one JOC Cockpit Instance ID is specified the JOC Cockpit Instance IDs are separated by comma.
    • Note that in a JOC Cockpit Cluster its members use the same JOC Cockpit Instance ID, therefore Deployment Packages are created for all members.
  • --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
./js7_create_deployment_package.sh \
    --deploy-desc=agent-http-20221204-2022-12-04.descriptor.json

# makes use of the indicated Deployment Descriptor file that holds configuration items for a number of Agents
# works with default values for the location of the work area and of the archive directory to which Deployment Packages will be stored

...

Code Block
titleExample for use of Packaging Script
linenumberstrue
./js7_create_deployment_package.sh \
    --deploy-desc=agent-http-20221204-2022-12-04.descriptor.json \
    --dry-run

# makes use of the indicated Deployment Descriptor file that holds configuration items for a number of Agents
# performs a dry-run that will not create Deployment Packages but will generate wrapper scripts that parameterize calls to the Installer Scripts
# works with default values for the location of the work area to which wrapper scripts will be stored

...

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

set -e

DEP_HOME=/home/sos/js7.deploy
DEP_ARCHIVE=${DEP_ARCHIVE:-"${DEP_HOME}"/archive}
DEP_BIN=${DEP_BIN:-"${DEP_HOME}"/bin}
DEP_CONFIG=${DEP_CONFIG:-"${DEP_HOME}"/config}
DEP_DESC=${DEP_DESC:-"${DEP_HOME}"/desc}
DEP_LOGS=${DEP_LOGS:-"${DEP_HOME}"/logs}  
DEP_RELEASE=${DEP_RELEASE:-"${DEP_HOME}"/release}
DEP_WORK=${DEP_WORK:-"${DEP_HOME}"/work}


"${DEP_BIN}"/js7_create_deployment_package.sh \
    --deploy-desc="${DEP_DESC}"/agent-controller-joc-https-202212042022-12-04.descriptor.json \
    --config-dir="${DEP_CONFIG}" \
    --archive-dir="${DEP_ARCHIVE}" \
    --release-dir="${DEP_RELEASE}" \
    --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 a number of 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

...