Closed skabashnyuk closed 7 years ago
WS - workspace
[
{
"id":"exec",
"description":"Agent for command execution",
"version":"1.0",
"script":"$HOME/che/exec-agent -addr :4412",
"servers":{
"execAgent":{
"port":"4412/tcp",
"protocol":"http",
"path":"/exec"
}
}
}
]
it is supposed that Bootstrapper will communicate with Master and clients using JSONRPC protocol we started using recently for communication between ws-agent and IDE client.
{
"jsonrpc": "2.0",
"method": "bootstrapper/statusChanged",
"params": {
"status": "STARTING",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
{
"jsonrpc": "2.0",
"method": "bootstrapper/statusChanged",
"params": {
"status": "DONE",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
os.Exit(1)
.
{
"jsonrpc": "2.0",
"method": "bootstrapper/statusChanged",
"params": {
"status": "FAILED",
"error" : "couldn't start agent X",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Bootstrapper starts installer X
{
"jsonrpc": "2.0",
"method": "installer/statusChanged",
"params": {
"status": "STARTING",
"installer": "org.eclipse.che.ws-agent",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Bootstrapper successfully started installer X(No server defined)
{
"jsonrpc": "2.0",
"method": "installer/statusChanged",
"params": {
"status": "DONE",
"installer": "org.eclipse.che.ws-agent",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Bootstrapper successfully started installer X(Server defined)
{
"jsonrpc": "2.0",
"method": "installer/statusChanged",
"params": {
"status": "RUNNING",
"installer": "org.eclipse.che.ws-agent",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Bootstrapper failed to start Installer X
{
"jsonrpc": "2.0",
"method": "installer/statusChanged",
"params": {
"status": "FAILED",
"installer": "org.eclipse.che.my-agent",
"error": "Install script exit code -1",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Installer X stderr
{
"jsonrpc": "2.0",
"method": "installer/log",
"params": {
"text": "no command found",
"stream": "STDERR",
"installer": "org.eclipse.che.ws-agent",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Installer X stdout
{
"jsonrpc": "2.0",
"method": "installer/log",
"params": {
"text": "Starting server...",
"stream": "STDOUT",
"installer": "org.eclipse.che.ws-agent",
"machineName": "my-machine",
"runtimeId": {
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
},
"time": "2017-02-23T16:22:22.50287146+02:00"
}
}
Added specification for installer config into 2nd item.
Changed name Installer to Bootstrapper
Bootstrapper
On June 12, 2017 at 10:52 GMT, Yevhenii Voevodin notifications@github.com wrote:
Changed name Installer to Bootstraper
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Defined bootstrapper events.
Changed bootstrapper/statusChanged
status from READY to STARTING
Runtime ID format updated from
{
"workspace": "workspace123",
"environment": "default",
"owner": "user123"
}
to
{
"workspaceId": "workspace123",
"envName": "default",
"owner": "user123"
}