跳转到主要内容

Salt二进制安装和管理工具

项目描述

Made with pop, a Python implementation of Plugin Oriented Programming Made with Python

saltenv是一个受tfenv启发的Salt二进制安装和管理工具

关于

saltenv允许用户轻松安装由tiamat构建的多个salt二进制文件。这对于不需要完整Salt安装的独立机器(桌面/笔记本电脑)配置非常有用。

saltenv构建为一个POP应用程序,这使得它可以利用生态系统中其他POP插件或根据需要插入其他应用程序。

什么是POP?

本项目使用pop构建,pop是基于Python的插件面向编程(POP)的实现。POP试图以新的方式结合计算机历史中的概念和智慧来解决现代计算机问题。

更多信息

入门

先决条件

  • Python 3.7+

  • git (如果从源代码安装,或为项目做贡献)

安装

如果您想使用saltenv,您可以通过从PyPI或源代码安装。

从PyPI安装

pip install saltenv

从源代码安装

# 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: 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

示例

使用版本3004的基本salt二进制设置

# 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

常见问题

  • 如果遇到此错误,您可能正在运行Arch并需要安装libxcrypt-compat包。

[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

路线图

参考开放问题以获取建议功能(以及已知问题)列表。

致谢

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分布

saltenv-0.2.0.tar.gz (15.0 kB 查看散列值)

上传

构建分布

saltenv-0.2.0-py3-none-any.whl (14.0 kB 查看散列值)

上传 Python 3

由以下机构支持