linkdd / tricorder

Automation the KISS way
https://linkdd.github.io/tricorder/
MIT License
53 stars 5 forks source link

:sparkles: Modules support #24

Closed Spiegie closed 1 year ago

Spiegie commented 1 year ago

This is work in progress!

Firstly: Thank you for your Effort, that you did put into this project. I already love it.

Currently I'm trying to create a Module or Plugin-system for this Project. I want to try something new. Not like other IaC-Tools like saltstack or ansible.

The Idea is, that you can create binaries, which accept structured data. This Data can be written in toml, json, yaml or what ever you want. Even a Database or API is possible. Only the module has to understand it. You could just pass the data via host-vars. The Module (or Plugin) takes this Data and does certain Tasks like creating a database in mariadb or even installing and updating mariadb. The Modules could get rolled out by matching tags of the hosts.

This approach leads quite a bit away from the agentless nature of this project. I don't know a comparable IaC-Project. Maybe somebody else got ideas, how this Problem with this idea can be addressed, or if it even has to be addressed.

But actually, I don't think, it has to be addressed. I would be very happy, to have a IaC-Tool, that tells a server once, how he should act and is adjustable via data. I like the Idea of a State, like Saltstack enforces it. But I also want to make the client (or host) less dependent on a master (except for the setup). In the words of Saltstack: I want to move the state to the Server and make the pillar even more flexible. Tricorder could act as management-tool for these Modules.

Currently, I'm uploading the binary to the Server via rsync. I'm sure, there is a better way.

By the way, I'm relatively new to Rust. My code will get better :)

Please let me know what you think about this Idea. I'll respect your Opinion.

linkdd commented 1 year ago

Thank you for your feedback, it's greatly appreciated :heart:

Even though I did not have a lot of time for this project in the last year, it's not abandoned, I'd like to come back to it (maybe in the near future?).

Anyway, I like the idea! Uploading a binary to the remote and executing the command there is probably how I'd do it as well. A few remarks though:

Again, thank you for your work, I'll be happy to review it and integrate it.

PS: I should finish the test suite, this is the one blocker for me to release as 1.0.0, but it can wait for your feature to land in 0.10 before 😄

Spiegie commented 1 year ago

Thank you for the answer and the remarks. I will consider all points and come back with a suitable commit.

Spiegie commented 1 year ago

I want to include some tests, then I think I'm done

linkdd commented 1 year ago

Don't bother with the test suite, there is another PR for it ( #23 ) that I need to get back to.

Though, can you remove the TODO comments and open issues instead?

By the way, are you interested in being added to the members of this repository?

Spiegie commented 1 year ago

Ok thanks :) I think now you can fully review my code. I'm sure, here and there are some things, I could learn from you.

I would be honored to be a member of this repository. I'm planning to contribute more to this project.