Under the hood, Code Manager uses r10k and the file sync service to stage, commit, and sync your code, automatically managing your environments and modules.
First, you'll create a control repository with branches for each environment that you want to create (such as production, development, or testing). You'll also create a Puppetfile for each of your environments, specifying exactly which modules to install in each environment. This allows Code Manager to create directory environments, based on the branches you've set up.
When you push code to your control repo, you'll trigger Code Manager to pull that new code into a staging code directory (
/etc/puppetlabs/code-staging). File sync then picks up those changes, pauses Puppet Server to avoid conflicts, and then syncs the new code to the live code directories on your masters.
For more information about using environments in Puppet, see About Environments.