cernops/puppet-agent

Name: puppet-agent

Owner: CERN Operations

Description: All of the directions for building a puppet agent package.

Forked from: puppetlabs/puppet-agent

Created: 2016-12-01 16:12:53.0

Updated: 2016-12-01 16:12:55.0

Pushed: 2017-09-12 14:25:16.0

Homepage: null

Size: 5509

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The Puppet Agent

Overview

The puppet agent is a collection of software that is required for puppet and its dependencies to run. The full list of software and projects included in the puppet agent can be found in the project definition. This repo is where the puppet-agent vanagon configuration lives. It is used to drive the building of puppet-agent packages for releases.

Runtime Requirements

The Gemfile specifies all of the needed ruby libraries to build a puppet-agent package. Additionally, puppet-agent requires a VM to build within for each desired package.

Environment variables
VANAGON_LOCATION

The location of Vanagon in the Gemfile can be overridden with the environment variable VANAGON_LOCATION. Can be set prior to bundle install or updated with bundle update.

Building puppet-agent

If you wish to build puppet-agent yourself, it should be relatively easy. First bundle install, followed by bundle exec build puppet-agent <desired platform> <vm hostname>, where the platform is a platform supported by vanagon and vm hostname is the hostname of a vm of the desired platform. The current user must be able to ssh into that vm as root (vanagon has facilities to provide an ssh key beyond what is listed in .ssh/config).

Building different ruby versions

There are multiple ruby versions available to use in puppet-agent. To switch between ruby versions, update the ruby_version and gem_home settings in the puppet-agent project config

To switch to ruby 2.3.3:

oj.setting(:ruby_version, "2.3.3")`
oj.setting(:gem_home, File.join(proj.libdir, "ruby", "gems", "2.3.0"))

To switch to ruby 2.1.9:

oj.setting(:ruby_version, "2.1.9")`
oj.setting(:gem_home, File.join(proj.libdir, "ruby", "gems", "2.1.0"))
Requirements for building

To build puppet-agent, you'll need the following:

To build puppet-agent on infrastructure outside of Puppet Labs, you'll need to make a few edits in the component and project files. Any references to pl-gcc, pl-cmake, pl-boost, pl-yaml-cpp, etc need to be changed. In many cases, just drop the pl- prefix and ensure that CXX or CC envrionment variables are what they should be.

You also may need to change the source URIs for components. We recognize this is less than ideal at this point, but we wanted to error on the side of getting this work out in public rather than having everything perfect.

If you have your own mirror of the components of puppet-agent, you can also use a rewrite rule. See the Vanagon README for an example.

Branches in puppet-agent

Tracking branch (master + stable):

Guidelines on Merging Between Branches

Generally, no PR is needed for routine merges from stable to master, but a PR is advised for other merges. Use your judgment of course, and put up a PR if you want review.

Note that for all merges from master or stable, the merge should pick up:

But never:

Here's a sample snippet used for a stable -> master merge:

merge --no-commit --no-ff stable
i in {hiera,facter,puppet,marionette-collective,pxp-agent,cpp-pcp-client}; do git checkout master -- configs/components/$i.json;done
checkout master -- configs/components/windows_puppet.json
commit -m "(maint) Restore promoted components refs after merge from stable"
Installer plugin for OSX

The GUI installer for OSX includes a custom plugin that captures and sets information such as the puppet master and certificate name for the client. The source for this Xcode project can be found here.

Issues

File issues in the Puppet Agent (PA) project on the Puppet Labs Jira site. Issues with individual components should be filed in their respective projects.

License

Puppet agent is licensed under the Apache-2.0 license.

Maintainers

See MAINTAINERS

Running Tests

See Acceptance README


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.