Versions Compared

Key

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

...

Code Block
titleExample for Environment File env.sh
linenumberstrue
#!/bin/sh

SCRIPT_HOME=$HOME/js7.deploy

DEP_ARCHIVE="${DEP_ARCHIVE:-$SCRIPT_HOME/archive}"
DEP_BIN="${DEP_BIN:-$SCRIPT_HOME/bin}"
DEP_CONFIG="${DEP_CONFIG:-$SCRIPT_HOME/config}"
DEP_DESC="${DEP_DESC:-$SCRIPT_HOME/desc}"
DEP_INSTALL="${DEP_INSTALL:-$SCRIPT_HOME/install}"
DEP_RELEASE=/mnt/releases/scheduler_setups
DEP_TARGET="/home/sos/js7.target"
DEP_WORK="${DEP_WORK:-$SCRIPT_HOME/work}"

JAVA_HOME="${SCRIPT_HOME}"/jdk-11.0.2
PATH=${JAVA_HOME}/bin:${PATH}

export JAVA_HOME PATH DEP_ARCHIVE DEP_BIN DEP_CONFIG DEP_DESC DEP_INSTALL DEP_RELEASE DEP_TARGET DEP_WORK


Explanation:

  • Any environment variable makes use of a fallback if not otherwise specified.
    • By default the env.sh script's directory is assumed to hold the directory layout of the Deployment Server.
  • Each environment variable in the script points to a directory with a specific purpose can be located outside of the suggested directory layout.
    • In the above example the DEP_RELEASE environment variable specifies a location of JS7 installation files from a mount point.
    • The DEP_ARCHIVE, DEP_BIN, DEP_CONFIG, DEP_DESC, DEP_WORK environment variables point to directories explained with previous chapters.
    • The DEP_TARGET environment variable points to a location on the same server to simulate a deployment target machine.
  • The JAVA_HOME environment variable is specified to enforce use of a specific Java version for temporary installation of JS7 components during packaging.
  • Consider that environment variables have to be exported in order to be applied by subsequent calls to deployment scripts.


The Environment Script has to be sourced to make environment variables available to shell scripts in the Deployment Server:

...

Status
colourYellow
titleTODO

Changes to the Directory Layout

The directory layout of the Deployment Server is not carved in stone. Instead, users can modify the env.sh Environment Script to point to 

Summary of Steps to perform Deployment

...