Page History
...
The following examples illustrate typical use cases .
Exporting Objects
...
for setting up an environment with Controller and Agents.
Register, Check and Unregister Controller
Controller instances are assigned a Controller ID on installation. When registering the Controller then the Controller ID is used to identify the Controller.
Users can register a Controller from its URL. Users can check if the connection between JOC Cockpit and Controller can be established.
Code Blockcode | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)) # register exportStandalone workflowsController ./deploymanage-workflowcontroller.sh exportregister ${request_options[@]} \ --file=export.zip --path=/ap/ap3jobs,/ap/Agent/apRunAsUser --type=WORKFLOW # export draft schedules ./deploy-workflow.sh exportprimary-url=http://localhost:4444 --primary-title="Standalone Controller" # check Standalone Controller Connection ./manage-controller.sh check ${request_options[@]} \ --file=export.zip --path=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULE --no-released--controller-url=http://localhost:4444 # exportunregister objectsStandalone from folderController ./deploymanage-workflowcontroller.sh exportunregister ${request_options[@]} \ --file=export.zip --folder=/ap --recursive # export objects from folder using relative path ./deploy-workflow.sh exportcontroller-id=controller |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root) # register Controller Cluster ./manage-controller.sh register ${request_options[@]} \ --file=export.zip --folder=/ap/Agent --recursiveprimary-url=http://localhost:4544 --use-short-path # export objects from folder, limiting object types and validity, feeding audit log ./deploy-workflow.sh exportprimary-title="Primary Controller" \ --secondary-url=http://localhost:4644 --secondary-title="Secondary Controller" # check Controller Cluster Connections ./manage-controller.sh check ${request_options[@]} \ --file=export.zip --folder=/ap --recursive --type=WORKFLOW,JOBRESOURCE --no-invalid --audit-message="export to production" |
Importing Objects
...
controller-url=http://localhost:4544
./manage-controller.sh check ${request_options[@]} --controller-url=http://localhost:4644
# unregister Controller Cluster
./manage-controller.sh unregister ${request_options[@]} \
--controller-id=controller --controller-url=http://localhost:4544 |
Storing, Deploying, Revoking and Deleting Agents
Storing and Deploying Agents
When Agents are stored, then they are added or updated in the inventory and are set to the not deployed status.
When Agents are deployed, then the Agent configuration will be made available to the Controller that connects to the related Agent. As a prerequisite for deployment the Agent must be up & running and must be reachable for the Controller to establish a connection
...
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # store importStandalone objectsAgent ./deploymanage-workflowcontroller.sh importstore-agent ${request_options[@]} \ --agent-fileid=export.zipStandaloneAgent --agent-overwrite # import objects to a new top-level folder and apply suffix ./deploy-workflow.sh importname=StandaloneAgent \ --agent-url="http://localhost:4445" --title="Standalone Agent" # deploy Standalone Agent ./manage-controller.sh deploy-agent ${request_options[@]} \ --file=export.zip --folder=/Version22 --suffix=v22 # revalidate objects from folder ./deploy-workflow.sh revalidateagent-id=StandaloneAgent |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # store Agent Cluster using Primary/Secondary Director Agent ./manage-controller.sh store-agent ${request_options[@]} \ --agent-id=AgentCluster --agent-name=AgentCluster --title="Agent Cluster" \ --folder=/Version22 --recursive |
Exporting, Signing and Importing/Deploying for High Security Level
...
- Digital signing includes that based on the user's Private Key and Certificate signature files are created that have to be added to the archive file for later import & deployment.
- The steps to import and to deploy are available from a single operation to prevent tampering of objects after import.
primary-subagent-id=primary-director --primary-url=http://localhost:4545 --primary-title="Primary Director" \
--secondary-subagent-id=secondary-director --secondary-url=http://localhost:4645 --secondary-title="Secondary Director" |
Revoking and Deleting Agents
When Agents are revoked, then they will be deleted from the Controller. The Agent configuration remains in place with the inventory and will be set to the not deployed status.
When Agents are removed, then they will be deleted from the Controller and from the inventory
...
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # export objects from folder for signing ./deploy-workflow.sh export revoke Standalone Agent ./manage-controller.sh revoke-agent ${request_options[@]} --agent-id=StandaloneAgent # delete Standalone Agent ./manage-controller.sh delete-agent ${request_options[@]} \ --file=export.zip --folder=/myFolder --recursive --for-signing --agent-id=StandaloneAgentHttpId |
Revoking an Agent Cluster includes to revoke the Subagents and Subagent Clusters from the Controller using a single operation.
Deleting an Agent Cluster wipes the Agent configuration from both Controller and inventory.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # revoke Agent Cluster ./manage-controller.sh revoke-agent ${request_options[@]} --agent-id=AgentCluster --cluster # delete Agent Cluster ./manage-controller.sh delete-agent# digitally sign objects mkdir -p ./temp rm -fr ./temp/* unzip -d ./temp ./export.zip ./js7_sign_workflow.sh --dir=./temp --key=./ecdsa.key --cert=./ecdsa.crt --hash=sha512 rm -f ./import-from-signing.zip cd ./temp zip -r ../import-from-signing.zip * cd - # import/deploy objects ./deploy-workflow.sh import-deploy ${request_options[@]} \ --file=import-from-signing.zip |
Deploying and Revoking Objects
...
--agent-id=AgentCluster |
Storing and Deleting Subagents
When Subagents are stored, then they are added or updated in the inventory and will be set to the not deployed status.
When Subagents are deployed, then they are made available to the Agent Cluster that connects to the related Subagent. As a prerequisite for deployment the Subagent must be up & running and must be reachable for the Agent Cluster to establish a connection
...
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # deploy workflows and update daily plan ./deploy-workflow.sh deploy ${request_options[@]} \ --path=/ap/ap3jobs,/ap/apEnv --type=WORKFLOW=root --datecontroller-fromid=nowcontroller) # deploy objects from folder recursively and update daily planstore Subagent ./deploymanage-workflowcontroller.sh deploystore-subagent ${request_options[@]} \ --agent-folder=/ap/Agent --recursive --date-from=nowid=AgentCluster --subagent-id=Subagent_01 \ --subagent-url=http://localhost:4745 --title="Subagent 01" # revokestore workflowsSubagent ./deploymanage-workflowcontroller.sh revoke store-subagent ${request_options[@]} \ --agent-id=AgentCluster --subagent-id=Subagent_02 \ --subagent-pathurl=http:/ap/ap3jobs,/ap/apEnv/localhost:4845 --type=WORKFLOWtitle="Subagent 02" # revoke objects from folderdelete Subagent ./deploymanage-workflowcontroller.sh revokedelete-subagent ${request_options[@]} \ --folder=/ap/Agent --recursive |
Releasing and Recalling Objects
...
--subagent-id=Subagent_01 |
Storing, Deploying, Revoking and Deleting Subagent Clusters
Storing and Deploying Subagent Clusters
When Subagent Clusters are stored, then they are added or updated in the inventory and will be set to the not deployed status.
When Subagent Clusters are deployed, then the cluster configuration will be made available to the Agent Cluster
...
.
Code Block | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # store active-passive (fixed-priority) Subagent Cluster ./manage-controller.sh store-cluster ${request_options[@]} \ --agent-id=AgentCluster --cluster-id=active-passive \ --subagent-id=Subagent_01,Subagent_02 --priority=first --title="Active-Passive Cluster" # store active-active (round-robin) Subagent Cluster ./manage-controller.sh store-cluster# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # release schedules and update daily plan ./deploy-workflow.sh release ${request_options[@]} \ --path=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULEagent-id=AgentCluster --datecluster-from=now # release objects from folder and update daily plan ./deploy-workflow.sh release ${request_options[@]}id=active-active \ --subagent-folder=/ap/Agentid=Subagent_01,Subagent_02 --recursivepriority=next --date-from=nowtitle="Active-Active Cluster" # deploy recallSubagent schedulesClusters ./deploymanage-workflowcontroller.sh recalldeploy-cluster ${request_options[@]} \ --path=/ap/Agent/apAgentSchedule01,/ap/Agent/apAgentSchedule02 --type=SCHEDULE # recall objects from folder ./deploy-workflow.sh recall--cluster-id=active-passive ./manage-controller.sh deploy-cluster ${request_options[@]} \ --folder=/ap/Agent --recursive |
Storing and Removing Objects
...
--cluster-id=active-active |
Revoking and Deleting Subagent Clusters
When Subagent Clusters are revoked, then they are deleted from the Agent Cluster. The cluster configuration remains in place with the inventory and will be set to the not deployed status.
When Subagent Clusters are deleted, then they are deleted from the Agent Cluster and from the inventory
...
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # store object ./deploy-workflow.sh store ${request_options[@]} \ --path=/ap/NewFolder01/NewWorkflow01 --typepassword=WORKFLOWroot --controller-file=NewWorkflow01.workflow.jsonid=controller) # removerevoke object, update daily planSubagent Clusters ./deploymanage-workflowcontroller.sh removerevoke-cluster ${request_options[@]} \ --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOW --date-from=now # remove objects from folder, update daily plan ./deploy-workflow.sh remove--cluster-id=active-passive ./manage-controller.sh revoke-cluster ${request_options[@]} --cluster-id=active-active # delete Subagent Clusters ./manage-controller.sh delete-cluster ${request_options[@]} \ --folder=/ap/NewFolder01 --date-from=now |
Restoring and Deleting Objects
...
--cluster-id=active-passive
./manage-controller.sh delete-cluster ${request_options[@]} --cluster-id=active-active
|
Exporting and Importing Agents
Agent configurations can be exported to an archive file. They can be imported, for example when setting up next JS7 environments.
For import users can specify that existing Agent configurations with the same name should be overwritten
...
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # restore object from trash, using suffix for restored objectd ./deploy-workflow.sh restore ${request_options[@]} \ --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOW --new-path=/ap/NewFolder01/NewWorkflow01 --suffix=restored # delete object from trash ./deploy-workflow.sh delete=root --password=root --controller-id=controller) # export Agents from their Agent ID ./manage-controller.sh export-agent ${request_options[@]} \ --path=/ap/NewFolder01/NewWorkflow01 --type=WORKFLOWfile=export_agents.zip --agent-id=StandaloneAgent,AgentCluster # delete objects from trash by folderimport Agents ./deploymanage-workflowcontroller.sh deleteimport-agent ${request_options[@]} \ --folder=/ap/NewFolder01file=export_agents.zip |
Resources
- API
- Workflow Deployment Operations
- Workflow Status Operations
...