Versions Compared

Key

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

...

Code Block
titleUsage
Usage: set_job_resource.sh [Options] [Switches]

  Options:
    --url=<url>                   | required: JOC Cockpit URL
    --controller-id=<identifier>  | required: Controller ID
    --user=<account>              | required: JOC Cockpit user account
    --password=<password>         | optional: JOC Cockpit password or Client Keystore password
    --job-resource=<path>         | required: path to job resource
    --key=<identifier>            | required: name of argument in job resource
    --value=<string>              | alternate: value of argument in job resource
    --file=<path>                 | alternate: value of argument in job resource from a file
    --env-var=<identifier>        | optional: name of environment variable in job resource
    --encrypt-public-key=<path>   | optional: path to Agent's public key used to encrypt value
    --encrypt-key-var=<identif.>  | optional: name of variable holding the encrypted symmetric key, default: encryptedKey
    --encrypt-key-env=<identif.>  | optional: name of environment variable holding the encrypted symmetric key, default: ENCRYPTED_KEY
    --cacert=<path>               | optional: path to Root CA Certificate for HTTPS connections
    --client-cert=<path>          | optional: path to Client Certificate file (PEM) for HTTPS mutual authentication
    --client-key=<path>           | optional: path to Client Private Key file (PEM) for HTTPS mutual authentication
    --client-keystore=<path>      | optional: path to Client Keystore file (PKCS12) holding Private Key/Certificate for HTTPS mutual authentication
    --timeout=<seconds>           | optional: timeout for connections to JOC Cockpit in seconds, default: 15
    --log-dir=<directory>         | optional: log directory for log output of this script

  Switches:
    -h | --help                   | displays usage
    -v | --verbose                | shows verbose log output
    -p | --password               | asks for password
    --show-logs                   | shows log output if --log-dir is used
    --make-dirs                   | creates directories if they do not exist

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root
    --password=root \
    --job-resource=/ProductDemo/Variables/pdBusinessDate \
    --key=businessDate \
    --value=$(date +'%Y-%m-%d')

# updates the jobJob resourceResource argument "businessDate" from the current date
# the connection to JOC Cockpit is established by HTTP

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=https://joc-2-0-primary:7443 \
    --cacert=/home/sos/jstest/certs/root-ca.pem \
    --controller-id=controller \
    --user=root \
    --p \
    --job-resource=/ProductDemo/Variables/pdBusinessDate \
    --key=businessDate \
    --env-var=BUSINESS_DATE \
    --value=$(TZ=Europe/London date +'%Y-%m-%d')

# updates the jobJob resourceResource argument "businessDate" from the current date
# the environment variable "BUSINESS_DATE" will be assigned the same date from a reference to the argument
# the date is specified from the UK time zone
# the connection to JOC Cockpit is established by HTTPS and the Root CA Certificate is specified from the path to a .pem file
# the user is prompted for input of the password

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=https://joc-2-0-primary:7443 \
    --cacert=$HOME/certs/root-ca.crt \
    --client-key=$HOME/certs/centostest-primary.key \
    --client-cert=$HOME/certs/centostest-primary.crt \
    --controller-id=controller \
    --user=root \
    --job-resource=/ProductDemo/Variables/pdBusinessDate \
    --key=businessDate \
    --value=$(TZ=Europe/London date +'%Y-%m-%d')

# updates the jobJob resourceResource argument "businessDate" from the current date in the UK time zone
# the connection to JOC Cockpit is established by HTTPS and is authenticated by Client Key and Client Certificate

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root \
    --password=root \
    --job-resource=/ProductDemo/Variables/pdConfigurationData \
    --key=configurationData \
    --env-var=CONFIGURATION_DATA \
    --file=./config.ini

# updates the jobJob resourceResource argument "configurationData" from the file specified
# the connection to JOC Cockpit is established by HTTP

...