-
Notifications
You must be signed in to change notification settings - Fork 85
[2019 02 11] Log: Ongoing improvements' discussions
UPDATE: This has effectively been processed into the main SaltStack Formulas project.
This is a (temporary) page to capture ongoing 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 |
06:53 |
@Javier Bértoli I didn’t get a chance to respond to this yesterday: "… but will provide a single place to see all’s pending in the formulas, which is a good thing to me" — then this is already available via. the search: |
Imran Iqbal |
07:33 |
@aboe @Javier Bértoli So I’ve updated https://github.com/orgs/saltstack-formulas/projects/1 using all of our discussions so far on both GitHub and Slack. Please feel free to modify/update as you see fit. |
Ryan Walder |
15:29 |
How/where do you manage custom files in a TOFS style formula? |
Imran Iqbal |
15:30 |
+
Daniel Wallace |
Ryan Walder |
15:31 |
Right now the customisation/templating is stored in the pillar which is easy to manage (stick it in git) with TOFS I’m not clear how I manage formulas and the custom configs/overides |
Imran Iqbal |
15:32 |
This is something newly being implemented in the formulas and I personally haven’t had much experience with it. It may be worth pinging Daniel about it, or the PR authors. |
Bradley Hieber |
15:35 |
@ryanwalder generally you would have a file in
then in your file.managed, you use multiple sources, with the default config being at the bottom. |
Ryan Walder |
15:35 |
Yeah but in’t the point of the TOFS method to remove general config from pillar? |
Bradley Hieber |
15:36 |
none of that is in pillar |
Ryan Walder |
15:39 |
Maybe I’m explaining badly. Using the ntp example: |
Bradley Hieber |
15:40 |
fork and add to fork |
Ryan Walder |
15:40 |
Doesn’t this mix config (settings) and code (applying those settings)? |
Bradley Hieber |
15:41 |
infrastructure as code 😉 |
Ryan Walder |
15:41 |
I can see the benefits due to reduced rendering on the master just trying to see how it could be used effectively without having to maintain a fork of every single formula |
Bradley Hieber |
15:42 |
The logical answer is, if you are working on the formula and are going to contribute to it, you will need a fork of it anyway |
Ryan Walder |
15:43 |
Which is fine for people who contribute but not for people who consume formulas |
Imran Iqbal |
15:43 |
https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#adding-a-formula-as-a-gitfs-remote: |
Ryan Walder |
15:44 |
Forking makes sense due to the complete lack of versioning in formulas, forking then modifying makes a lot less sense |
Imran Iqbal |
15:45 |
Do you mean version numbers (release tagging)? If so, that’s something we’re starting to remedy. |
Ryan Walder |
15:45 |
I mean modifying upstream seems like a Bad Idea in any circumstance |
Imran Iqbal |
15:48 |
As I said, I’m not familiar — but what I understand is that custom config is stored in YAML files that can modified as required for your needs. |
Ryan Walder |
15:51 |
Cheers for your help, will take a deeper look when I get home. |
Imran Iqbal |
15:52 |
You’re welcome. |
Shawn Welter |
17:06 |
I have one suggestion for formulas; make them portable in the fiile sturcure. Many assume the formual lives in the root of salt:// Moving the formula to another location is not possible due to paths to map.jinja and defaults.yaml are absolute and not relative to the formula location. Some like the mysql formula have switch to using from tpldir ~ |
Imran Iqbal |
17:26 |
@redundancyd Excellent point. As you’ve noted, some of the formulas have started using that. I’ll add that to the list of tasks that we’re working on to overhaul the formulas in general. |
Max Arnold |
17:31 |
Quite soon it will be possible to use relative Jinja imports: https://github.com/saltstack/salt/pull/47490
This patch supports a more "natural" construct:
Comments 6 saltstack/saltMay 5th, 2018Added by GitHub |
Imran Iqbal |
17:32 |
@redundancyd I just remembered that there is one problem with this,
Which work flawless in sls state file. But fails in template file. On #salt IRC channel I received a recommendation to use 'tpldir' variable instead, but it doesn’t work as well. Setup init.sls
Labels Bug, Core, High Severity, P3 Comments 11 saltstack/saltMay 11th, 2017Added by GitHub @marnold That will be extremely useful. Thanks for the heads-up. |
Imran Iqbal |
5 hours ago |
> Daniel Wallace [Feb 8th at 22:54] |
Daniel Wallace |
5 hours ago |
meh |
Imran Iqbal |
5 hours ago |
SPM works OK with semver? |
Daniel Wallace |
5 hours ago |
i don’t know |
Imran Iqbal |
5 hours ago |
OK, this is something that needs to be tested before finalising the format to apply. Thanks for your replies. |
Wayne Werner |
3 hours ago |
I like date based versions when there’s not a clear API, personally. |
Daniel Wallace |
3 hours ago |
yes, but then you just release with a random date, and no one knows if you broke any backwards compatibility |
Imran Iqbal |
3 hours ago |
@Wayne Werner How can the method be used to differentiate between versions that aren’t backwards-compatible? |
Daniel Wallace |
3 hours ago |
it offers nothing to the user other than how old it is |
Imran Iqbal |
3 hours ago |
Another negative point is that it can be associated with the version of Salt it is "supposed" to work with. |
Daniel Wallace |
3 hours ago |
that should be in the FORMULA file
|
Imran Iqbal |
3 hours ago |
I’m referring to the version number itself. |
Wayne Werner |
3 hours ago |
Well, if you don’t have a clear API, nobody knows if you have any kinds of compatibility anyway :rolling_on_the_floor_laughing: |
Daniel Wallace |
3 hours ago |
@myii if you go with semver, you should def cut a 0 ver release before making the change to semver, so that people that are using them as is don’t have to quick pivot everything to TOFS (edited) |
Imran Iqbal |
3 hours ago |
Sorry, is there a difference between symver and semver, or just a typo? |
Daniel Wallace |
3 hours ago |
typo |
Imran Iqbal |
3 hours ago |
OK, @aboe has started the process using |
Daniel Wallace |
3 hours ago |
awesome |
Imran Iqbal |
3 hours ago |
That would be incredibly helpful and hopefully a motivating factor. Something to rally around, with actual results available immediately. |
Daniel Wallace |
3 hours ago |
yeah |
Imran Iqbal |
3 hours ago |
Still at the stage of initial planning, at the moment. I’ve collected all of the points made so far under https://github.com/orgs/saltstack-formulas/projects/1?fullscreen=true. |
Daniel Wallace |
3 hours ago |
i will see what I can put together |
Imran Iqbal |
3 hours ago |
Need a few more SaltStack Formula members to get involved, to start clearing through the tasks. |
Daniel Wallace |
3 hours ago |
of course |
Imran Iqbal |
3 hours ago |
By the way, what stack would you be proposing to use for the web API/front-end? |
Daniel Wallace |
3 hours ago |
flask + sqlalchemy + postgres |
Wayne Werner |
3 hours ago |
Yeah, if all you need is an API, Flask is pretty great for that. Responder is an interesting new package if you can use Python 3.6+, I think. |
Daniel Wallace |
3 hours ago |
or, i could use the thing that is most used by the world of developers according to the jetbrains survey |
Imran Iqbal |
3 hours ago |
OK, I haven’t used flask and sqlalchemy but not too far removed from Django’s ORM as far as I’m aware… oh. |
Daniel Wallace |
3 hours ago |
It is pretty easy, and would be very fast to template and get started with flask, to just have a poc to build and do the basics |
Imran Iqbal |
3 hours ago |
OK, sounds good. |
Wayne Werner |
3 hours ago |
Not much more than that to get started 👍 |
Daniel Wallace |
3 hours ago |
The biggest thing I am going to have to do is pick apart how spm builds the manifest, cause i am going to use the s3 api to pull down the file list, and build it remotely without access to the files. |
Imran Iqbal |
2 hours ago |
Are there any examples of these manifests? |
Daniel Wallace |
2 hours ago |
yeah, just use |
Imran Iqbal |
1 hour ago |
Thanks, I’ll have a look at that and |