Page History
...
Code Block | ||
---|---|---|
| ||
Usage: js7_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 --java-home=<directory> | optional: Java Home directory for use with encryption --java-lib=<directory> | optional: Java library directory for use with encryption, default: /home/sos/encrypt/enc/../lib --java-options=<options> | optional: Java Options for use with encryption --encrypt-cert=<path> | optional: path to Agent's certificate or public key used to encrypt value --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 | ||||
---|---|---|---|---|
| ||||
./js7_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 \ --env-var=BUSINESS_DATE \ --value=$(date +'%Y-%m-%d') # establishes the connection to JOC Cockpit by HTTP # updates the "businessDate" Job Resource variable "businessDate" from the current date UTC # establishesin the connectionlocal totime JOC Cockpit by HTTPzone # receiving jobs can use the "BUSINESS_DATE" environment variable to receive the current value |
Update Job Resource Variable using HTTPS Connection
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_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') # updatesestablishes the Jobconnection Resourceto argumentJOC "businessDate"Cockpit fromby theHTTPS currentusing date # the environmentRoot variable "BUSINESS_DATE" will be assigned the same date from a reference to the argument # the date is specifiedCA Certificate specified from the path to a .pem file # updates the "businessDate" Job Resource variable from the UKcurrent date in the London time zone # updates the connection to JOC Cockpit"BUSINESS_DATE" environment variable that is established by HTTPS and assigned the Root CA Certificate is specifiedsame date from thea pathreference to a .pem filethe variable # prompts the user is prompted for input of the password |
...
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_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 "businessDate" Job Resource argument "businessDate"variable from the current date in the UKLondon time zone # establishes the connection to JOC Cockpit is established by HTTPS andusing is authenticateda by Client Key and Client Certificate for authentication |
Update Job Resource Variable from File
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_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 "configurationData" Job Resource argument "configurationData"variable from the configuration file specified ## receiving jobs use the "CONFIGURATION_DATA" environment variable willthat holdspecifies the path to a temporary file holding the configuration filedata |
Update Job Resource Variable from Encrypted Value
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_set_job_resource.sh \ --url=http://joc-2-0-primary:7446 \ --controller-id=controller \ --user=root \ --password=root \ --job-resource=/ProductDemo/Variables/pdBusinessSecret \ --key=businessSecret \ --value='secret' \ --encrypt-cert=./agentfoobar.crt # updates the "businessSecret" Job Resource variable "businessSecret"from fromthe somegiven value # the valueencrypts of the "businessSecret" variable will be encrypted using an Agent's certificate # the value of the "businessSecret" variable holds thevariable encryptedusing symmetric key, initialization vector and encrypted secretan Agent's certificate from the foobar.crt file |
Update Job Resource Variable from Encrypted File
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_set_job_resource.sh \ --url=http://joc-2-0-primary:7446 \ --controller-id=controller \ --user=root \ --password=root \ --job-resource=/ProductDemo/Variables/pdConfigurationDataSecret \ --key=configurationDataSecret \ --env-var=CONFIGURATION_DATA_SECRET \ --file=./config.ini \ --encrypt-cert./foobar.crt # updates the "configurationDataSecret" Job Resource variable "configurationDataSecret" from the configuration file specified # encrypts the contentscontent of the file will be encrypted using the target Agent's certificate from the foobar.crt file # creates anthe additional variable "configurationDateSecret_key" and the environment variable "CONFIGURATION_DATA_SECRET_key" will be created that both hold the encrypted symmetric key and initialization vector |
...
Overview
Content Tools