Skip to content
New issue

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

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

Already on GitHub? # to your account

Plugins system! #182

Open
artem-zinnatullin opened this issue Nov 24, 2017 · 2 comments
Open

Plugins system! #182

artem-zinnatullin opened this issue Nov 24, 2017 · 2 comments
Assignees

Comments

@artem-zinnatullin
Copy link
Contributor

At the moment the only ways to customize Mainframer behavior are:

  • Modify the source code of Mainframer (easy, since we ship it as a bash script, but it's easy to break compatibility and it complicates updates for user)
  • Make a custom ssh server that'll do necessary work once Mainframer connects to it (pretty hard, limited functionality, but doesn't break compatibility and Mainframer can be updated without problems)

There are multiple users (including myself) who want custom behavior like @AndreasBackx with Docker integration #167 and @crysxd with AWS EC2 integration #181.

We can of course suggest people to fork Mainframer and maintain own fork with the integration (which complicates life for everyone).

Or we can try to design and develop plugins/hooks system that'll add extension points to Mainframer so such integrations could be maintained as separate projects (that we can list in README) and plugged into Mainframer by modifying only config files.

So far I see it as config entries that'll allow user to specify plugins (in form of executable binaries/scripts) to be run:

  • before sync (local machine)
  • before remote command execution (local machine)
  • before remote command execution (remote machine)
  • after remote command execution (remote machine)
  • after remote command execution (local machine)
  • after sync (local machine)

Additional information (like working directory, user command, etc) can be passed as environment variables, plus plugins are of course welcome to read Mainframer configs and store their configs in .mainframer folder (we'll just need to agree on file names to avoid conflicts).

@ming13 @dmitry-novikov @yunikkk @ghostbuster91, @pawegio thoughts?

@artem-zinnatullin
Copy link
Contributor Author

Most likely we'll need to allow plugins to resolve some configuration parameters for Mainframer, ie dynamically resolve remote machine connection parameters.

@artem-zinnatullin
Copy link
Contributor Author

I still think this is very important feature, but I've removed it from 3.0.0 milestone.

We can ship initial 3.x without it and add it later.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant