-
Notifications
You must be signed in to change notification settings - Fork 85
[2019 02 08] Log: Initial improvements' discussions
UPDATE: This has effectively been processed into the main SaltStack Formulas project.
This is a (temporary) page to capture the initial discussions had about improvements that can be made to SaltStack Formulas. The idea is for this content to be processed into separate (permanent) pages for planning and decision-making purposes.
Person | Time | Message |
---|---|---|
Imran Iqbal |
2019-02-07 08:55 |
I don’t intend to hijack this discussion but this PR has reminded me of a more general situation in respect to these SaltStack formulas. With a number of active contributors involved in this PR discussion, hopefully someone can suggest a better place to talk about the points I mention below:
I’m not expecting anywhere near a complete solution to this. However, I believe it would be useful to compare ideas, to identify any (small) improvements that realistically could be made and maintained. |
Niels Abspoel |
19:43 |
@myii I agree hijacking a discussion for the greater good…:) I would love to see these salt-formula’s become something like a community maintenance project. something allong the line of vox pupuli https://voxpupuli.org/ but then for salt |
Imran Iqbal |
20:05 |
@aboe76 I just had a quick look at https://voxpupuli.org/ and I’m impressed by the effort they have put in over the years. That far surpasses what I was envisaging! I’m intrigued by the idea — but I don’t think it’s right to continue off-topic for this PR. Is there a more appropriate place for this discussion to be continued? |
Person | Time | Message |
---|---|---|
Imran Iqbal |
20:23 |
So how can saltstack-formulas improve? |
Niels Abspoel |
20:24 |
having a stable salt sls language guide…. |
Imran Iqbal |
20:25 |
What do you mean by "language guide"? |
Niels Abspoel |
20:26 |
having one way to use salt states like the file.managed long format instead of the short version |
Imran Iqbal |
20:27 |
Ah OK, one way I’ve done this for myself is that I’ve used |
Niels Abspoel |
20:32 |
but having a document like docs.saltstack.com having more extensive examples on how something can be done would be better. |
Imran Iqbal |
20:33 |
Of course, but the idea is the same. The snippets can be expansive as necessary, to ensure clear and consistent use of each state/module/etc. |
Niels Abspoel |
20:35 |
yes because a new user of saltstack or formula writer would look at the docs first. |
Imran Iqbal |
20:37 |
Improving the main documentation is definitely a useful task — but that will take time. Are there any improvements that can be attained in the shorter-term? |
Niels Abspoel |
20:38 |
thinking about the map.jinja part, I haven’t tested it but I think the new map.jinja from salt-formula makes the formula faster…because less jinja. |
Imran Iqbal |
20:42 |
Those changes feel like definite improvements to me as well; if only from the readability angle. Easier to track down where the mapping is not being constructed properly. |
Niels Abspoel |
20:43 |
yes and I like the idea of files switch, I have used that on different configuration to ease people in to saltstack and then coach them into more pillar driven options… |
Imran Iqbal |
20:46 |
I haven’t had enough time to familiarise myself with it but I get the idea of how useful it can be. In terms of pillar-driven formulas, then I’m aware that it may not be a recommended practice. Is there a better way that can be adopted? |
Niels Abspoel |
20:47 |
the fun part of saltstack, is there a recommended way? |
Imran Iqbal |
20:48 |
I would suppose that larger-scale deployments would suggest what works well and what doesn’t so much. |
Javier Bértoli |
20:48 |
joined #formulas. |
Niels Abspoel |
20:49 |
hi @Javier Bértoli |
Javier Bértoli |
20:49 |
aloha, @aboe! Nice to talk to you in a more immediate way that github messages 😛 |
Niels Abspoel |
20:50 |
yeah but merges are faster ✨ |
Imran Iqbal |
20:50 |
Definitely, direct messaging FTW. |
Javier Bértoli |
20:59 |
yes… I agree that I like the way the map.jinja changed, is clearer to read. I think that proposing some 'guides' would be a good thing, obviously. And if they reflect in the |
Niels Abspoel |
21:01 |
What about something like the what’s proposed about the files_switch stuff, I think it is reasonable to have it available as an option, to be able to insert a file instead of heavy pillar yaml files is a blessing for some people |
Imran Iqbal |
21:02 |
Tests, definitely. |
Javier Bértoli |
21:02 |
agreed on the |
Imran Iqbal |
21:03 |
How about making the |
Niels Abspoel |
21:03 |
I like the idea. and hopefully it will mitigate those formula:ng states… |
Javier Bértoli |
21:03 |
oh, please! |
Niels Abspoel |
21:04 |
I think with the files_switch option most of those can be integrated and removed and only keep one formula |
Javier Bértoli |
21:07 |
yes. I see two 'big' tasks at hand, mostly: |
Imran Iqbal |
21:08 |
Where’s the best place to collect these plans? The available wiki pages on the |
Niels Abspoel |
21:09 |
yes make the template-formula als sticky… |
Javier Bértoli |
21:09 |
the github repos have a wiki available to them, downloadble via git, perhaps there? |
Niels Abspoel |
21:09 |
most of the github formulas in salt-formulas have the wiki and projects enabled. |
Javier Bértoli |
21:09 |
|
Imran Iqbal |
21:10 |
So make |
Javier Bértoli |
21:12 |
makes sense to me, yes. As you guys mentioned earlier, a newcomer will go to the docs pages and then to the template, right? |
Niels Abspoel |
21:12 |
hopefully |
Imran Iqbal |
21:12 |
The |
Javier Bértoli |
21:13 |
👍 |
Niels Abspoel |
21:14 |
@Javier Bértoli nice evening! |
Imran Iqbal |
21:15 |
Thanks for that feedback. I think we’ve got a fair bit to start with. |
Niels Abspoel |
21:15 |
can we integrate saltstack with riot.im and saltstack irc? |
Imran Iqbal |
21:15 |
Yes, definitely. I’ve been doing a bit of work with Matrix recently so I’m confident of that. |
Niels Abspoel |
21:26 |
irc only |
Imran Iqbal |
21:34 |
OK, for the time being, I’m going to grab this discussion and put it in a temporary page in the wiki, so that it can be processed later into proper pages. There’s only so much history that is retained here when on Slack’s free plan. |
Noel MacLoughlin |
21:52 |
Okay. I understand this discussion is exploring ideas around improving formulas. Thats a good thing. |
Imran Iqbal |
22:00 |
Thanks for those points. Some very interesting ones there, let me offer my take on those. |
Noel MacLoughlin |
22:03 |
Forth - template-formula is too focussed on PKG. There are many was to distribute packages. All the Cloud native projects seem to distribute (1) Tarball releases (i.e. AMD64), (2|) github repo and three source tarball (3). So template-formula should support different ways of absorbing software and be a template for this. |
Imran Iqbal |
22:03 |
Correct way or not so correct, there’s a large corpus of formulas that have been built up over the years. It would be premature at this moment to make a decision about these. However, there are a number of improvements that could be made, even if only to gain better consistency and quality across all of the formulas. |
Noel MacLoughlin |
22:04 |
Fifth - A |
Imran Iqbal |
22:06 |
I haven’t given much thought to the |
Noel MacLoughlin |
22:07 |
Sure - a solution-formula is just a showcase of how to manage multiple things (A, B, C). |
Imran Iqbal |
22:08 |
Definitely agree with the |
Noel MacLoughlin |
22:13 |
A solution-formula should showcase how you might model system containing A, B, C. C. Everyone is trying to solve this problem. I was looking at https://www.airshipit.org/ and its same problem - how to model cloud-native systems in YAML and deploy. |
Imran Iqbal |
22:27 |
Do you think that these are within the scope of what can be achieved by |
Noel MacLoughlin |
22:31 |
Yes I do. But starting with basics - a good template-formula (for A) would be start. My idea of solution-formula is simply a repo containing three template-formulas (A, B, C). This would need a |
Imran Iqbal |
22:33 |
Standardisation across formulas? |
Noel MacLoughlin |
22:33 |
Yes!! |
Imran Iqbal |
22:33 |
Are our formulas trying to do too much? |
Noel MacLoughlin |
22:34 |
Thats my first question - is formulas correct way to go? |
Imran Iqbal |
22:34 |
Should they be more directed, more specific, rather than trying to cater for all situations from one formula? |
Noel MacLoughlin |
22:34 |
every state should do one thing, and do it well. |
Imran Iqbal |
22:39 |
But then comes the question of inter-dependence / cohesion between formulas. I understand that this has been avoided as much as possible and there are good reasons for that. But that has probably affected the way each formula has grown. |
Noel MacLoughlin |
22:41 |
template-formula must stand alone. |
Imran Iqbal |
22:41 |
In your experience, are all of the formulas standalone so far? |
Noel MacLoughlin |
22:42 |
Mostly - but since they evolved separately - tons of duplication. |
Imran Iqbal |
22:42 |
Can you remember any examples of the top of your head, which aren’t? |
Noel MacLoughlin |
22:43 |
There was some formula which depended on vim formula I think - |
Imran Iqbal |
22:44 |
It isn’t a good idea. Not reliable enough over time. |
Noel MacLoughlin |
22:47 |
In my view saltstack-formulas is not bad - much better than ansible galaxy mess - but the lack of consistent patterns causes pain for everyone, reduces quality too. that would be place to start EXCEPT what is the approved template guiding that effort? |
Daniel Wallace |
22:48 |
someone should build a repo frontend for the saltstack-formulas, that allows building new spm packages on tags in the formulas repositories |
Imran Iqbal |
22:48 |
As was discussed above, it makes sense to collect that into |
Noel MacLoughlin |
22:48 |
+1 |
Imran Iqbal |
22:49 |
@noelmcloughlin Have you seen much tagging in the various formula repos? |
Noel MacLoughlin |
22:50 |
tagging of what? |
Imran Iqbal |
22:51 |
I’m assuming releases — fixed points for each formula that can be relied upon when pulling. |
Noel MacLoughlin |
22:51 |
What constitutes a release - thats the problem!! |
Daniel Wallace |
22:52 |
each merged pr would potentially be a release |
Imran Iqbal |
22:52 |
And that’s part of the problem that needs to be resolved. There’s no clear goals set for each formula repo. |
Noel MacLoughlin |
22:52 |
typically a major release container features. point release contains bug fixes. --- as long as release criteria is agreed then tagging is way to go. |
Imran Iqbal |
22:53 |
Each merged PR is an easy way to do it for the time being, for sure. |
Daniel Wallace |
22:53 |
each pr automatically bumps the patch version |
Noel MacLoughlin |
22:53 |
+1 interesting idea. |
Imran Iqbal |
22:54 |
Yes, that makes a lot of sense. |
Noel MacLoughlin |
22:54 |
Could a cross-repo tag work. i.e. salt-formulas 2019.5 |
Daniel Wallace |
22:54 |
then we could finally say whether or not formulas are stable |
Imran Iqbal |
22:55 |
Which makes it easier than having to maintain your own forks. |
Daniel Wallace |
22:55 |
which is why imho formulas are not super useful, cause you don’t know when someone is going to make a major change to them |
Noel MacLoughlin |
22:55 |
@gtmanfred what is alternative to formulas? |
Imran Iqbal |
22:56 |
There’s no reason why this can’t be actioned in the very short term. This doesn’t require any major planning. |
Daniel Wallace |
22:56 |
not formulas? |
Imran Iqbal |
22:56 |
To be specific, move to what instead? |
Daniel Wallace |
22:57 |
template files in the fileroot |
Imran Iqbal |
22:58 |
Yep — and this will require some planning. |
Daniel Wallace |
22:58 |
see https://github.com/saltstack-formulas/systemd-formula/blob/master/TOFS_pattern.md |
Imran Iqbal |
22:58 |
We’ve just got a PR for this in the |
Daniel Wallace |
22:59 |
awesome |
Imran Iqbal |
22:59 |
@gtmanfred Appreciate the feedback, it’s been very useful. |
Noel MacLoughlin |
23:09 |
The reason using pillar data is attractive is because you can model your use case in that same pillar data. The TOFS approach seems interesting - need to look into it. |
Imran Iqbal |
23:11 |
I’m having a think about the tagging across all of the formula repos. I’ve got a few ideas bubbling but I think I’ll collect them alongside these discussions, so that we can make some initial resolutions. |
Noel MacLoughlin |
23:12 |
Be wary of doing thing for the sake of it. needs some thoughts. |
Imran Iqbal |
23:13 |
No, there’s nothing wrong with tagging itself. As long as the semantic versioning is consistent, it will be very useful all round. |
Daniel Wallace |
23:29 |
the problem with using pillar is that rendering pillars for all minions is by far the most expensive thing to do, so to scale you have to figure out what is more worth it to you, the simplicity of pillars or the simplicity of not having to scale horizontally with syndics |
Imran Iqbal |
23:30 |
It’s going to take a while but we’ve started. The TOFS_pattern PR has just been merged into the |