JoergFiedler.freebsd-build-server

FreeBSD Build Server

This creates a FreeBSD server that is set up to run 'poudriere' right away. For more details, check the FreeBSD Handbook.

I wanted a build server that doesn't need to be running all the time. To achieve this, the package repository and build options for all packages are synced to S3. This way, I can destroy the build server after the packages have been built and synced.

Before starting, you can provide your own files by setting paths for the following Ansible variables:

  1. make.conf, (poudriere_build_options_file)
  2. ports-list, (poudriere_port_list_file)
  3. poudriere.key, (poudriere_key_file)

You can provide your own version of these files and set the paths in the corresponding Ansible variables.

The typical workflow looks like this:

  1. Create a new server (you can use a Vagrant file)
  2. Apply this Ansible role
  3. Log in to the server
  4. Run: sudo build-ports
  5. Run: sudo upload-to-s3
  6. Log out
  7. Destroy the server

It's that simple!

Requirements

This role is meant to be used with a fresh FreeBSD installation with a few minor changes. You can use a Vagrant Box with providers for VirtualBox and EC2. I created this Vagrant project to set up VirtualBox and EC2 machines.

Role Variables

aws_default_region

The S3 region to use. Default: ''.

aws_access_key_id

S3 access key. Default: ''.

aws_secret_access_key

S3 secret key. Default: ''.

s3_bucket_name

The bucket used to store the packages and build options. Default: ''.

s3_upload_path

The path in the S3 bucket for the packages and build-options folder. Default: '/public/FreeBSD'.

freebsd_mirror_server

The FreeBSD mirror server to set up jails. Default: 'ftp://ftp.freebsd.org'.

poudriere_ssl_prefix

The path to save the package signing key. Default: '/usr/local/etc/ssl'.

poudriere_key_file

The private key used to sign the packages. Change this to your own key. Default: 'poudriere.key.default'.

poudriere_ports_list_file

The list of ports to be built. Default: 'ports-list.default'.

poudriere_ports_branch_name

The ports branch name to check out via svn and build. Default: 'head'.

poudriere_build_options_file

Build options make.conf used for building the ports. Default: 'make.conf.default'.

poudriere_jails

The jails to create.

poudriere_jails:
- { jail_name: 'freebsd-11_2_x64', version: '11.2-RELEASE' }

Default: ''.

poudriere_zpool

The name of the zpool for poudriere. If the pool doesn’t exist, it will be created with the devices listed in poudriere_zpool_devices. Default: 'tank'.

poudriere_zpool_devices

The devices used to create the zpool for poudriere, e.g., /dev/nvd1. Default: ''.

Dependencies

None.

Example Playbook

---
- hosts: default
  sudo: true

  vars:
    aws_access_key_id: '{{ lookup("env","AWS_ACCESS_KEY_ID") }}'
    aws_secret_access_key: '{{ lookup("env","AWS_SECRET_ACCESS_KEY") }}'
    aws_default_region: '{{ lookup("env","AWS_DEFAULT_REGION") }}'
    s3_bucket_name: 'repo.bucket.name'
    poudriere_ports_list_file: './files/ports.list'
    poudriere_key_file: './files/poudriere.key'
    poudriere_build_options_file: './files/make.conf'
    poudriere_jails:
      - { jail_name: 'freebsd-11_2_x64', version: '11.2-RELEASE' }

  roles:
  - { role: JoergFiedler.freebsd-build-server }

License

BSD

Author Information

If you like this or have ideas for improving the project, please open an issue on GitHub. Thank you!

Informazioni sul progetto

Creates a FreeBSD build server (poudriere).

Installa
ansible-galaxy install JoergFiedler.freebsd-build-server
Licenza
Unknown
Download
107
Proprietario