-
Notifications
You must be signed in to change notification settings - Fork 85
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
[Discussion] [Idea] Move all utilities for formulas outside of edited files (states, yaml) #122
Comments
@daks I think you have point there, But you have more those are called and https://github.com/saltstack/salt-contrib has a bunch of them |
Or get them to add libtofs, into the core state system. |
@daks Thanks for posting an alternative approach to #116!
This is roughly the same amount of code which was needed before with @daks I wholeheartedly agree with your point, that using Formulas are stand-alone at the moment and IMHO we should keep it that way as much as possible to avoid dependency hell. The moment we move towards shared modules and states we'll have to take care of backwards-compatibility, which is doable but adds complexity. In #102 #115 we deliberately used the methods Salt provides and stayed within the In short I see two approaches at the moment:
In the hopes to enrich the debate. ¹ like |
@daks Thanks for this, important points to raise as the reshaping of SaltStack Formulas is progressing. I'd like to contribute to this discussion as well but time is a bit short at the moment. I hope to get a chance over the coming days. |
@myii no problem. I don't have that much time myself currently. |
I had thought about something like that too. Shouldn't be hard to POC. I wonder if trying to override the
Not having dependencies will be limiting at one moment in the future, but for now we don't have tooling and not a lot of needs (not sure if some formulas has dependencies). Also having a "stdlib" formula could completely remove the problem of having to port
I think this is worth testing. Not sure I'll have time soon though. Thanks all for commenting.
|
The "stdlib" approach is what puppet has done, which brings a whole lot of things, like versioning on the table, it works because they have the infrastructure to pull versioned modules. At the moment saltstack-formulas is getting in better shape for doing this kind of work but where missing a key part, that is a tool/infrastructure to serve this from.
I propose a third solution:
I don't see an issue with testing the other solutions.
|
👍 I think we should keep it simple and focus on the strengths we have (vs Puppet, Chef, or Ansible) :
|
On the other hand it could be nice to start centralizing them in a |
for an update: I tried (some time ago) to create a Any help appreciated on this specific subject (even if I have less time than some months ago :-/ |
On several discussions about TOFS or config.get, I have expressed my main problem with those 'tools': they clutter/complicate the files that contributors needs to write.
My point of view on this is that such basic/simple formulas tools should not complicate any new comer which want to create a simple formula without any knowledge of them before.
They are too intrusive to keep this principe.
Part of TOFS is already abstracted in
libtofs.jinja
but it still needs 4-5 lines for eachfile.managed
.I know less config.get but I think it also had a lot of code (can't find now the PR I am looking) and especialy to deal with cases like salt-ssh.
I wonder if there is some way to do it. Puppet modules uses
lib
to add specific code. Ansible roles seems to usehandlers
.Couldn't
_modules
or_states
or whatever be used to do it? Even if we need to convert jinja/state code to Python.cc @myii, @javierbertoli @aboe76 @n-rodriguez to open-mindly discuss this idea :)
The text was updated successfully, but these errors were encountered: