virgo-agent-toolkit / rackspace-monitoring-agent

Rackspace Cloud Monitoring Agent
http://virgoagent.com/rackspace-monitoring-agent/
Apache License 2.0
118 stars 39 forks source link

Remote Execution #921

Closed rphillips closed 2 years ago

rphillips commented 8 years ago

Bus system for agents (Maybe)

Remote Execution Agent

creationix commented 8 years ago

Here is my overview of the system. Some of this is repeated/reworded from the initial meeting notes in the issue description, much is new.


Programs

There are 3 main programs in this system. Also other front-end systems can consume the APIs

Agent

Script Repository

This is basically like an updated version of lit.luvit.io where we learned from our mistakes and using Rackspace authentication.

Agent Endpoint

Support Website

User Stories

The user stories will help guide implementation order and priority. We can implement the minimal functionality for each story, but see the future stories to plan ahead when architecting code.

Support TTY

This is a pretty big first step, but should make for a very impressive demo.

Add in FileSystem Browsing / Editing

A second step would be adding in functionality for a racker to browse the files on a box. The audit system will record nearly everything including what folders they open, what files they view, and any changes made. This is also shown in real-time on both sides and can be played back at a later date.

We can even go so far as to show the text editor as a racker edits a config file complete with cursor. The long-term record only needs remember the final state of the file when saved.

Automation - Shell Commands

In addition to giving more power to support rackers, we want to reduce the load on support rackers. This step will add one-off commands that can be done purely through APIs. They will also be recorded and audited live of course.

Automation - Scripts

Shell commands are limited to what's on the machine shell and form a more automated version of the tty shell. But scripts can run standalone logic within the agent using the APIs provided in the sandbox.

Scheduled Commands

In order to take over for the old monitoring system, we need the ability to run commands or scripts on a schedule so that the agent can automatically do things without first being told to do it every time by the AEP.

creationix commented 8 years ago

Note that this system is very useful for tasks other than support. The filesystem / tty combo, for example is more than enough for a developer to work on a remote machine via a web browser. I built something much like this at Cloud9 IDE.

It's the integrated auditing of everything and rackspace authentication that makes this a very useful rackspace tool, but we could easily open source bits of this to gain community support if desired.

creationix commented 8 years ago

Design TODOs:

Define sandbox API for scripts running in agent.

We need to decide what APIs the sandbox will provide to scripts and probably have several sets of permissions so that some scripts can be considered safer than others.

Choose Scripting Language.

We want something that people know, is very fast, and doesn't incur too much memory overhead.

LuaJIT (Lua)

Pros:

Cons:

V8 (JavaScript)

Pros:

Cons:

DukTape (JavaScript)

Pros:

Cons:

PyPy (Python)

Pros:

Cons:

Jack

Personally I'd love to design a new language from scratch purpose made for this system.

Pros:

Cons:

creationix commented 8 years ago

another TODO is to design the API interface for AEP and script repository.

creationix commented 8 years ago

Steps to get started with initial prototype in luvit.