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-instance-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
    --force-sudo                       | forceforces use of sudo for operations on directories
    --dry-run                          | createcreates install scriptscripts 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                        | keepkeeps temporary installationinstallations in work directory
    --show-logs                        | shows log output of the script

...

  • -h | --help
    • Displays usage.
  • --force-sudo
    • Forces sudo to be used for installation and deployment. This is required if an existing installation is owned by different account or if the installation should be performed for a different account.
    • This switch requires sudo permissions for the account that runs the Packaging Script.
  • --dry-run
    • Performs a dry-run that will not create Deployment Packages but will create Installer Wrapper Scripts for 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-scriptThis 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.
  • --make-dirs
    • If directories are missing that are indicated with the --home, --backup-dir or --log-dir options then they will be created.
  • --show-logs
    • Displays the log output created by the script if the --log-dir option is used.
    • The --show-logs option is forwarded to the installer scripts that will display individually created log files if the --log-dir option is used.

...

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}"/standalone/standalone-agent-http-2022-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

...