title: Repository structure for a saltstack project
body: <p>I'm starting on a new project and I'd like to use <code>SaltStack</code> for managing a large deployment spanning several datacenters. Everything runs on Linux. I had previous experience with <code>Chef</code> but I relatively new to <code>SaltStack</code>. My goal is to keep the entire project in a single git repository and make SaltStack to pull configurations from this repository and apply it to minions. It seems that SaltStack have no notion of versioning but serving content from different branches in the repository would work even better. So, I was thinking to create a git repository of the following structure:</p>
  
  <pre><code>salt -+- config (for salt-master config files)
        +- states
        +- pillars
        +- reactors
        +- formulas
  </code></pre>
  
  <p>and use different branches for <code>dev</code>,  <code>qa</code> and <code>prod</code> environments. I also would like to use <code>pillars</code> for providing datacenter specific configuration and I was thinking to use <code>GitFS</code> to glue everything together.</p>
  
  <p>However, there are those pesky <code>top.sls</code> files that handled in a very peculiar way, do not fit in this picture and eventually break this concept.</p>
  
  <p>There also configuration files that I'd like to keep in this repository but I have no better idea for now other then manually copy or symlink them to under <code>/etc/salt</code> from the <code>config</code> directory.</p>
  
  <p>I went through documentation several times and did some experimentation in a simulation environment but I couldn't come up with any sensible project layout yet, so I'm reaching to the stackoverflow community.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Could anybody share a repository structure and configuration they successfully used for managing a similar environment?</li>
  <li>Have anybody figured out a good way for maintaining configuration files?</li>
  </ol>