This repo contains some artifacts to show off some basic saltenv functionality. This example uses works with some basic dotfiles for vim and kubectl, but could certainly be changed/extended for more robust use cases.
saltenv is a Salt binary installation and management tool, inspired by tfenv
saltenv allows users to easily install multiple salt binaries built with tiamat. This is useful for standalone machine (desktop/laptop) configuration where the full Salt installation isn't warranted or necessary.
saltenv is built as a POP application, which allows it to leverage other POP plugins in the ecosystem or plug into other applications as necessary.
- Python 3.7+
- A Linux system (or the code can be tweaked for multi-platform support)
- Create a virtual environment (optional)
python3 -m venv saltenv
source saltenv/bin/activate
- Install
saltenv
pip install saltenv
- Initialize the
saltenv
environment, which installs asalt
wrapper script and a helpful minion configuration for standalonesalt call
use
saltenv init
- Install the Salt binary for version 3004
saltenv install 3004
- "Use" the 3004 binary, which points the
salt
wrapper script at the downloaded binary
saltenv use 3004
- Ensure the wrapper script can be used (follow PATH procedures for your shell)
echo 'export PATH="$HOME/.saltenv/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
- Run a quick test! This should return version 3004
salt call test.version
NOTE: This procedure will overwrite your .vimrc
file if present. Be sure
to back it up prior to running this command, or you'll need to retrieve it from
the minion cache location in ~/.saltenv
- Clone the demo repository
git clone https://github.com/eitrtechnologies/saltenv-demo.git
cd saltenv-demo
- Run a highstate
salt call state.apply
- Celebrate!
More information on how this works is on the EITR Technologies Blog