Forge Home

pe_code_manager_easy_setup

Sets up code manager

10,988 downloads

6,355 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.0.3 (latest)
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.1.0 (deleted)
  • 1.0.1
  • 1.0.0
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1 (deleted)
  • 0.1.0
released Mar 22nd 2018
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet > 4.3.2
  • , , , , ,
Tasks:
  • pe_code_manager_easy_setup

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'beersy-pe_code_manager_easy_setup', '2.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add beersy-pe_code_manager_easy_setup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install beersy-pe_code_manager_easy_setup --version 2.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

beersy/pe_code_manager_easy_setup — version 2.0.3 Mar 22nd 2018

Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with pe_code_manager_easy_setup
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

This module and task makes it easy to install code manager.

Task

Using the task is highly recommended if you are running PE 2017.3 or are using Bolt. It is much simpler than using the module.

Usage

First, install this module by running these command on the master as root:
puppet module install beersy-pe_code_manager_easy_setup
Set r10k_remote_url to git url of control repo (default: git@gitlab:puppet/control-repo.git). Both ssh and https url's are accepted. Ex:
screenshot
If something goes wrong, check the /tmp/ez*.log's for more information. The task will fail if it is run on a node that is not a master. After you run the task, check the output for the public ssh key and webhook url. You will need to manually put them in your version control system.
NOTE The task can take a few minutes to run.

You can also run the Puppet Task from the command line using:

puppet access login <pe_console_user>
puppet task run pe_code_manager_easy_setup::setup_code_manager  r10k_remote_url=<repo>  -n <master_certname>

Or using bolt:

bolt task run pe_code_manager_easy_setup::setup_code_manager r10k_remote_url=<repo> --modulepath /etc/puppetlabs/code/environments/production/modules --nodes <master_certname>

Once the task has completed follow the Post-Install Steps.

Module Setup

You can ignore these steps if you are using the task.

What pe_code_manager_easy_setup affects

This module will:

  • create the appropriate RBAC users for code manager
  • configure the PE Master node group for code manager
  • generate the deployment key to be placed into github/gitlab
  • generate the webhook URL to placed into github/gitlab

Setup Requirements

This module assumes gem, git, and Puppet Enterprise are already installed.

Usage

Install this module by running these command on the master as root:
puppet module install beersy-pe_code_manager_easy_setup
puppet resource package puppetclassify ensure=present provider=puppet_gem
puppet apply -e "class { 'pe_code_manager_easy_setup': r10k_remote_url => 'GIT_REPO_URL', git_management_system => 'GMS'}"
Run the above puppet apply command again. Run puppet agent -t

Replace these values before running:

  • GIT_REPO_URL: set to git url of control repo (default: git@gitlab:puppet/control-repo.git)
  • GMS: set to 'gitlab' or 'github' (default:'gitlab')

Post-Install steps

If successful, this module generates 2 files on the master:

1 /etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa.pub Paste the contents of file as a deploy key:
Gitlab:
http://PATH_TO_CONTROL_REPO/deploy_keys (ex: http://gitlab/puppet/control-repo/deploy_keys)

Github:
https://PATH_TO_CONTROL_REPO/settings/keys (ex: https://github.com/puppetlabs/control-repo/settings/keys)

2 /etc/puppetlabs/puppetserver/.puppetlabs/webhook_url.txt
Gitlab instructions:

  • Go to: http://PATH_TO_CONTROL_REPO/hooks
    • URL: URL from webhook_url.txt
    • Trigger: Enable "Push events"
    • SSL verification: Enable "Enable SSL verification"

Github instructions:

  • Go to: https://PATH_TO_CONTROL_REPO/settings/hooks/new
    • Payload URL: URL from webhook_url.txt
    • Content type: "application/json"
    • Which events would you like to trigger this webhook?:"Just the push event."

Limitations

This modules assumes that you are running:

  • Puppet Enterprise 2015.3 or higher
  • Gitlab 8.5 or higher
  • gem, git are already installed

Release Notes/Contributors/Etc.

2.0.2 - Minor bug fixes and documentation updates.
2.0.1 - Fixed bug related to access token, and improved execution time.
2.0.0 - Added task
1.0.1 - Changed to adhere to pdk standards. Added tests
1.0.0 - Initial release
0.1.4 - Removing unnecessary puppet_gem dependency
0.1.3 - Typo fix
0.1.2 - Readme fix
0.1.1 - Code cleanup, added readme and other docs
0.1.0 - Initial Release