Giter Club home page Giter Club logo

puppet-provisioner's Introduction

Puppet Provisioner for Aminator

Based on initial work by Archie Cowan.

Installation

First, install Aminator. Then install the Puppet provisioner for Aminator:

sudo aminator-plugin install puppet

Then you will need to make add an environment that uses the Puppet provisioner to your /etc/aminator/environments.yml file. For example:

    ec2_puppet_debian:
        cloud: ec2
        distro: debian
        provisioner: puppet
        volume: linux
        blockdevice: linux
        finalizer: tagging_ebs

    ec2_puppet_redhat:
        cloud: ec2
        distro: redhat
        provisioner: puppet
        volume: linux
        blockdevice: linux
        finalizer: tagging_ebs

Accepted arguments

--puppet-env-vars - Extra arguments for Puppet.  Can be used to include a Puppet class with -e.

--puppet-args - Extra arguments for Puppet.  Can be used to include a Puppet class with -e.

--puppet-master - Hostname of Puppet Master

--puppet-certs-dir - Used when generating/copying certs for use with Puppet Master

--puppet-private-keys-dir - Used when generating/copying certs for use with Puppet Master

--puppet-hieradata - The name of the tarball containing a hiera.yaml file and hieradata directory.  This option requires Puppet >= 3.1.')

--puppet-install-cmd - The command to use to install Puppet.  The native package manager will be used by default.

--puppet-hiera-install-cmd - The command to use to install Hiera.  Gem will be used by default.

Usage with a Master

Basic

sudo aminate -B ami-35792c5c some-host.domain.com

Puppet will use the default hostname 'puppet' to try to talk to the Puppet Master server and generate certs with the name in the last argument.

Master specified

sudo aminate -B ami-35792c5c --puppet-master=puppet-master.domain.com some-host.domain.com

Puppet will use the specified hostname to try to talk to the Puppet Master server and generate certs with the name in the last argument.

Usage Masterless

Masterless with one manifest

sudo aminate -B ami-35792c5c /full/path/to/some_manifest.pp

Aminator will look at the last argument and try to find that file. If it does, Aminator will assume that you want to run Puppet in Masterless mode (apply) and will pass in the specified manifest.

Masterless with modules

sudo aminate -B ami-35792c5c /full/path/to/my_manifest_tarball.tgz

Aminator will untar the manifests to /etc/puppet/modules (or /etc/puppet if the tarball contains a modules directory) and run Puppet apply.

Masterless passing custom facts

sudo aminate -B ami-35792c5c --puppet-env-vars="FACTER_my_fact=some_value; FACTER_fact2=value2" /full/path/to/my_manifest_tarball.tgz

Aminator will add the specified variables to the environment for Puppet runs. The most obvious use for this is to pass custom facts to Puppet that are used in the Puppet manifests. Pairs are delimited by semi-colon.

Masterless with modules and arguments for the apply

sudo aminate -B ami-35792c5c --puppet-args="-e 'include my_module::my_class'" /full/path/to/my_manifest_tarball.tgz

Aminator will untar the manifests and run Puppet apply, passing the contents of puppet_args in the commandline.

Masterless with Hiera data

sudo aminate -B ami-35792c5c --puppet-args="-e 'include my_module::my_class'" --puppet-hieradata=/full/path/to/hieradata.tgz /full/path/to/my_manifest_tarball.tgz

Aminator will expand the hieradata tarball into /etc/puppet. The tarball should include a hiera.yaml and whatever files/directories hiera will use (often a hieradata directory structure with your yaml files).

Masterless with Hiera data and custom Puppet/Hiera install

sudo aminate -B ami-35792c5c \
  --puppet-args="-e 'include my_module::my_class'" \
  --puppet-hieradata=/full/path/to/hieradata.tgz \
  --puppet-install-cmd="yum install -y rubygems && gem install puppet -v '>=3.1' && ln -s /usr/local/bin/puppet /usr/bin/puppet" \
  --puppet-hiera-install-cmd="gem install hiera -v '>=1.3'" \
  /full/path/to/my_manifest_tarball.tgz

Using Hiera with a 'puppet apply' was only supported starting with Puppet 3.1 so, depending on your distro/repos, you may need to use custom install commands to make sure you have a new enough Puppet and/or Hiera.

puppet-provisioner's People

Contributors

robsweet avatar onyx avatar

Watchers

Anirvan Chakraborty avatar Cornel Foltea avatar James Cloos avatar Alex Lashford avatar  avatar  avatar  avatar Chuck Rice 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.