Skip to content

[2019 02 10] Log: Ongoing improvements' discussions

Imran Iqbal edited this page Feb 11, 2019 · 2 revisions

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.


Slack

Person Time Message

Javier Bértoli

22:07

I kept the issues rised by @gtmanfred in my mind and got to an idea which I haven’t completely thought through, but I’ll mention it here to see if you guys can find a use for it.

Basically, the point of scalability can be somehow solved/mitigated with a 'masterless' approach, which currently rely heavily on pillars, as @gtmanfred mentions.

So, how about adding a parameter in defaults.yaml to 'alter the parsing in map.jinja parsing. Say, (pseudocode follows) ie

extra_yamls:
  - local1.yaml
  - local2.yaml
  - some/other/local.yaml

and then, in map.jinja something like

...
all the usual code
{% if extra_yamls is defined %}
{% do salt['defaults.merge'](........) %}
(edited)
this would allow a formulas' user to define extra yamls with values IN the formula space, without doing pillar rendering, and allowing the scalability @gtmanfred mentions? Does it make any sense? As I see it, it would be useful for masterless use of the formulas, right? (edited)
wdyt?

Imran Iqbal

22:12

I would get a better understanding of this with an actual example that can be tested. Something we can test in a WIP PR in template-formula? (edited)

Niels Abspoel

22:13

@myii I think a better formula would be something simple like the nano-formula

Imran Iqbal

22:14

BTW, I’ve almost finished summarising the log from the wiki page. A lot easier to discuss how to proceed.

Niels Abspoel

22:14

if something going to get messed up I rather have it with nano then with anything usefull.

Imran Iqbal

22:14

But the template-formula isn’t used for anything yet, right?

Niels Abspoel

22:14

@myii but it doesn’t do anything to test…​

Imran Iqbal

22:15

But we’ve spoken about improving it so that it does.

Niels Abspoel

22:16

@myii I’m talking about actually running the formula with a master and a minion to see that, the template-formula has a pkg template which doesn’t exist…​

Javier Bértoli

22:17

@myii I’ll try to push a PR to make that idea clearer.
other thing I was thinking about, is about writing 'formula components' that can be reused in a formula, say a 'service-template', 'pkg-template', 'ini-config-template', 'yaml-config-template', so you can pick these parts and add them together in a formula. But that sounded to me like re-writing states 😛

Imran Iqbal

22:18

@Javier Bértoli That makes sense, so that the template-formula becomes a go-to place for all of these kinds of processes. What @noelmcloughlin mentioned above also resembles this.

Javier Bértoli

22:18

@aboe we can add some kitchen.yml and testing scaffold to the template-formula, add it a pillar.example and see that it all run

Niels Abspoel

22:18

@Javier Bértoli that’s a good idea
and I like the scaffolding part of 'service-template' 'pkg-template' etc.

Imran Iqbal

22:19

@aboe Now this is an opportunity to actually make the template-formula actually do something, that can then be used for testing. Then we can apply all types of quality assurance to the template, so that it doesn’t contain problems that others use in the formulas they write.

Javier Bértoli

22:19

If you’re OK, I’ll try to push a simple testing scaffolding to the template-formula tomorrow in the morning, to start with.

Niels Abspoel

22:20

can the https://github.com/saltstack-formulas/template-formula/pull/20 be merged first? (edited)
aboe76
#20 update formula with map.jinja and style guide references, improve REA…
Update map.jinja with better merging.
Update README for style guide references
Updated VERSION and CHANGELOG file
Labels
enhancement
saltstack-formulas/template-formulaYesterday at 21:50Added by GitHub

Imran Iqbal

22:21

@Javier Bértoli Sounds great.

Niels Abspoel

22:21

with the template-formula we can also activate the project part of github

Imran Iqbal

22:21

BTW, direct pushing to all of the formula repos has been disabled, right? Meaning, do all changes have to be merged via. PR?

Niels Abspoel

22:22

uh @myii I will say yes, 😉

Imran Iqbal

22:22

@aboe Yes, please. Much better for organisation.

Niels Abspoel

22:26

https://github.com/saltstack-formulas/template-formula/projects/1
done

Imran Iqbal

22:27

Fantastic, I might just summarise the notes into the project instead and then you guys can fix what I put up there!

Niels Abspoel

22:27

perfect
isn’t it better to move the project up to saltstack-formulas..?
https://github.com/orgs/saltstack-formulas/projects
I think this is a better place

Imran Iqbal

22:30

Will this end up collecting all of the issues from across all of the repos?!

Javier Bértoli

22:30

agreed

Imran Iqbal

22:30

If so, that will become very difficult to manage.
But try it out and see what gets pulled in automatically.

Niels Abspoel

22:31

as far as I can see nothing is automated we can pull in issues our selfs

Javier Bértoli

22:31

I think it will collect all the issues, but will provide a single place to see all’s pending in the formulas, which is a good thing to me

Imran Iqbal

22:31

Definitely try it out, it would be interesting to see what comes out the other end…​

Niels Abspoel

22:31

try the right + add cards and you can see all issues in the formulas…​.but none are added automatically.

Imran Iqbal

22:35

Did you create the project at the top level?

Niels Abspoel

22:35

yes
https://github.com/orgs/saltstack-formulas/projects/1

Imran Iqbal

22:35

Shall I put the tasks there instead?

Niels Abspoel

22:36

Yes but you can also create a issue under the template-formula and pull it onto the project board.

Imran Iqbal

22:36

OK, thanks for that.

Niels Abspoel

22:36

the other cards are there for learning…​

Javier Bértoli

22:37

I’ll merge #20, OK?

Niels Abspoel

22:37

perfect

Javier Bértoli

22:38

done

Imran Iqbal

22:38

@Javier Bértoli Please remember to add the release tag as well!
v0.1.1.

Javier Bértoli

22:38

is there a place to add it in the ui, or jut by cli? (I’l ve never tagged by ui in GH)

Imran Iqbal

22:39

Yes, just a minute…​

Niels Abspoel

22:39

done

Imran Iqbal

22:39

Excellent, can you mention the navigation for next time?

Javier Bértoli

22:40

just googled, https://stackoverflow.com/questions/18216991/create-a-tag-in-a-github-repository
Stack Overflow
Create a tag in a GitHub repository
I have a repository in GitHub and I need to tag it. I tagged in a shell, but on GitHub it is not showing up. Do I have to do anything else? The command I used in the shell is: git tag 2.0 And no…​
😄

Niels Abspoel

22:40

just do it by cli, just add a upstream remote to your forked clone and git push upstream --tags

Imran Iqbal

22:40

Both ways are good.

Niels Abspoel

22:40

tags won’t get merged with a PR. sadly