Salt binary installation and management tool
Project description
saltenv is a Salt binary installation and management tool, inspired by tfenv
About
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.
What is POP?
This project is built with pop, a Python-based implementation of Plugin Oriented Programming (POP). POP seeks to bring together concepts and wisdom from the history of computing in new ways to solve modern computing problems.
For more information:
Getting Started
Prerequisites
Python 3.7+
git (if installing from source, or contributing to the project)
Installation
If wanting to use saltenv, you can do so by either installing from PyPI or from source.
Install from PyPI
pip install saltenv
Install from source
# clone repo
git clone git@github.com/eitrtechnologies/saltenv.git
cd saltenv
# Setup venv
python3 -m venv .venv --prompt saltenv
source .venv/bin/activate
pip install -e .
Usage
usage: run.py [-h] [--config CONFIG] [--config-template] [--log-datefmt LOG_DATEFMT] [--log-file LOG_FILE] [--log-fmt-console LOG_FMT_CONSOLE]
[--log-fmt-logfile LOG_FMT_LOGFILE] [--log-handler-options [LOG_HANDLER_OPTIONS ...]] [--log-level LOG_LEVEL] [--log-plugin LOG_PLUGIN] [--repo-url REPO_URL]
[--saltenv-dir SALTENV_DIR] [--version]
{init,install,list,list-remote,pin,uninstall,use,version} ...
positional arguments:
{init,install,list,list-remote,pin,uninstall,use,version}
options:
-h, --help show this help message and exit
--config CONFIG, -c CONFIG
Load extra options from a configuration file onto hub.OPT.saltenv
--config-template Output a config template for this command
--repo-url REPO_URL, -r REPO_URL
Salt single binary repository location. Version directories are expected here.
--saltenv-dir SALTENV_DIR, -d SALTENV_DIR
Working directory for saltenv downloads
--version Display version information
Logging Options:
--log-datefmt LOG_DATEFMT
The date format to display in the logs
--log-file LOG_FILE The location of the log file
--log-fmt-console LOG_FMT_CONSOLE
The log formatting used in the console
--log-fmt-logfile LOG_FMT_LOGFILE
The format to be given to log file messages
--log-handler-options [LOG_HANDLER_OPTIONS ...]
kwargs that should be passed to the logging handler used by the log_plugin
--log-level LOG_LEVEL
Set the log level, either quiet, info, warning, debug or error
--log-plugin LOG_PLUGIN
The logging plugin to use
Examples
Basic salt binary setup with version 3004:
# Example CLI commands
# List remote versions
$ saltenv list-remote
3004rc1
3004
3003.3
3003
# Install version 3004
$ saltenv install 3004
Processing tarball...
# Use version 3004
$ saltenv use 3004
# List local versions
$ saltenv list
* 3004 set by /home/nmhughes/.saltenv/version
3003.3
3003
# Initialize the saltenv environment, which will point to the salt binaries
$ saltenv init
Add the saltenv bin directory to your PATH:
echo 'export PATH="$HOME/.saltenv/bin:$PATH"' >> ~/.bashrc
OR:
echo 'export PATH="$HOME/.saltenv/bin:$PATH"' >> ~/.zshrc
$ echo 'export PATH="$HOME/.saltenv/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc
# Kick the tires!
$ salt call test.version
local:
3004
Common Issues
If this error is encountered, you might be running on Arch and need to install the libxcrypt-compat package.
[230732] Error loading Python lib '/tmp/_MEIAEr7dd/libpython3.7m.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory
Roadmap
Reference the open issues for a list of proposed features (and known issues).
Acknowledgements
Img Shields for making repository badges easy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file saltenv-0.2.0.tar.gz
.
File metadata
- Download URL: saltenv-0.2.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8277ddedaff374d0a752303c6205df235bc649ffdc0e4370546a170a03f063 |
|
MD5 | 9a5314b6b80dfd1726216a43b493f2f4 |
|
BLAKE2b-256 | a5563866d0cffe970e87b7d7d7bffa3ce80160568d6211b98dbddff77e1f9c64 |
File details
Details for the file saltenv-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: saltenv-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e82f4668d05dddf6bfa8c3fd5cccdbdc9fcb278e43655626ca9bb3802edd8d |
|
MD5 | c1d0a89aa46a9c0bef024dfce9138f6a |
|
BLAKE2b-256 | 37ca9c3000900733ea78523d0edc2e93dc959d7e668408f600f8c8e8c820eade |