Forge Home

cbsd

Manage FreeBSD CBSD with Puppet

9,473 downloads

1,118 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.5 (latest)
  • 0.1.4
  • 0.1.3
  • 0.1.1
  • 0.1.0
released Sep 29th 2021
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'olevole-cbsd', '0.1.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add olevole-cbsd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install olevole-cbsd --version 0.1.5

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

olevole/cbsd — version 0.1.5 Sep 29th 2021

CBSD puppet

Table of Contents

  1. Module Description - What does the module do?
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Contributing - List of module contributors

Module description

The CBSD module allows you to manage CBSD on FreeBSD platform to create virtual environments ( jail, bhyve, XEN ) with Puppet.

CBSD is wrapper around FreeBSD jail bhyve and XEN. For more information please visit website https://bsdstore.ru/

Usage

class { 'cbsd':
  #install_method => "git",
  jnameserver    => "8.8.8.8,8.8.4.4",
  nat_enable     => 'pf',
  workdir        => '/usr/jails',
  nodeippool     => '172.16.0.0/24',
  natip          => $::ipaddress,
}
# If you install cbsd manually: don't use pkg for
# installing CBSD:
class { 'cbsd':
  manage_repo => false,
  workdir     => '/usr/jails',
}
# Manage FreeBSD bases for jail
# fetch specified base from the repo
class { "cbsd::freebsd_bases":
  ver    => [ '13.0' ],
  stable => 1,
}

cbsd::jail { 'myjail0':
  pkg_bootstrap => '0',
  host_hostname => 'myjail0.my.domain',
}
cbsd::jail { 'myjail1':
  pkg_bootstrap => '0',
  host_hostname => 'myjail1.my.domain',
  ensure        => 'absent',
  status        => 'stopped'
}

Hiera example:

classes:
  - cbsd
  - cbsd::freebsd_bases

cbsd::jnameserver: "8.8.8.8,8.8.4.4"
cbsd::nat_enable: "pf"
cbsd::workdir: "/usr/jails"
cbsd::nodeippool: "172.16.0.0/24"
cbsd::natip: '%{::ipaddress}'

cbsd::freebsd_bases::ver: [ 'native' ]
#cbsd::freebsd_bases::ver:
#  - '13.0'
#  - '12.2'

cbsd::jail:
  'cbsdpuppet1':
    pkg_bootstrap: '1'
    jprofile: 'cbsdpuppet'
    astart: '0'
    status: 'stopped'
    ver: 'native'
    ip4_addr: '0'
  'test2':
    pkg_bootstrap: '1'
    astart: '1'
    ver: 'native'
    host_hostname: 'myjail0.my.domain'


# Create FreeBSD 13.0-ufs cloud VM via bhyve
cbsd::bhyve:
  'myvm1':
    ensure: absent
    vm_os_type: 'freebsd'
    host_hostname: 'myvm1.my.domain'
    vm_os_profile: 'cloud-FreeBSD-ufs-x64-13.0'
    astart: '0'
    status: 'stopped'
    ip4_addr: '10.0.1.109'
    ci_gw4: '10.0.1.14'

Limitations

Works with FreeBSD 13+ and CBSD 13.0.0+

Currently only jail is supported by this module. Bhyve and XEN - work in progress.

Contributing

  • Fork it
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push)
  • Create new Pull Request