saltscaffold
This python module creates a new directory structure for salt formulas
with the following features:
- README.md with sample content
- state files that mimic the package / file / service pattern.
- .kitchen.yml with content to drive test-kitchen
- .kitchen-ci.yml with content to drive test-kitchen with alternate
settings
- custom-pillar content to show pillar overrides
- defaults.yml content with default values
- map.jinja show how to have grains based overrides and merge defaults
with custom pillars
- example of toggle feature
- The resulting formula will be testable with test-kitchen
- serverspec test to used with kitchen verify
- Gemfile added so one can 'bundle install' inside the formula
directory to get the necessary ruby gems
Folder and File Structure
-------------------------
Each salt formula that you scaffold will create the following folder
structure:
``[formula_name]/ [formula_name]/README.md [formula_name]/pillar-custom.sls [formula_name]/Gemfile [formula_name]/.kitchen.yml [formula_name]/.kitchen-ci.yml [formula_name]/LICENSE.txt [formula_name]/[formula_name] [formula_name]/[formula_name]/defaults.yaml [formula_name]/[formula_name]/map.jinja [formula_name]/[formula_name]/init.sls [formula_name]/[formula_name]/install.sls [formula_name]/[formula_name]/config.sls [formula_name]/[formula_name]/service.sls [formula_name]/[formula_name]/files/ [formula_name]/[formula_name]/files/config.conf [formula_name]/test/integration/default/serverspec/_spec.rb [formula_name]/test/mockup/init.sls``
It's expected you'll modify and rename these as you need.
Installing saltscaffold
-----------------------
You can view the source code on the `Github Project
Page <https://github.com/cmarzullo/saltscaffold>`_
Install from source
~~~~~~~~~~~~~~~~~~~
1. clone the repo
``git clone https://github.com/cmarzullo/saltscaffold``
2. make the packages ``cd saltscaffold && python setup.py sdist``
3. install the package
``sudo pip install dist/Saltscaffold-<version>.tar.gz``
Running saltscaffold
--------------------
The module gets installed as an executable python script. There aren't
many options. You can only choose the name of the formula and an
optional directory to create the formula in.
``saltscaffold -p myformula [-d {base directory} ]``
If you don't supply a base directory the formula will be created in your
current directory.
Contribution
------------
Pull requests are welcome!
Templating
~~~~~~~~~~
It's kinda wierd to have to write jinja looking files with jinja. So I
switched to the mako templating engine.
Running Tests
~~~~~~~~~~~~~
There are tests written. Make sure they pass. You can run tests using
``nosetests -v`` There's no test for it, but make sure you can do a
``kitchen verify`` with the output.
.. |Build
Status| image:: https://travis-ci.org/cmarzullo/saltscaffold.svg?branch=master
Metadata
Release files for Saltscaffold 3.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Saltscaffold-3.0.5.tar.gz | 34.6 kB | Without provenance | Details for Saltscaffold-3.0.5.tar.gz |
Release files / Saltscaffold-3.0.5.tar.gz
| Download URL | Saltscaffold-3.0.5.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13c49ed953848c9c4eca755e09a3e913864601993407bf4550749b54a734c756
|
|
BLAKE2b-256 checksum How to use checksums |
e8935ad5965498ccc1e2852f8c402b8ebc0d8fe764d965ebb18bab9d30c046e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Saltscaffold 3.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.