Cloudomation enables the user to synchronize executions on different workspaces.
Imagine a scenario where a workspace placed in the cloud can run flow scripts in another workspace which is installed in a company Intranet or on your local machine, or in some other cloud or VPS. This is possible with workspace linking and especially useful for running automations in environments which do not have a public IP address or should not be reachable from the public network but still should be controlled by Cloudomation.
The configuration has to be done on both workspaces and is very simple. In principle the control also goes in both directions, meaning both workspaces can run flow scripts in the other one but we will cover only one direction here for brevity.
Please note that user privileges of kind ‘Organization admin’ are needed, to configure workspace linking.
To configure the workspace linking choose ‘Workspace sync’ under the Admin section and click on the ‘New’ button on the top. A ‘Workspace sync’ detail view will appear, where the actual configuration takes place.
Use a brief name for ‘Name’ by clicking on the name.
‘Remote URL’ must contain the URL of the other workspace like:
‘Own private key’ is a required field and must contain a valid RSA-key.
‘Remote public key’ is also required and must contain the public key of the linked workspace.
Hit ‘Save’ in the top menu bar to make the linking persistent.
Please note that the ‘Own private key’ and the ‘Remote public key’ are not shown after saving.
Now we head over to the other workspace.
Again, we select ‘Workspace sync’ under the admin section and hit ‘New’ on top. We can leave the ‘Remote URL’ empty, because we only set up the initialization of the connection on one workspace only. (If we have a workspace in a private network, the initialization of the connection has to be done on that one.)
Copy a new ‘Own private key’ and ‘Remote public key’ in the appropriate input fields and hit ‘Save’ in the top menu bar.
After that we can enable the linking by clicking on the x-icon next to ‘Enabled’.
We have to enable the workspace linking on the other workspace as well - simply click on the x-icon next to ‘Enabled’ on the other Workspace sync detail view.
Workspace sync under the admin section, you should see two configurations listed. One of them is showing the status message
remote workspace <other-workspace-name> connected.
If you are seeing
connected to <other-workspace-name> instead, go to the other workspace. Both can start executions on the other workspace now.
If any other message appears, please check the configuration again.
After the linking is set up, we can test it with a simple flow script:
import flow_apidef handler(system: flow_api.System, this: flow_api.Execution):this.task('REST',url='https://httpbin.org/anything',remote_workspace_name='<remote-workspace-name>',)return this.success('all done')
Start the flow by hitting ‘Run’ in the top menu bar. The execution will start, but only the flow script - the execution of the REST task will run in the other workspace
The argument ‘remote_workspace_name’ specifies the workspace, where the execution should actually run. Use the name of the other workspace instead of
It is not only possible to start one execution in the other workspace, but to run as many child executions as you want. The resources e.g. flow scripts, settings, files etc. have to be present on the other workspace.
Per default, only the execution of the flow script which started the remote execution will show up in the executions list of the controlling workspace. In order to see all executions on the remote workspace, which were started by the flow, set ‘Send all executions’ in the ‘Workspace sync’ detail view in the Admin section to ‘Enabled’.