Coder Social home page Coder Social logo

puppet-push's Introduction

puppet-push push based puppetry

What am I trying to solve?

  • Puppet defaults to using a pull model, nodes pull their configs
  • Implement Puppet where pulling is not an option (DMZ)

What does it need?

  • SSH key access to the target node as root
  • puppet and rsync installed on the remote node and local node
  • puppet version 2.7.0 or newer
  • Alternate site.pp (site-push.pp)

What does it do?

  • Generates facts on target node and fetches
  • Compiles the catalog on the master
  • Pushes files from the File[] resource and replaces puppet:/// paths
  • Modifies catalog to replace the File[] source statements
  • Pushes catalog to target node
  • Applies catalog

Install

git install

Install git with apt, yum, whatever your flavor

yum install git

git clone

git clone git://github.com/tomas-edwardsson/puppet-push.git

build rpm or install

make rpm

and install that, or

make install

configure

edit /etc/puppet-push.conf

PUPPET_VAR_DIR="/var/lib/puppet"
PUPPET_MODULE_DIR=/etc/puppet/modules/production
REMOTE_SSH_USER=root

VERBOSE=0

Filebucket configuration

If you are using a filebucket server for the pull based hosts you will need to override it for the push based hosts.

An alternative site.pp file is provided which can be set in puppet-push.conf but if you can conditionally set the filebucket and file backup parameters in the manifests for the push based nodes it's possible to skip a special site.pp file.

Containing:

filebucket { local:
        server => false,
        path => "/var/lib/puppet/clientbucket",
}

File { backup => local }

Run

puppet-push <nodename>

Disclaimer

This is an ALPHA, I have only run it on a few nodes and it may break something.

License

GPLv3

Authors

Pall Valmundsson [email protected]

Tomas Edwardsson [email protected]

Sponsored by the Icelandic National Hospital

puppet-push's People

Contributors

akomakom avatar bjornswift avatar pall-valmundsson avatar pgassmann avatar tomas-edwardsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

puppet-push's Issues

Add report gathering

Clients create the following in /var/lib/puppet:

./state
./state/last_run_summary.yaml
./state/last_run_report.yaml
./state/state.yaml
./reports/pcl.example.com
./reports/pcl.example.com/201211081417.yaml
./reports/pcl.example.com/201211081419.yaml

Probably should just rsync /var/lib/puppet/reports/

Files copied to wrong location

On the agent side, files are copied with full absolute path in addition to relative, eg. my repokey is copied to
/var/lib/puppet-push/modules/etc/puppet/modules/yum/files/RPM-GPG-KEY-RPMFORGE
and thus the apply fails on file not found
/var/lib/puppet-push/modules/yum/files/RPM-GPG-KEY-RPMFORGE

Using puppet 3.8.7 with centos 6.9

Puppet compile fails without logging anything

When the puppet master --compile command in function compile_catalog() fails, there is no log or error message telling why. To simulate this, delete some template, that you are trying to apply. Push simply fails, without telling you why and there are no logs on the run in /tmp.

Using puppet 3.8.7 with centos 6.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.