Hey,
> As we begin to refine the installation of Katello as an engine with
> Foreman, a couple of questions have arose with regards to what to do with
> certain deployment artifacts for plugins in general. Those questions are:
>
> 1. Should a plugin ever provide their own user? Should a plugin just rely
> on the foreman user and group?
Depends, you can rely I guess - foreman will be present for sure.
> 2. If a plugin needs to provide their own configuration, should that live
> in /etc/<plugin>/plugin.yml? Or something more like
> /etc/foreman/plugins/<plugin.yml>?
> /etc/foreman/plguins/<plugin_name>/plugin.yml? (keeping in mind, more than
> just a yml file might be deployed as is the case with katello right now,
> deploying token and password files)
I like the plugin subdirectory.
> 3. Where should a plugin place any log files? For example, where should the
> katello installer place it's log file? Another example, Katello brings
> along delayed jobs which has its down production logs, should those live in
> /var/log/<plugin> or /var/log/foreman/ or /var/log/foreman/<plugin> ?
Ditto, we can configure other services to use subdirectory too, tight?
Additional questions (with answers!):
Plugins and i18n. We have implemented fully working i18n in
foreman_discovery plugin. I have made some changes in upstream projects,
so Foreman is now multidomain enabled. See the plugin to learn how this
works. Basically, no changes are necessary, except initialization i18n
code are required. There are rake tasks and a Makefile for extraction
and MO generation that work both for Foreman itself and plugins.
Note that only code strings currently work. Javascript and model names
(tables, columns) are currently not working (extraction will skip them).
This is still in TODO, JavaScript should be relatively easy, model
extraction is more challenging tho.
There is also foreman-debug script which is a bash rewrite of
katello-debug. It is much more simple, but it offers similar kind of
functionality as katello-debug. Consider using that for Foretello, I
could provide some easy way of extension (basically it foreman-debug
could just call sub-debug scripts or something like that and helper bash
functions which are used there could be extracted to be reused). This
way, we could have one single tarball for all required information + we
can now also upload tarballs to our own server.
···
--
Later,
Lukas “lzap” Zapletal
irc: lzap #theforeman