salt-cumin

Cumin

Cumin contains a Python library and CLI scripts for accessing a remote salt-api instance.

cumin abstracts the HTTP calls to salt-api so existing Python projects can easily integrate with a remote Salt installation just by instantiating a class.

The cumin CLI script allows users to execute Salt commands from computers that are external to computers running the salt-master or salt-minion daemons as though they were running Salt locally. The long-term goal is to add additional CLI scripts maintain the same interface as Salt’s own CLI scripts (salt, salt-run, salt-key, etc).

Installation

pip install salt-cumin

Usage

export SALTAPI_USER=saltdev SALTAPI_PASS=saltdev SALTAPI_EAUTH=pam
cumin '*' test.ping
cumin '*' test.kwarg hello=dolly

Examples leveraging the runner client.

cumin-run reactor.list
cumin-run reactor.add event='test/provision/*' reactors='/srv/salt/state/reactor/test-provision.sls'

Configuration

You can configure cumin through the command line, using environment variables or in a configuration file $HOME/.pepperrc with the following syntax :

[main]
SALTAPI_URL=https://localhost:8000/
SALTAPI_USER=saltdev
SALTAPI_PASS=saltdev
SALTAPI_EAUTH=pam
Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested

salt-ext-tidx1

# tidx1 Test Extension 1

DO NOT USE IN SALT

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success

salt-sproxy

Salt plugin for interacting with network devices, without running Minions.

Note

This is NOT a SaltStack product.

This package may eventually be integrated in a future version of the official Salt releases, in this form or slightly different.

Install

Install this package where you would like to manage your devices from. In case you need a specific Salt version, make sure you install it beforehand, otherwise this package will bring the latest Salt version available instead.

The package is distributed via PyPI, under the name salt-sproxy.

Execute:

pip install salt-sproxy

Documentation

The complete documentation is available at https://salt-sproxy.readthedocs.io/en/latest/.

Usage

First off, make sure you have the Salt Pillar Top file correctly defined and the proxy key is available into the Pillar. For more in-depth explanation and examples, check this tutorial from the official SaltStack docs.

Once you have that, you can start using salt-sproxy even without any Proxy Minions or Salt Master running. To check, can start by executing:

$ salt-sproxy -L a,b,c --preview-target
- a
- b
- c

The syntax is very similar to the widely used CLI command salt, however the way it works is completely different under the hood:

salt-sproxy <target> <function> [<arguments>]

Usgae Example:

$ salt-sproxy cr1.thn.lon test.ping
cr1.thn.lon:
    True

One of the most important differences between salt and salt-sproxy is that the former is aware of the devices available, thanks to the fact that the Minions connect to the Master, therefore salt has the list of targets already available. salt-sproxy does not have this, as it doesn’t require the Proxy Minions to be up and connected to the Master. For this reason, you will need to provide it a list of devices, or a Roster file that provides the list of available devices.

The following targeting options are available:

  • -E, --pcre: Instead of using shell globs to evaluate the target servers, use pcre regular expressions.

  • -L, --list: Instead of using shell globs to evaluate the target servers, take a comma or space delimited list of servers.

  • -G, --grain: Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a globexpression: "os:Arch*".

  • -P, --grain-pcre: Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a pcre regular expression: “os:Arch.*”.

  • -N, --nodegroup: Instead of using shell globs to evaluate the target use one of the predefined nodegroups to identify a list of targets.

  • -R, --range: Instead of using shell globs to evaluate the target use a range expression to identify targets. Range expressions look like %cluster.

Warning

Some of the targeting options above may not be available for some Roster modules.

To use a specific Roster, configure the proxy_roster option into your Master config file, e.g.,

proxy_roster: ansible

With the configuration above, salt-sproxy would try to use the ansbile Roster module to compile the Roster file (typically /etc/salt/roster) which is structured as a regular Ansible Inventory file. This inventory should only provide the list of devices.

The Roster can also be specified on the fly, using the -R or --roster options, e.g., salt-sproxy cr1.thn.lon test.ping --roster=flat. In this example, we’d be using the flat Roster module to determine the list of devices matched by a specific target.

When you don’t specify the Roster into the Master config, or from the CLI, you can use salt-sproxy to target on or more devices using the glob or list target types, e.g., salt-sproxy cr1.thn.lon test.ping (glob) or salt-sproxy -L cr1.thn.lon,cr2.thn.lon test.ping (to target a list of devices, cr1.thn.lon and cr2.thn.lon, respectively).

Note that in any case (with or without the Roster), you will need to provide a valid list of Minions.

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested

salt-tidx2-extension

# tidx2 Test Extension 2

DO NOT USE IN SALT

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
success success success success success success success success failure failure success success success success success

spiro-deploy

A deployment tool for [SpiroFS](https://spirostack.com/spirofs/).

[Full documentation](https://spirostack.com/spirofs/deploy/)

spiro-deploy <project> <deployment>, with the environment variables SPIRO_URL and SPIRO_TOKEN.

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested

spiro-network

A variety of network utilities.

This is meant to be installed on minions.

Full docs available [online](https://spirostack.com/spiro-net.html).

On minions, install the spiro-network PyPI package.

A number of things are provided:

Modules

  • ipaddr.external_four, ipaddr.external_six: Queries external services for your IP, useful if the minion is behind a NAT or other complex network

  • ipaddr.four, ipaddr.six: Collates information about a minion’s IP address from several sources.

States

  • hostname.is: Sets the hostname, takes no arguments. (Note: See hostname(1) for information on FQDNs and other hostname variants.)

spiro-network requires no configuration to function.

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested

spirofs

SpiroFS is a fileserver backend for Salt focusing on deployment and saltenv management. It allows automated systems to push deployment bundles to Salt without giving them undue permissions. It is dynamic and does not require on-going reconfiguration as your technology stack grows and changes.

Full documentation is https://saltstack.com/spirofs

Installation

  1. Have pip for the Python that salt is installed into

  2. pip install spirofs (Adapt as necessary)

  3. Configure the salt master (see [docs](https://spirostack.com/spirofs/#configuration))

  4. Restart the salt master

Note: libsodium is used, but is pre-packaged in the binary wheels. If these are not used on your system for whatever reason, install either libsodium-dev (apt) or libsodium-devel (yum).

Salt Version Linux Windows macOS
master 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3001.8 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3002.7 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested
v3003.3 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9 3.5 3.6 3.7 3.8 3.9
not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested not-tested

Last Updated on 2021-09-19