Page History
...
- The JS7 offers to perform operations on Controllers and Agents by the JS7 - REST Web Service API.
- For detailed information see the Technical Documentation of the REST Web Service API.
- For available CLI operations see JS7 - Unix Shell Command Line Interface.
- The REST Web Service API can be accessed from Shell utilities such as
curl
. - In addition, a PowerShell module is available for simplified access to the REST Web Service API. This is described in the JS7 - PowerShell Module article.
...
Controller Status Operation Script
Operation | Object |
---|---|
terminate / restart | Standalone Controller Controller Cluster |
cancel / restart | |
check | |
switch-over | Controller Cluster |
appoint-nodes | |
confirm-loss | |
enable / disable | Standalone Agent |
reset | |
switch-over | Agent Cluster |
confirm-loss | |
reset | |
enable / disable | Subagent |
reset | |
encrypt / decryot | None |
The script is offered for download and can be applied for frequently used status operations:
...
jq ships with the MIT license, see https://opensource.org/licenses/MIT.
Download
Download: operate-controller.shJS7 - Download (Section: Unix Shell ClI)
Usage
Invoking the script without arguments displays the usage clause:
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)
# reset Agent Cluster
./operate-controller.sh reset-agent "${request_options[@]}" --agent-id=AgentCluster
# reset/force Agent Cluster
./operate-controller.sh reset-agent "${request_options[@]}" --agent-id=AgentCluster --force |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# create Private Key openssl ecparam -name secp384r1 -genkey -noout -out encrypt.key # create Certificate Signing Request openssl req -new -sha512 -nodes -key encrypt.key -out encrypt.csr -subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=Encrypt" # create Certificate openssl x509 -req -sha512 -days 1825 -signkey encrypt.key -in encrypt.csr -out encrypt.crt -extfile <(printf "keyUsage=critical,keyEncipherment,keyAgreement\n") # encrypt a secret such as a password using the Certificate, the encryption result will be returned and will look like: enc:BEXbHYa... ./deploy-controller.sh encrypt --in="root" --cert=encrypt.crt # options for connection to the JS7 REST API can specify the encryption result as password and the Private Key for decryption request_options=(--url=http://localhost:4446 --user=root --password="enc:BEXbHYa..." --key=encrypt.key --controller-id=controller) # for example, when restarting a Controller the Private Key is used to decrypt the password on-the-fly for access to the REST API on-the-fly ./operate-controller.sh restart "${request_options[@]}" # decrypt an encrypted secret using the Private Key ./deploy-controller.sh decrypt --in="enc:BEXbHYa..." --key=encrypt.key |
...
Overview
Content Tools