Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute commands directly on machine #1944

Closed
5 tasks done
skabashnyuk opened this issue Jul 26, 2016 · 1 comment
Closed
5 tasks done

Execute commands directly on machine #1944

skabashnyuk opened this issue Jul 26, 2016 · 1 comment
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template. kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed.
Milestone

Comments

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Jul 26, 2016

Problem description:
Currently we run command via calling Machine API method placed on master node.
In a Docker case physically it means using docker exec() call (which is remote in common case).
In a case of big loading (Codenvy case) there are big command output which routes through master node which may cause:

  1. Unexpected loss of output
  2. UI freezes
  3. Loss of server connection

Sub-tasks:

Task 2 depends on 1.
Task 3 can be started in parallel with task 1, but finished after task 1.
Task 4 depends on 3.

Proposal
To create special type of agent that will be injected into machine. That Agent will expose API of process execution and logs streaming as REST or RPC call.
Here is list of pros we can get from that agent in comparison to current state of API:

  • Agent saves logs of processes locally in the machines. So main API doesn't have to care about scalability of logs storage.
  • Agent stream logs from local OS so it is not possible that we will lose connection with process and won't be able to stop it without workarounds.
  • Streaming of huge amount of logs from that agent can't overload main API because clients will connect to it directly.
  • Currently execs that we uses for command execution are poorly supported by docker.
  • Execs are not portable to other machines implementations (other containers, VMs, local PC, SSH machines, etc)
  • To be able to stream logs from execs we create persistent connections, so we can consume all available threads on the instance where main API is located

How proposed agent will work:

  • On machine start we deploy agent into the machine
  • Main API shows url of machine agent in the machine configuration
  • Clients use that url to create processes and stream logs
@skabashnyuk skabashnyuk added kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. kind/task Internal things, technical debt, and to-do tasks to be performed. kind/planning A checklist of issues for planning a particular sprint. labels Jul 26, 2016
@skabashnyuk skabashnyuk added team/platform and removed kind/task Internal things, technical debt, and to-do tasks to be performed. kind/planning A checklist of issues for planning a particular sprint. labels Jul 26, 2016
@bmicklea
Copy link

@skabashnyuk please take in the next sprint.

@gazarenkov gazarenkov assigned skabashnyuk and unassigned garagatyi and voievodin Sep 28, 2016
@gazarenkov gazarenkov changed the title Change the way how clients execute commands in a machine Execute commands directly on machine Sep 28, 2016
@bmicklea bmicklea added the kind/enhancement A feature request - must adhere to the feature request template. label Nov 3, 2016
@skabashnyuk skabashnyuk added this to the 5.0.0-M9 milestone Dec 20, 2016
@bmicklea bmicklea mentioned this issue Jan 13, 2017
70 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed.
Projects
None yet
Development

No branches or pull requests

5 participants