Skip to content

skunkwerks/ansible-poudriere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role Name

Deploys and configures a FreeBSD poudriere build server and ports tree. It is assumed that this will be one of the first playbooks in your infrastructure, so there are no dependencies other than base FreeBSD.

If nginx is enabled, a plain HTTP server is setup, with the usual poudriere / pkg repo settings enabled, and additional /images/ directory comprising any images generated via poudriere-image(8).

Requirements

A vanilla FreeBSD install is required, latest version with zfs. A large x86_64 box is recommended, with 64GiB RAM minimum, decent disks, and multiple cores - the more the merrier. A good network link to the servers that will use this as a package repo is recommended.

A minimal setup may only need 30GiB but more ports, images, and OS versions obviously increase that dramatically.

Role Variables

In most cases you will have your own fork of the ports tree, your own web servers that host the resulting packages, obviously your own signing key, and custom lists of make options and ports to be built.

Refer to the example playbook for details.

Dependencies

n/a

Example Playbook

---
- hosts: poudriere
  become: yes

  vars:
    # mandatory
    # the repo to clone your package source tree from
    poudriere_ports_repo:     "https://github.com/freebsd/freebsd-ports"
    # the name of the key to use for signing and verifying packages
    poudriere_pkg_key:        "my.org"
    # this name is used to ensure reproducible build across servers
    poudriere_pkg_server:     "a.big.server.org"
    # the url of the package build server for viewing logs
    poudriere_pkg_url:        "http://{{ poudriere_pkg_server }}/"
    # optional, copy from role *.default files
    # use poudriere to build FreeBSD images and BEs from custom sources
    # NB no https url
    poudriere_src_repo:       "git.example.org/freebsd-src"
    # enable nginx-based webserver for poudriere and packages
    poudriere_webserver:      "yes"
    poudriere_nginx_conf:     "templates/nginx.conf.j2"
    poudriere_nginx_location: "/usr/local/etc/nginx/nginx.conf"
    poudriere_poudriere_conf: "templates/poudriere.conf.j2"
    # most likely customise this to auto-accept licenses or ot
    # set default versions for databases like PostgreSQL
    poudriere_make_conf:      "files/poudriere/make.conf"
    # the list of ports you want to build
    poudriere_ports_list:     "files/poudriere/ports.list"
    # a directory of custom options for given ports
    # these are created via `poudriere options -cn my/port` and
    # can then be moved back into the playbook files, they are
    # mirrored with rsync to the poudriere server
     poudriere_ports_options:  "files/poudriere/options/"
    # adding further builders is as simple as ensuring that
    # - base.txz and kernel.txz are in the appropriate place on your
    # poudriere_freebsd_mirror, and adding an entry
    poudriere_builders:
        - { name: '11_3_amd64', release: '11.3-RELEASE' }
        - { name: '12_0_amd64', release: '12.0-RELEASE' }
    roles:
        - { role: skunkwerks.poudriere }
    # maximum size for ccache to speed up compilation on repeat runs
    ccache_size:                "50.0"
    # enable fetching pre-built packages from upstream FreeBSD repo
    # this requires that the git ports tree used tracks upstream builds
    poudriere_pkg_prefetch:     true

License

BSD-2-Clause

Author Information

See https://skunkwerks.at/ for contact details.

About

An Ansible role for configuring Poudriere on FreeBSD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages