构build分阶段环境的盐状态文件

Salt State Files和Pillarconfiguration应该如何结构化,以便为devqaproduction等分阶段环境以及function分支平滑部署不同的minionangular色?

我已经在我的Python项目源代码的一个单独的存储库中安排了我的根和柱状态文件,如下所示:

salt-states/ pillar/ web/ init.sls production.sls qa.sls dev.sls db/ init.sls production.sls qa.sls dev.sls top.sls roots/ web/ init.sls production.sls qa.sls dev.sls db/ init.sls production.sls qa.sls dev.sls top.sls 

我的top.sls文件应该如何利用这个结构,以及如何以这种方式定位特性分支?

我会build议使用gitfs和git_pillar。

Gitfs允许你把你的file_roots保存在一个git仓库中。 主分支成为您的“基础”环境,每个分支和标签也成为环境。

http://docs.saltstack.com/topics/tutorials/gitfs.html?highlight=gitfs

Git_pillar类似。

http://docs.saltstack.com/ref/pillar/all/salt.pillar.git_pillar.html