Mac环境变量管理器
evm-fm-python的Python项目详细描述
evm fm python
Mac环境变量管理器,用Python编写
注:该项目仍处于alpha开发阶段
目标
本项目是一个用于Mac的配置管理工具,旨在保持本地环境变量文件与外部密钥/密钥管理系统中存储的值保持最新。在
支持的秘密/密钥管理系统
- AWS参数存储
概述
此项目利用Mac操作系统上的launchd守护进程来持续监视外部机密/密钥管理系统,以保持本地环境变量文件的最新状态。这个项目允许用户创建/加载/卸载一个launchd LaunchAgent来完成这个任务。您只需提供一个配置文件并指定一个操作,evm-fm-python
负责其余的操作。在
基本用途
可用操作:
- 创建
此操作将创建启动代理
$ evm-fm --config-file <path_to_configuration_file>
在 - 装载 此操作将创建、加载和启动LaunchAgent ^{pr2}$ 在
- 卸载
此操作卸载并停止启动代理
$ evm-fm --config-file <path_to_configuration_file> --unload
在
参数
Command Line | Metadata | Required | Description |
---|---|---|---|
-f, --config-file | file path | True | Location of configuration file |
-l, --load | False | Whether the LaunchAgent should be loaded | |
-u, --unload | False | Whether the evm LaunchAgent should be unloaded |
配置文件
此文件包含evm-fm-python
执行可用操作所需的所有配置。配置文件可以位于evm-fm-python
项目可以访问的任何位置。在
注意:配置文件需要成为.toml
文件。有关此文件类型的其他信息,请参见https://github.com/toml-lang/toml
示例配置文件
env_file_path = "/Users/user/example/envs/.env"
param_store_prefixes = ["/Development/Test/", "/Production/Test/"]
launchd_python_path = "/Users/user/.virtualenvs/example/bin/python"
config_file_loc = '/Users/user/example/configuration_file.toml'
launchd_std_out_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_std_err_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_start_interval = 340
[[post_commands]]
command = "source /Users/user/example/envs/.env"
shell = true
- 项目
标签: