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

Rework agents installation #3971

Closed
12 tasks done
gazarenkov opened this issue Jan 31, 2017 · 3 comments
Closed
12 tasks done

Rework agents installation #3971

gazarenkov opened this issue Jan 31, 2017 · 3 comments
Labels
kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed.

Comments

@gazarenkov
Copy link
Contributor

gazarenkov commented Jan 31, 2017

The problems:

  • Current mechanism of Agents running requires too many interactions with master and for some cases per-agent specific/custom "launching" java code.
  • As a consequence of unpredictable big amount of interactions with master it may generate big log traffic which may significantly impact on master and client loading/workability (up to make it broken). The problem like we used to have with command execs.

Solution:
Make small (as small as possible, Golang app) agent-installer which will be injected first all the time when machine requires Agents. I.e. any time when workspace -> environment -> machine section contains one or more agent entry. Responsibilities of agent-installer:

  • to run agent script locally on machine
  • to orchestrate (they may not be installed simultaneously to avoid conflicts, only one-by-one) multiple agents's launching using applicable criteria to check if agent installed/launched such as:
    -- check if bash scripts process completed (installation only usecase) if no server launching supposed (agent knows that)
    -- check if server(s) launched (installation and launching usecase)
  • to send machine log messages via websocket to interested sides
  • to send notifications about starting/completing/failing during agent installation to interested sides.

@garagatyi @tolusha let's make a plan to replace old mechanism as discussed.

@gazarenkov gazarenkov added the kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. label Jan 31, 2017
@garagatyi
Copy link

garagatyi commented Feb 3, 2017

I suggest next todo list which can be source of tasks for this epic:

  1. Create specification
  • install agent workflow
  • install agent API (how client should connect to it, stream and interpret data)
  1. Refactor exec + terminal agent to separate components needed for:
  • commons(place for utilities and structures like FileLogger)
  • commands execution(execute cmd + subscriber interface for logs consumption)
  • authentication
  • transport
    • REST(routing + request handling)
    • WS + JSONRPC engine(routing + request handling + channel management)

etc. It should be possible to create new agent that can reuse these components.
3. Separate exec and terminal agents.
4. Create install agent that reuses components created in previous step.
5. Create java client for install-agent API.
6. Rework WS start back end code to use new install agent API for workspace start.
7. Rework GWT, UD clients to use new install agent API for logs streaming/downloading.

@dyrone
Copy link

dyrone commented Jun 16, 2017

@garagatyi 👍

how is the process of the authentication?

@skabashnyuk
Copy link
Contributor

Hi @dyrone
I think most parts of authentification would be covered by this epic #5362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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