Last active
March 21, 2022 22:48
-
-
Save Magisus/535b4954c236d910028e29ec3f428329 to your computer and use it in GitHub Desktop.
Enable Code Manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to enable Code Manager on a VMPooler node | |
1. Install PE | |
2. Generate an SSH key to use with Github and add it to your Github | |
3. Control repo: https://github.com/Magisus/control-repo -> [email protected]:Magisus/control-repo.git | |
4. Set params of puppet_enterprise::profile::master: | |
- code_manager_auto_configure: true | |
- r10k_remote: [email protected]:Magisus/control-repo.git | |
- r10k_private_key: point at key created above, e.g. "/etc/puppetlabs/puppetserver/ssh/id_rsa-control" | |
5. Run puppet agent | |
6. Run `puppet access login --lifetime 12h` to generate an RBAC token for use with `puppet code` | |
7. Run `puppet code deploy --all --wait` to test setup | |
API: | |
curl -k -X POST -H 'Content-Type: application/json' -H "X-Authentication: `puppet access show`" "https://YOUR-VM.delivery.puppetlabs.net:8170/code-manager/v1/deploys" -d '{"environments": ["production"], "wait": true}' | |
Deploy a project: | |
curl -k -X POST -H 'Content-Type: application/json' -H "X-Authentication: `puppet access show`" "https://YOUR-VM.delivery.puppetlabs.net:8170/code-manager/v1/projects/deploy" -d @project.json | |
project.json: | |
{"project-id":"my_project","remote":"https://github.com/Magisus/a_project","ref":"43094e0eb9ba14814a5fbe597c6bee2b681a0810","wait":true} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment