Test the connection and deploy your code
Make sure Code Manager can connect to your control repository, make a test deployment to a single environment,and then deploy code to all environments.
- To test the connection to the control repo, run:
puppet-code deploy --dry-runIf the control repo is set up properly, this command fetches and displays a list of environments in the control repo as well as the total number of environments.
If an environment is not set up properly or causes an error, it does not appear in the returned list. Check the Puppet Server log for details about the errors.
- If the control repo connection works, test Code Manager by deploying a single environment. From the command line, run:
puppet-code deploy my_test_environment --waitThe
--waitflag returns results after the deployment is finished.If Code Manager is configured correctly, this command deploys the test environment and returns deployment results with the SHA (a checksum for the content stored) for the control repo commit.
If the deployment does not work, review the Code Manager configuration steps or refer to Troubleshooting for help.
- After enabling and testing Code Manager, you can
trigger Code Manager to deploy all environments. SSH
into your primary server and run:
puppet-code deploy --all --waitYou can also use
puppet-code deploy <ENVIRONMENT> --waitto deploy a specific environment.
After making changes to your Puppetfile, such as adding a new module or creating a repo, you must deploy your code so Code Manager can recognize and start managing the content. You can trigger deployments from the command line, webhooks, or custom scripts.






