-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add iocell provider, and jailmanager selection #35
base: master
Are you sure you want to change the base?
Conversation
@@ -5,18 +5,17 @@ | |||
# | |||
class jail::setup () { | |||
|
|||
package { 'iocage': | |||
ensure => installed, | |||
package { $jailmanager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is out of scope here. Instead of creating the various jail::$jailmanager classes, you could probably just include the $jailmanager variable in the setup class and set a sane default in the hiera data. I can be more specific if I'm not making sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would help; I've never used heira, and as such, I'm functioning from "Do everything in manifests and templates" land.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for being slow.
If we had a hiera.yaml
file in the root of this repo that looks a bit like this one https://github.com/xaque208/puppet-unbound/blob/master/hiera.yaml then we can set jail::setup::jailmanager: 'iocage'
in data/common.yaml
. This implies also that we only need a common
section in the hiera.yaml
file. Let me know if that helps. If that can get cleaned up a bit then I think this is merge worthy. Does that all make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm sorry for being slow.
This seemed to have gotten hidden under all my other notifications :(
It makes sense, as far as it can to someone who's never used heira before.
I don't want to try writing one right now and fucking it all up, but I can clean up this PR so it'll work with a properly written file, if you still want to merge this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can handle the hiera bits, so no worry. I'll link you the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesomepossum, thanks!
When the hiera bit is done, I'll make the appropriate change here if something needs updating :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hiera bits are in now. You should now be able to add a parameter to the jail::setup
class that you can read from hiera. In data/common.yaml
you could set something like jail::setup::manager: 'iocage'
which would choose icoage as a default, then users would be able to override this variable in their own heira data, so you could do jail::setup::manager: 'iocell'
for to select the correct package.
@@ -0,0 +1,247 @@ | |||
require 'tempfile' | |||
|
|||
Puppet::Type.type(:jail).provide(:iocell) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this work is based on the current iocage provider. What other changes should I be looking out for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Shouldn't be any between iocage legacy and iocell, at least not as of yet. I couldn't find any real differences that would impact.
#37 should help with the hiera data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being slow to help here. I've had too much in flight.
@@ -5,18 +5,17 @@ | |||
# | |||
class jail::setup () { | |||
|
|||
package { 'iocage': | |||
ensure => installed, | |||
package { $jailmanager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hiera bits are in now. You should now be able to add a parameter to the jail::setup
class that you can read from hiera. In data/common.yaml
you could set something like jail::setup::manager: 'iocage'
which would choose icoage as a default, then users would be able to override this variable in their own heira data, so you could do jail::setup::manager: 'iocell'
for to select the correct package.
} | ||
|
||
service { 'iocage': | ||
enable => true, | ||
service { $jailservice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be a hiera variable.
Dear @RainbowHackerHorse, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Dear @RainbowHackerHorse, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Dear @RainbowHackerHorse, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Oh man I'm so sorry, I forgot to check back on here. It's been a while since I've had time to poke at anything FOSS. |
This PR will add the
iocell
provider, and an option to choose your preferred jail manager, betweeniocage
legacy,py-iocage
, andiocell
.I'm sure there's a better way to do it with a defined type, but the variable include seems to work just as well.