libioc icon indicating copy to clipboard operation
libioc copied to clipboard

Provision from custom repo

Open urosgruber opened this issue 6 years ago • 4 comments

I would like to simplify some provisioning code on our end and can see ix provisioning could work except it uses ix repo. Is there an option to change the repo or would this need to be a custom provisioning method?

urosgruber avatar Feb 17 '19 07:02 urosgruber

in the puppet provisioning plugin currently supports two modi for the source parameter: it can either be an absolute path on the host which is mounted into the jail, or it's a URL that will be cloned and processed by r10k

i can imagine a similar mode change in the iX plugin

igalic avatar Feb 17 '19 09:02 igalic

@urosgruber you can build that yourself by inheriting from the ix-plugin provisioner and overwriting Provisioner.__get_url():

https://github.com/bsdci/libioc/blob/a56658513d9bc663af72e241109e466e2f517f0b/libioc/Provisioning/ix.py#L92-L96

gronke avatar Feb 17 '19 10:02 gronke

I'll try one, need to learn some Python basics first :) I'll create a PR when I'm done.

urosgruber avatar Feb 17 '19 10:02 urosgruber

While testing existing ix plugin I see that there are couple of issues in the code. I'll try to fix this first and maybe it's worth making the plugin better. Also it's very much different behaviour than the one from iocage

urosgruber avatar Feb 20 '19 18:02 urosgruber