Hi Alexander,
I followed your instructions to create a workspace with a primary docker machine and a secondary ssh machine. I switched to the latest state of the master branch for building the assembly.
The first issue I faced was a validation message that only machines of type "docker"
are allowed. I fixed this in the DefaultWorkspaceValidator. I pushed a pull request with the change: https://github.com/eclipse/che/pull/1055
Now, I can create the workspace and start it. Unfortunately, the ssh machine fails to connect its terminal. The error in the UI is: "Some error happened with terminal WebSocket connection"
The Che Server printed the following output:
2016-04-15 14:32:12,764[kspaceManager-2] [INFO ] [o.e.c.a.m.s.MachineManager 162] - Creating machine [ws = workspacerwrxf8s4h6mja14l: env = wksp-custom: machine = ws-machine]
2016-04-15 14:32:12,767[kspaceManager-2] [ERROR] [o.e.c.a.m.s.u.RecipeDownloader 82] - Removal of recipe file /home/kraev/git/che/assembly/assembly-main/target/eclipse-che-4.2.0-RC1-SNAPSHOT/eclipse-che-4.2.0-RC1-SNAPSHOT/tomcat/temp/recipe4818349294577732647.tmp
failed.
2016-04-15 14:32:18,267[kspaceManager-2] [WARN ] [o.e.c.p.d.c.DockerConnector 1187] - Error response from docker API, status: 200, message: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev`
or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
2016-04-15 14:32:28,304[kspaceManager-2] [INFO ] [o.e.c.a.m.s.MachineManager 168] - Machine [ws = workspacerwrxf8s4h6mja14l: env = wksp-custom: machine = ws-machine] was successfully created, its id is 'machinesxa9dg853c9zro0g'
2016-04-15 14:32:28,304[kspaceManager-2] [INFO ] [o.e.c.a.m.s.MachineManager 162] - Creating machine [ws = workspacerwrxf8s4h6mja14l: env = wksp-custom: machine = ssh-machine]
2016-04-15 14:32:28,305[kspaceManager-2] [ERROR] [o.e.c.a.m.s.u.RecipeDownloader 82] - Removal of recipe file /home/kraev/git/che/assembly/assembly-main/target/eclipse-che-4.2.0-RC1-SNAPSHOT/eclipse-che-4.2.0-RC1-SNAPSHOT/tomcat/temp/recipe5185995697911503079.tmp
failed.
2016-04-15 14:32:28,609[kspaceManager-2] [INFO ] [o.e.c.a.m.s.MachineManager 168] - Machine [ws = workspacerwrxf8s4h6mja14l: env = wksp-custom: machine = ssh-machine] was successfully created, its id is 'machinepnsbf5cjam3eo63x'
2016-04-15 14:32:28,610[kspaceManager-2] [INFO ] [o.e.c.a.w.s.WorkspaceManager 523] - Workspace 'che:custom-workspace' started by user 'che'
How can I troubleshoot this?
Thanks for your help!
Kaloyan
From: che-dev-bounces@xxxxxxxxxxx <che-dev-bounces@xxxxxxxxxxx> on behalf of Alexander Garagatyi <agaragatyi@xxxxxxxxxxx>
Sent: Friday, April 15, 2016 1:02 PM
To: che developer discussions
Subject: Re: [che-dev] How to bootstrap a minimal Che IDE?
Hi!
You can't use SSH machine as a primary machine. This functionality is not implemented yet. So you have to use docker for that.
This machine hosts CHE tooling for file editing, etc.
If possibility to execute commands in terminal right on AMI instance fits your needs you can use SSH machine for that. It will be secondary machine.
Che tooling won't be able to use PHP installed right in the AMI instance because it is in the container. But you will be able to access your files in console of SSH machine
and using API of CHE deployed in docker container.
To add secondary ssh machine to your workspace add next JSON to workspace JSON on workspace creation.
{
"name": "my_ssh_machine",
"type": "ssh",
"source": {
"type": "ssh-config"
},
"dev": false
}
So workspace JSON should looks like:
{
"name" : ...,
"defaultEnv" : "my_env",
"environments" : [
{
"name" : "my_env",
"machineConfigs" : [
{
PRIMARY MACHINE JSON
},
{
SECONDARY SSH MACHINE
}
]
}
]
}
It looks like:
{
"host": "127.0.0.1",
"port": 22,
"username": "root",
"password": "root"
}
You just need to configure SSHD to allow connection with password. If you don't want to expose password protected SSHD you can configure it to allow password access only from localhost.
Best regards,
Alexander