GithubHelp home page GithubHelp logo

puppet-setup's Introduction

Masterless Puppet all-in-one

Why?

  • Small flexible system to puppetize servers for example in a home setup environment.
  • Use librarian-puppet to list puppetmodules, but without a Puppetmaster.
  • All the configuration and scripts in one git repository.
  • Originally I tried to realize it using r10k. https://github.com/pgassmann/r10k-masterless-poc

What

  • One single repository with
    • hieradata
    • Puppetfile for librarian-puppet
    • Gemfile for tool installation with bundler
    • Setup mechanism
  • Supports dynamic environments from git branches
  • Requires no Puppetmaster
  • All sources can be git repositories, so you can mirror them on a git server and have full control over your sources
  • Installs puppet using bundler and Gemfile to a separate path from system gems

Prerequisites

  • VM with Ubuntu 14.04 Server and hostname configured to match hieradata.
  • Git to clone the repo

For this PoC set the fqdn to 'owncloud.example.com' or assign the role through the fact custom_role.

Bootstrap

Run the following commands to setup your server.

apt-get install git -y
git clone https://github.com/pgassmann/puppet-setup.git
cd puppet-setup
./setup.sh
# or
FACTER_custom_role=owncloud ./setup.sh

How it works

###First run:

  • Install sytem packages ruby, ruby-dev and make
  • Install bundler as gem
  • Install puppet and dependencies with bundle to a local path

populate environment and puppet apply

  • get environment from current git branch
  • rsync hieradata to environment
  • librarian-puppet deploys the modules to the environment using the Puppetfile
  • puppet apply with hieradata and modules in environment

Issues and Ideas

  • The setup files, including the hieradata are deployed on every node you install with this mechanism, files are all world-readable because git only knows 644 or 755 as permission.
  • Use this repository to setup the puppet master and then attach the nodes to it. You still have the fallback to apply the config on any node without puppetmaster or immediately redeploy the puppetmaster

puppet-setup's People

Contributors

pgassmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.