Giter Site home page Giter Site logo

puppet-foreman's Introduction

Puppet Forge Build Status

Puppet module for managing Foreman

Installs and configures Foreman, part of the Foreman installer or to be used as a Puppet module.

Many Foreman plugins can be installed by adding additional foreman::plugin::* classes, extra compute resource support via foreman::compute::* classes and the Hammer CLI can be installed by adding foreman::cli.

By default, it configures Foreman to run as a standalone service fronted by Apache as a reverse proxy with a PostgreSQL database.

The web interface is configured to use Puppet's SSL certificates by default, so ensure they're present first, reconfigure server_ssl_* or disable the ssl parameter. When used with the 'puppet' module, it will generate a new CA and the required certificate.

Lots of parameters are supplied to tune the default installation, which may be found in the class documentation at the top of each manifest.

Other modules may be used in combination with this one: puppet for managing a Puppet master and agent, and foreman_proxy to configure Foreman's Smart Proxy and related services.

Database support

The default database is PostgreSQL, which will be fully installed and managed on the host this module is applied to. Databases will be created with using the en_US.utf8 locale, which means a respective OS locale must be available on the database host. The database management can be disabled with db_manage.

Rails Cache support

Foreman supports different backends as Rails cache. This is handled by this module using the parameter rails_cache_store. The parameter takes a hash containing the type and options specfic to the backend.

The default is the file backend, configured via {'type' => 'file'}. To setup for redis use a hash similar to {'type' => 'redis', 'urls' => ['localhost:8479/0'], 'options' => {'compress' => 'true', 'namespace' => 'foreman'}} where urls takes an array of redis urls which get prepended with redis:// and options using a hash with options from rails falling back to {'compress' => 'true', 'namespace' => 'foreman'} if no option is provided.

An example configuration for activating the redis backend with a local instance could look like this:

class { 'foreman':
  rails_cache_store => {
    'type' => 'redis',
    'urls' => ['localhost:8479/0'],
    'options' => {
      'compress' => 'true',
      'namespace' => 'foreman'
    }
  }
}

Support policy

At any time, the module supports two releases, however the previous version may require parameters to be changed from their default values. These should be noted below.

Thus 'master' will support the upcoming major version and the current stable. The latest release (git tag, Puppet Forge) should support current and the previous stable release.

Foreman version compatibility notes

This module targets Foreman 3.1+. The module can be used with Foreman 2.4+ by setting register_in_foreman => false.

Types and providers

foreman_config_entry can be used to manage settings in Foreman's database, as seen in Administer > Settings. The cli provider uses foreman-rake to change settings.

foreman_smartproxy can create and manage registered smart proxies in Foreman's database. The rest_v3 provider uses the API with Ruby's HTTP library, OAuth and JSON.

Foreman ENC via hiera

There is a function foreman::enc to retrieve the ENC data. This returns the data as a hash and can be used in Hiera. This requires the URL to use the Puppet CA infrastructure:

---
version: 5
hierarchy:
  - name: "Foreman ENC"
    data_hash: foreman::enc
    options:
      url: https://foreman.example.com

It is also possible to use HTTP basic auth by adding a username/password to the URL in the form of https://username:[email protected].

Then within your manifests you can use lookup. For example, in manifests/site.pp:

node default {
  lookup('classes', {merge => unique}).include
}

Contributing

  • Fork the project
  • Commit and push until you are happy with your contribution
  • Send a pull request with a description of your changes

See the CONTRIBUTING.md file for much more information.

Adding new foreman::plugin::* classes is a very useful place to start contributing to this module.

More info

See https://theforeman.org or at #theforeman irc channel on freenode

Copyright (c) 2010-2013 Ohad Levy and their respective owners

Except where specified in provided modules, this program and entire repository is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

puppet-foreman's People

Contributors

ekohl avatar mmoll avatar domcleal avatar gregsutcliffe avatar ehelms avatar ohadlevy avatar ares avatar lzap avatar mcanevet avatar wbclark avatar timogoebel avatar inecas avatar stbenjam avatar evgeni avatar adamruzicka avatar lazyfrosch avatar dlobatog avatar nbarrientos avatar alexjfisher avatar adelton avatar vstone avatar cocker-cc avatar cristifalcas avatar pierrer avatar ezr-ondrej avatar mbacovsky avatar flyinbutrs avatar antaflos avatar treydock avatar tbrisker avatar

Watchers

James Cloos 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.