You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a collection of ideas initially taken from the log of discussions[1][2][3][4] captured in the wiki.
Visibility
Make this template-formula a sticky formula for the whole SaltStack Formulas project.
Probably best to wait until most of these changes have been made, to prevent premature use of the template.
Release tagging (for each merged PR)
Apply semantic versioning to this formula -- @aboe76.
Prepare bump:... labels to use when evaluating the extent of change each PR will have on the formula. Helps when bumping version numbers for releases.
bump:major
bump:minor
bump:patch
Note: If this works well, there are methods available to sync labels across all of the repos, such as this search or using the same keywords in a search engine.
Add a macros.jinja template with common macros that "Any formulae would find useful":
Repeatable patterns deserve repeatable code.
Evaluate whether the 'masterless' extra_yamls approach outlined by @javierbertoli is another approach to solve scalability issues (awaiting sample PR).
Decide a consistent method to work with jinja_lstrip_blocks and more specfically jinja_trim_blocks until the upstream issue is resolved.
Prefer {%- ... %} as a standard due to linked issues raised in this comment.
Consider tracking "custom" grain values to the map to cover for situations when the actual grain
is unavailable, such as osmajorrelease and osfinger on Arch Linux.
Discuss the use of yaml_dump.sls (via. ssf-formula) in all formulas so that changes to the map before and after can easily be picked up in the CI logs.
Ensure entry in .gitignore to prevent assets being committed (also need the proper solution for these).
Collect reference links to all of the existing documentation sites out there, for gaining insights in how to perform org-wide configurations for ourselves (inc. Fedora, couchbase, ...)
Use the template-formula wiki the central location for planning/organisation/reference.
Idea: @javierbertoli explaining a method that can be used for managing numerous formulas, when formulas are lacking version numbers (near top of 2019-02-12 log of discussions).
Document how to contribute to the RTD-based documentation (e.g. template for new pages).
Document how to create a formula from this template one, inside this repository or/and in saltstack docs -- @daks looking into this.
Document how to apply all of the changes made to this formula to existing formulas.
Document best practices for testing locally during development; current useful examples to build upon:
Work through this list, closing (and even reverting?) the PRs for the formula-test-harness, since it only has 1 contributor and is no longer maintained.
Consider merging (locale-specific) provision_command for each platform, as used in the systemd-formula -- only if actually useful, not just for the sake of it.
Need to determine the right processes for ensuring formulas work for all officially supported versions of Salt, while also clearing out redundant content for version that are no longer within the support lifecyle.
This also includes updating/removing for supported/unsupported platforms as well.
This issue is a collection of ideas initially taken from the log of discussions[1][2][3][4] captured in the wiki.
Visibility
template-formulaa sticky formula for the whole SaltStack Formulas project.Release tagging (for each merged PR)
bump:...labels to use when evaluating the extent of change each PR will have on the formula. Helps when bumping version numbers for releases.bump:majorbump:minorbump:patchCHANGELOGto use the format proposed by https://keepachangelog.com/en/1.0.0/:django-formularepo.AUTHORSfile, with the primary purpose of identifying the key maintainers of the repo.salt-formularepo.semantic-releasefor this formula, including updating the changelog and updating theFORMULAfile -- feat(semantic-release): configure for this formula #35.commitlintto warn when commit messages aren't appropriate for bumping the version number -- ci(travis): includecommitlintstage #41.semantic-release#42.markdown-tocdirectly to update inline #43..mdwith.rstand add to RTD #69.semantic-release(keeping this list in chronological order for the most part):vault-formulacollectd-formulanginx-formulacert-formulachrony-formularkhunter-formulapostgres-formula-- specific commitkeepalived-formulasystemd-formulaufw-formulasalt-formulafail2ban-formulabind-formulasyslog-ng-formulaapt-formulalocale-formulasudoers-formulapostfix-formulaiptables-formulagolang-formula-- with follow-uplogrotate-formulaphp-formula-- with follow-updeepsea-formulamysql-formulalibvirt-formulaopenvpn-formulasysstat-formuladhcpd-formulapackages-formulaprometheus-formulagrafana-formulapre-commit_semantic-release.shcould check for the existence of thedocsdir.semantic-release(and/or the TOFS pattern?) can be used to mitigate the use offormula:ngstates:php-formula:v1.0.0php-formula#185semantic-releaserun php-formula#187YAML & Jinja
map.jinjastyle -- update formula with map.jinja and style guide references, improve REA… #20.map.jinjastyle due todefaults.mergevs.salt-ssh-- Upstream bug report: 'defaults.merge' is not available when usingsalt-sshsaltstack/salt#51605.map.jinjastyle for the time being -- map.jinja: use grains.filter_by instead of defaults.merge #25.map.jinjaand add more OSes #23.map.jinjaaccordingly.oscodename-- e.g.postgres-formula.osfinger-- e.g.apache-formula-- map.jinja: use grains.filter_by instead of defaults.merge #25.macros.jinjatemplate with common macros that "Any formulae would find useful":extra_yamlsapproach outlined by @javierbertoli is another approach to solve scalability issues (awaiting sample PR).jinja_lstrip_blocksand more specficallyjinja_trim_blocksuntil the upstream issue is resolved.~for string concatenation instead of+.| jsoninstead of| tojson, at least until2017.7support is required -- refer back to this comment.2018.3.3: saltstack/salt@1499c6a| jsonand| tojson, so| yamlmay be preferable (at least in certain situations), see:{%- ... %}as a standard due to linked issues raised in this comment.is unavailable, such as
osmajorreleaseandosfingeron Arch Linux.map.jinja:{%- do template.update({'osmajorrelease': salt['grains.get']('osmajorrelease', 0)|int }) %}comp_lzo:-- insist on explicit values at all times by modifying ouryamllintconfigurations based on https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_values?yaml_dump.sls(via.ssf-formula) in all formulas so that changes to the map before and after can easily be picked up in the CI logs.TOFS pattern vs. pillar
files_switch) -- Feature/template override and files switch #19.source_filesinstead offilesin the pillar (otherwise there are twofiles, which will cause confusion) -- fix(tofs): usesource_filesinstead offiles#76.libtofs.jinjainstead ofmacros.jinja, to work towards the simplest drop-in solution for other formulas -- refactor(tofs): move “files_switch” macro to “libtofs.jinja” #79.Other pillar-avoidance methods to consider
pillar.gettoconfig.getglobally (as in, for all formulas eventually).Make the formula portable
tpldirnot working in template files, see Can't use tpldir or slspath in template file saltstack/salt#41195.tplrootthroughout the formula and then changing the root directory to ensure the whole formula is using the new namespace.Documentation
docssub-directory..keepto push directory structure to Git..gitignoreto preventassetsbeing committed (also need the proper solution for these).template-formulawiki the central location for planning/organisation/reference.tmux-formulapostgres-formulaformula:ngtoformula-- see fix: prevent running of states deprecated inv1.0.0nginx-formula#236.Tests and CI
kitchen-ciandinspec(ortestinfra) examples for the basic tasks (add/remove package, check service, etc) -- want to replace oldserverspectests -- Add a testing scaffold withkitchen-ci,inspecandtravissupport #34.inspec.Gossandsaltcheckalso mentioned -- perhaps alongside for the latter?saltscaffold.Compare this with the formula-test-harness introduced to thenginx-formulain this pull.opensusenot working -- ci(kitchen): usesalt-minionversion ofopensuseto ensure tests run #45.opensuseusually works the second time its run), evaluate ways of minimising these delays:travis_retry.matrix: allow_failures: - os: opensuse-leap.salt-minionversion ofopensuseto ensure tests run #45 -- restarts no longer required.cleanstages -- @javierbertoli looking into this.source_filesinstead offiles#76.Gemfile, to avoid test failures -- fix(travis): use version numbers in Gemfile to prevent failed builds #81.provision_commandfor each platform, as used in thesystemd-formula-- only if actually useful, not just for the sake of it..kitchen.yml=>kitchen.yml-- done in refactor(kitchen): preferkitchen.ymlto.kitchen.yml#40.pillars-from-files=>pillars_from_files-- done in refactor(kitchen):pillars-from-files=>pillars_from_files#74.States
template-formulato not be too focussed onpkg:pkg/install.sls,pkg/clean.sls,repo/install.sls,repo/clean.sls, etc.Repo standards
developbranch to allow PRs with the very latest changes, that can be merged back intomasterat the appropriate times.template-formulaas the go-to resource for all formula development #21 (comment).usergroup) users-formula#198.Other resources to evaluate for inclusion