Hello all,
I need to make some design decisions and I want to hear your opinions.
Subscription-manager is a tool from RHEL6 that provides system
registration and subscription services. It works against Red Hat Portal
and against Katello instance (now Foreman with Katello plugin).
Katello has it's own systems table which is separate from Foreman hosts
on the database level. The plan is to merge those entities in long-term.
Subscription-manager (aka rhsm) sends out registration message together
with username/password, organization and environment currently. It is
extensible with simple plugins that can add hooks like post-registration
or post-subscribe.
Now, the task is to register Foreman host entry during the rhsm
registration process and setup Puppet which effectively mean providing
the following info as bare minimum:
- puppet environment (note this is different from Katello environment)
- puppetmaster proxy name
- puppetca proxy name
Once this is done, newly created rhsm plugin can make a simple
unattended call to Foreman, download and deploy puppet.conf and
optionally call puppet to upload it's first report.
The biggest question right now is how to do the registration
integration. I created a simple Ruby script that interactively asks for
required info and does few API calls in order to create Foreman host. It
also deploys puppet.conf:
The rhsm plugin could call that but there are some drawbacks:
- two new RPMs need to be installed on the client (foreman_api and the
script) - during registration the script asks for Foreman credentials (so
basically rhsm would ask twice)
Possible solutions:
a) Extend rhsm tool with new options (puppet environment, master, ca)
and create an orchestration that would create Foreman host.
b) Leave it as is, but at least re-use rhsm client certificate to do the
calls so no username/password is required for the Foreman host creation.
c) Other options?
Thanks for help
···
-- Later,Lukas “lzap” Zapletal
irc: lzap #theforeman