Documentation > Developers
The OpenMOLE GUI implements all the OpenMOLE features.
However you may be interested in using OpenMOLE in interactive console mode.
To do so, use the
The only difference between the scripts in the console mode and the ones from the editor is the way you launch their execution, you cancel it, and you follow their progress. A console workflow is launched as follow:
The last part of
Using the
-c
argument in your console: ./openmole -c
.
The only difference between the scripts in the console mode and the ones from the editor is the way you launch their execution, you cancel it, and you follow their progress. A console workflow is launched as follow:
val ex = exploration -< (model on env) start
Using the ex
and the env
variables, you can follow the progress of the execution by using the commands: print(ex)
and print(env)
.
To cancel the execution, you should use ex.cancel
.
Authentications 🔗
In console mode, you can define an authentication using a pair of login/password with the following command:SSHAuthentication += LoginPassword("login", encrypted, "machine-name")
Or, to authenticate with a private key:
SSHAuthentication += PrivateKey("/path/to/the/private/key", "login", encrypted, "machine-name")
It mentions the encrypted function.
This function will prompt for the password/passphrase of the private key, right after the call to the Environment
builder, using SSHAuthentication
.
The last part of
SSHAuthentication
, machine-name
, should match exactly the address of the machine in your execution environment.
OpenMOLE searches the matching SSH keys using an exact match on login
and machine-name
between the environment and the stored keys.
Run script 🔗
In console mode, you have to copy-paste your whole workflow to run it. A console workflow is launched like this:val ex = exploration -< (model on env) start
Note that you need to invoke start
on your workflow, contrary to Editor mode.
Using the
ex
and the env
variables you can follow the progress of the execution by using the commands:
print(ex)
and print(env)
.
To cancel the execution you should use ex.cancel
.