Skip to content

Commit baa80a4

Browse files
committed
Update README
- Remove upgrading from 2015.2 section - Remove testing zack/r10k section - Reword adding webhook section - Misc improvements
1 parent dd55b1b commit baa80a4

File tree

1 file changed

+16
-41
lines changed

1 file changed

+16
-41
lines changed

README.md

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ Table of contents
1313
* [Install PE](#install-pe)
1414
* [Get the control\-repo deployed on your master](#get-the-control-repo-deployed-on-your-master)
1515
* [Setup a webhook in your Git server](#setup-a-webhook-in-your-git-server)
16+
* [Gitlab](#gitlab-1)
1617
* [Test Code Manager](#test-code-manager)
17-
* [Updating from a previous version of PE](#updating-from-a-previous-version-of-pe)
18-
* [Upgrading to PE2015\.3\.z from PE 2015\.2\.z](#upgrading-to-pe20153z-from-pe-20152z)
19-
* [Appendix](#appendix)
20-
* [Test the zack/r10k webhook](#test-the-zackr10k-webhook)
2118

2219
# Join the #ramp-up channel on Puppet Community Slack
2320

@@ -35,9 +32,9 @@ When you finish the instructions below, you will have the beginning of a best pr
3532

3633
- A Git server
3734
- The ability to push code to your Git server and have it automatically deployed to your PE master
38-
- A config_version script that outputs the most recent sha for your code deployment each time you run `puppet agent -t`
35+
- A config_version script that outputs the most recent SHA of your code each time you run `puppet agent -t`
3936
- Optimal tuning of PE settings for this configuration
40-
- Working and example [roles and profiles](https://docs.puppetlabs.com/pe/2015.3/puppet_assign_configurations.html#assigning-configuration-data-with-role-and-profile-modules) code
37+
- Working and example [roles and profiles](https://docs.puppet.com/pe/latest/puppet_assign_configurations.html#assigning-configuration-data-with-role-and-profile-modules) code
4138

4239
# How to set it all up
4340

@@ -65,7 +62,7 @@ When you finish the instructions below, you will have the beginning of a best pr
6562
- Read more about permissions:
6663
- https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/permissions/permissions.md
6764

68-
8. In the GitLab UI, create a project called `control-repo` and set the Namespace to be the `puppet` group
65+
8. In the GitLab UI, create a project called `control-repo` and set its Namespace to the `puppet` group
6966

7067
10. On your laptop, clone this GitHub control repo
7168
- `git clone <repo URL>`
@@ -74,7 +71,7 @@ When you finish the instructions below, you will have the beginning of a best pr
7471
14. On your laptop, remove the origin remote
7572
- `git remote remove origin`
7673

77-
15. On your latptop, add your internal repo as the origin remote
74+
15. On your laptop, add your internal repo as the origin remote
7875
- `git remote add origin <SSH URL of your GitLab repo>`
7976

8077
16. On your laptop, push the production branch of the repo from your machine up to your Git server
@@ -106,7 +103,7 @@ http://docs.puppetlabs.com/pe/latest/install_basic.html
106103

107104
At this point you have our control-repo code deployed into your Git server. However, we have one final challenge: getting that code onto your Puppet master. In the end state the master will pull code from the Git server via Code Manager, however, at this moment your Puppet master does not have credentials to get code from the Git server.
108105

109-
So, we will set up a deploy key in the Git server that will allow an SSH key we make to deploy the code and configure everything else.
106+
We will set up a deploy key in the Git server that will allow an SSH key we make to deploy the code and configure everything else.
110107

111108
1. On your Puppet master, make an SSH key for r10k to connect to GitLab
112109
- `/usr/bin/ssh-keygen -t rsa -b 2048 -C 'code_manager' -f /etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa -q -N ''`
@@ -159,10 +156,18 @@ So, we will set up a deploy key in the Git server that will allow an SSH key we
159156
160157
## Setup a webhook in your Git server
161158
159+
Independent of which Git server you choose you will grab the webhook URL from your master. Then each Git Server will have similar but slightly different ways to add the webhook.
160+
162161
1. On your Puppet master
163162
- `cat /etc/puppetlabs/puppetserver/.puppetlabs/webhook_url.txt`
164-
2. In your Git server's UI, add a webhook to the control-repo repository
165-
- You can paste the above webhook URL
163+
164+
### Gitlab
165+
166+
2. In your Git server's UI, navigate to the control-repo repository
167+
- In the left hand pane, scroll to the bottom and select **settings**
168+
- In the left hand pane, select **webhooks**
169+
3. Paste the above webhook URL into the URL field
170+
4. In the trigger section mark the checkbox for **push events** only
166171
3. Disable SSL verification on the webhook
167172
- Since Code Manager uses a self-signed cert from the Puppet CA it is not generally trusted
168173
3. After you created the webhook use "test webhook" or similar functionality to confirm it works
@@ -181,33 +186,3 @@ One of the components setup by this control-repo is that when you "push" code to
181186
- `ls -l /etc/puppetlabs/code/environments/production`
182187
- Confirm test_file is present
183188
4. In your first terminal window review the `puppetserver.log` to see the type of logging each sync will create
184-
185-
----
186-
# Updating from a previous version of PE
187-
188-
## Upgrading to PE 2015.3.z from PE 2015.2.z
189-
190-
Remove `pe_r10k` from the PE master group in the console and instead add the following two parameters to the `puppet_enterprise::profile::master` class under the PE master group.
191-
192-
- `r10k_remote` = the SSH URL for your internal repo
193-
- `r10k_private_key` = `/etc/puppetlabs/puppetserver/code_manager.key`
194-
195-
When upgrading the `puppet_enterprise::profile::master` class has the `file_sync_enabled` parameter set to `false`. This parameter should be removed so that Code Manager can configure file sync.
196-
197-
Finally, you’ll need to `echo 'code_manager_mv_old_code=true' > /opt/puppetlabs/facter/facts.d/code_manager_mv_old_code.txt` so that my Puppet code will redeploy all of your code with Code Manager.
198-
199-
# Appendix
200-
201-
## Test the zack/r10k webhook
202-
203-
If you are using PE2015.2.z or if you've forced the use of the zack/r10k webhook then you'll want to test that it works.
204-
205-
One of the components setup by this control-repo is that when you "push" code to your Git server, the Git server will inform the Puppet master to run `r10k deploy environment -p`.
206-
207-
1. Edit README.md
208-
- Just add something to it
209-
2. `git add README.md`
210-
3. `git commit -m "edit README"`
211-
4. `git push origin production`
212-
5. Allow the push to complete and then give it few seconds to complete
213-
- Open `/etc/puppetlabs/code/environments/production/README.md` and confirm your change is present

0 commit comments

Comments
 (0)