骗局。
con-fu的Python项目详细描述
使用这些基础结构工具的帮助程序:
开发
$ git clone git@github.com:bninja/confu.git $ cd confu $ mkvirtualenv confu (confu)$ pip install -e .[tests](confu)$ py.test tests/ --cov=confu
安装
$ pip install con-fu
设置
从这些ini文件中读取并合并:
- ~/.confu.cfg
- .confu.cfg
这些环境变量:
- CONFU_PROFILE
- CONFU_REGION
- CONFU_LOG
看看它们是什么:
$ confu cfg {"atlas": {"source_dir": "infras/global/atlas"}, "aws": {"default_region": "us-west-1", "regions": ["us-west-1"]}, "cfn": {"bucket_format": "{profile}-confu-cfn-{region}", "bucket_key": "vault", "parameters": {"ConfName": "infra-vault", "ConfSource": "{profile}-confu-pkg", "InfraSilo": "vault", "KeyName": "ai-gazelle", "LogArchiveBucket": "{profile}-confu-log"}, "stack_name_format": "{Prefix}-{AppEnv}-{random}", "stack_tags": {"infra-silo": "vault"}}, "pkg": {"bucket_format": "{profile}-{region}-confu-pkg", "default_includes": ["group_vars/", "host_vars/", "roles/", "/ansible.cfg", "!*/ansible.cfg", "*.yml", "!.project", "!*.git", "!*.pyc", "!*.pyo", "!*.git*", "!*.travis.yml", "!*.md", "!Vagrantfile", "!*/test/", "!test.yml"], "includes": ["infras/", "!infras/global/mq.yml", "!infras/global/site.yml", "!infras/global/.confu.cfg", "!infras/global/inventories/", "!infras/global/formations/", "!infras/global/roles/", "inventories/", "ops/"], "name": "{source.dir_name}", "source_dir": "./", "stage_dir": "/tmp/confu/{package.name}-{package.version}", "version": "{source.git_version}"}, "profile": "julius", "region": "us-west-1"}
外壳
源代码完成和功能,如:
$ source <(confu shell env; confu shell complete)
或用于所有外壳,如:
$ (confu shell env; confu shell complete) > ~/confu.sh $ cat >> ~/.bashrc <<EOF . ~/confu.sh EOF
混淆
用于管理confu环境的shell函数,这些环境变量:
- CONFU_PROFILE
- CONFU_REGION
- CONFU_LOG
像这样:
$ confue CONFUE_NAME=CONFU_PROFILE=CONFU_REGION=CONFU_LOG= $ confue jj-us-w1 $ confue -p julius -r us-west-1 -l i $ confue CONFUE_NAME=jj-us-w1 CONFU_PROFILE=julius CONFU_REGION=us-west-1 CONFU_LOG=i $ confue off $ confue CONFUE_NAME=CONFU_PROFILE=CONFU_REGION=CONFU_LOG= $ confue ls jj-us-w1