Skip to main content

Savory

About

Savory is a cli tool for managing saltstack git repositories

Commandline

Usage: savory [OPTIONS]

Options:
  -f, --file TEXT         repository file
  -r, --repo TEXT         repository file repo
  -t, --tag TEXT          repository file tag
  -d, --destination TEXT  repository file destination
  --help                  Show this message and exit.

fetch reposities from a local repository file:

savory --file localfile.yml

fetch reposities from a repository file in a git repo:

savory --file repofile_in_repo.yml \
       --repo git@gitserver:saltstack/savory.git \
       --tag master \
       --destination /tmp

Repository file example

defaults:
  destination: /srv/salt
  type: formula

repositories:
  - formula1
  - formula2
  - formula3
  - pillar_data

formula1:
  repo: git@gitserver:saltstack/formula1.git
  tag: 1.0.0

formula2:
  repo: git@gitserver:saltstack/formula2.git
  tag: 1.0.1

formula3:
  repo: git@gitserver:saltstack/formula3.git
  tag: 1.0.3

pillar_data:
  repo: git@gitserver:saltstack/pillar_data.git
  tag: prod
  destination: /srv/pillar
  type: pillar

In the above example formula1, formula2 and formula3 are using git tags (recommended for formulas) and a branch for the pillar_data repo.

Install

  • install savory

    pip3 install savory
  • create a new git user and make sure that this user has quest permissions to all repositories that you want to manage with savory

  • create a new keypair and place the keys in .ssh

    [root@salt-master ~]# ssh-keygen -t ed25519
    Generating public/private ed25519 key pair.
    Enter file in which to save the key (/root/.ssh/id_ed25519): /root/.ssh/gitlab
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /root/.ssh/gitlab.
    Your public key has been saved in /root/.ssh/gitlab.pub.
    The key fingerprint is:
    SHA256:abcdefghijklmnopqrstuvwABCDEFGHIJKLMNOP+RST root@salt-master
    The key's randomart image is:
    +--[ED25519 256]--+
    |  BX^.+.   . o ..|
    |..o^.@ ..o. . o. |
    |+++.%   +.      .|
    |o=.o .   .    .. |
    |o..     S    . E.|
    |.             . .|
    |             . . |
    |              o  |
    |             .   |
    +----[SHA256]-----+
  • adjust the gitlab user in gitlab and add the public key generated in the previous step to this user

  • copy the systemd files from https://gitlab.com/solvinity/savory/-/tree/main/systemd and place them in /etc/systemd/system

  • enable savory.timer by running

    systemctl enable savory.timer
  • verify in journalctl if the repositories are cloned to the configured location specified in the repository file.

To-do

Implement cleanup/delete of unused repositories

Changelog

0.1.4 (2021-12-17) - add exit code on failure

0.1.3 (2021-08-12)

  • changed wrong url in setup.py

0.1.2 (2021-08-12)

0.1.0 (2021-08-12) initial release

Metadata

Release files for savory 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for savory 0.1.4
File Size Uploaded Provenance Actions
savory-0.1.4.tar.gz 5.3 kB Without provenance Details for savory-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for savory 0.1.4
File Interpreter ABI Platform Actions
savory-0.1.4-py3-none-any.whl Python 3 none any Details for savory-0.1.4-py3-none-any.whl

Total release size: 10.9 kB

Release files / savory-0.1.4.tar.gz

Download URL savory-0.1.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
24de3f679ad832a2cf926fe06fbb5609da1cc9247a549f2d1dac91718c33c581
BLAKE2b-256 checksum
How to use checksums
d6f5effc35688dd01c6733abed1311933e4123801df4266c137c6291a6564683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / savory-0.1.4-py3-none-any.whl

Download URL savory-0.1.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e1668040ef3d241dff031e0d102f530e0060443dbfe51db8efbc47b9610cae5
BLAKE2b-256 checksum
How to use checksums
55053cb3b2023418f6215affed59b651605b8de030b3583a4e95ca7e9efae19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for savory 0.1.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page