voxpupuli / puppet-jail

FreeBSD Jails with Puppet
https://forge.puppet.com/puppet/jail
Apache License 2.0
9 stars 8 forks source link

This design document describes what the heck we're doing #31

Closed igalic closed 7 years ago

igalic commented 7 years ago

and some directions to the how…

igalic commented 7 years ago

next up, do we implement something like jail::fetch { '11.0-RELEASE': ensure => present } perhaps jail_fetch { '11.0-RELEASE': ensure => present }, or do we simply document that this needs to be done?

i haven't customized iocage activate either. Both of these could be part of the jail::setup, but they are not currently…

igalic commented 7 years ago

a simple implementation of jail::fetch

define jail::fetch (
  String $release = $name,
) {
  exec { "iocage fetch --release $release":
    path        => '/usr/local/bin:/usr/bin:/bin:/sbin:/usr/local/sbin',
    unless      => "iocage list -Hr | grep -qw $release",
    environment => ['LANG=C.UTF-8', 'LC_ALL=C.UTF-8']
  }
}

after thinking about this for a while, i've come to the conclusion that a type&provider implementation might be better because of prefetch & puppet resources


this is now done: 840b4485892b791cd5166857894ce42ac28ae68d

igalic commented 7 years ago

actually, i still haven't implemented fstab, so, this isn't quite as done as i thought it was…

igalic commented 7 years ago

imo, this is now perfect if we disregard the complete lack of documentation

zachfi commented 7 years ago

Thank you for the efforts on this PR! Iocage is now in a state I can test on my infrastructure, and can say that this code mostly works. We've got a couple issues to work out before I think its ready for a release, but its moving in the right direction. As such, a #32 has been opened to include this work, validate, update the changelog, etc. PRs in the meantime can be sent to the 4.x branch until its released.