Giter Club home page Giter Club logo

puppet-poudriere's Introduction

Puppet-poudriere

Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores License

Manage the FreeBSD PkgNG build system with Puppet.

Simple Implementation

poudriere::env { "90amd64":
  makeopts => [
    "WITH_PKGNG=yes",
    "OPTIONS_SET+= SASL",
    "OPTIONS_SET+= TLS",
    "WITH_IPV6=TRUE",
    "WITH_SSL=YES",
  ]
}

nginx::vhost { "build.${domain}":
  port      => 80,
  vhostroot => '/usr/local/poudriere/data/packages',
  autoindex => true,
}

@@pkgng::repo { "${::fqdn}-90amd64":
  release     => '9.0-RELEASE',
  mirror_type => 'http',
  repopath    => '/90amd64-default/Latest/',
}

Changing default settings

The poudriere class has some default parameters for global settings, such as the ZFS pool, root filesystem, and the FreeBSD mirror site to use (see init.pp for details). To change these defaults, declare the poudriere class with your own parameters.

If you do not want to use ZFS, you can use:

class { 'poudriere':
  zpool => false,
}

Using port-specific make options

You can pass port-specific make options as a hash in pkg_makeopts. For instance, if you want to build Apache 2.4 with the PHP 5.5 module, you can do the following:

poudriere::env { "90amd64":
  makeopts => [
    'WITH_PKGNG=yes',
    'APACHE_VERSION=24',
    'APACHE_PORT=www/apache24',
  ],
  pkgs => [
    'www/apache24',
    'lang/php55',
  ],
  pkg_makeopts => {
    'lang/php55' => ['OPTIONS_SET+=APACHE'],
  },
}

Alternatively, a file containing make options for both global and port-specific use could be defined by setting makefile.

Using port-specific build options

Ports often allow for enabling or disabling support for certain features. Such options can be manually set by issueing poudriere options cat/port but can also be defined in puppet by setting pkg_optsdir. This should point to a directory with files such as could be found in /usr/local/etc/poudriere.d/${jail}-options/:

poudriere::env { "90amd64":
  pkg_optsdir => 'puppet:///path/to/dir/',
}

Managing seperate portstrees

The default portstreee is no longer configuered by this module. You should create this yourself like so:

  poudriere::portstree { 'default': }
poudriere::portstrees:
  default:

By default environments use a portstree named default, which you should create as per the instructions above; however each build environment can be told which portstree to use:

poudriere::portstree { "custom-ports":
  cron_enable  => false,
  fetch_method => 'portsnap',
}

poudriere::env { "custom-build":
  portstree => 'custom-ports',
}
poudriere::portstrees:
  default:
  custom-ports:
    cron_enabled: false
    fetch_method: portsnap
poudriere::environments:
  custom-build:
    portstree: custom-ports

puppet-poudriere's People

Contributors

zachfi avatar skoef avatar dhoppe avatar lifeforms avatar jdmulloy avatar bastelfreak avatar phyber avatar b4ldr avatar tbartelmess 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.