Add an environment
Create new environments by creating branches based on your control repo's production
branch.
Before you begin: You must have:
- A control repository.
- A Puppetfile in your control repo's
production
branch. - Configured Code Manager or r10k.
- Selected a code management deployment method (either the
puppet-code
command or a webhook).
If you have multiple control repos, you can't repeat branch names
unless you use a source prefix. Go to Configuring sources
for more information.
- In your control repo, create a new branch based on the
production
branch:git branch <NEW_BRANCH_NAME>
- Check out the new branch:
git checkout <NEW_BRANCH_NAME>
- Edit the Puppetfile to track the necessary modules and data for your new environment, and then save your changes.
- Commit your changes:
git commit -m "prepare Puppetfile for new environment"
- Push your changes:
git push origin <NEW_BRANCH_NAME>
- Deploy your environments as you normally would, either on the command line or with a webhook.
Results
Code management detects the new environment in your control repo and begins managing it, as explained in How the control repository works.
Code management detects the new environment in your control repo and begins managing it, as explained in How the control repository works.