Remote Runner: start manual runner and workers
Start a runner that waits for workers and install it as the default runner:
GtRemoteRunner hasUniqueInstance ifTrue: [ GtRemoteRunner cleanUp ]. runner := GtRemoteRunner new managerStartupAndShutdown: GtRrManualManagerStartupAndShutdown new; port: 7042; startLogging; start. GtRemoteRunner setUniqueInstance: runner. runner.
Start a worker that connects to the specified runner (this will typically be run in a separate image from the runner above):
worker := GtRrWorker serverSocketAddress: 'localhost:7042'. worker attributes at: #changesSync put: false. worker start.
or start one from the command line:
bin/GlamorousToolkit-cli GlamorousToolkit.image clap remoteRunnerWorker --log --serverSocketAddress 7042 --changesSync --detachChangesFromFileSystem --noLepiterReload --noGtImageUpdate
or simulate the command line:
commandLine := GtRrWorker commandLineCommand match: #('remoteRunnerWorker' '--log' '--serverSocketAddress' '7042' ). "Start the worker in a separate process since it will hibernate" [ GtRrWorker processCommandLineArgs: commandLine ] fork.
Connect to a headless runner:
GtRemoteRunner hasUniqueInstance ifTrue: [ GtRemoteRunner cleanUp ]. runner := GtRemoteRunner headlessOnPort: 7042 codeSync: false. GtRemoteRunner setUniqueInstance: runner. runner.
runner startAnnouncementsNotifier.
Submit a simple job:
task := GtRrScriptTask script: '4+3'. job := GtRemoteRunner default submitJob: task asJob.