Feature #30771

Global Registration - New workflow

Added by Leos Stejskal about 2 years ago. Updated almost 2 years ago.

Host registration
Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:


Updated WF for registering host via Global Registration template
and Host Registration Template without SmartProxy.

Related issues

Related to Foreman - Feature #30440: Simple & automatic host registration WFClosed

Associated revisions

Revision 2110556a (diff)
Added by Leos Stejskal almost 2 years ago

Fixes #30771 - Complete global registration flow (#8018)

The registration workflow implemented by a pair of new API endpoints.
The first endpoint allows user to get the Global Registration Template (GRT),
which contains generic instructions for any new machine. User must specify
OS or hostgroup, that will determine OS for registered host. Also organization
and location parameters are mandatory. The global registration template is
set through an application setting. The GRT renders to a script that should
be executed on the registered machine in order to create the Host record
and fetch the Host Registration Template (HRT).

The second endpoint allows a creation of the Host object. If it succeeds, the
HRT template is rendered. HRT includes bootstrap steps specific to the host.
These can be adjusted based on parameters inherit from OS, subnet, domain,
host group or set for the host itself.

The second endpoint does not allow to specify all host parameters, e.g. owner_id
and owner_type so that user can't create host outside of his or her allowed scope.
Also compute resource parameters could case issues, e.g. trying to create a VM
on the hypervisor, where it already exists. Acceptable parameters are enforced
via strong parameters definition in the registration controller.

Both endpoints return the script to be executed, even in case of error. They are
expected to be piped to the bash (or other shell), so e.g. 404 prints the error using

Host owner is always set to the user, who performs the registration, to avoid any
possibility of assigning the host to an organization or location, who the original
user does not have access to.

The defaut HRT contains instructions on how to setup REX keys and install insights
agent if applicable. This can be overriden by using Parameters. The default value
is seeded as a Global parameter.


#1 Updated by Leos Stejskal about 2 years ago

  • Related to Feature #30440: Simple & automatic host registration WF added

#2 Updated by Leos Stejskal about 2 years ago

  • Subject changed from Global Registration - Secure connection to Global Registration - New workflow

#3 Updated by Leos Stejskal about 2 years ago

  • Description updated (diff)

#4 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request added

#5 Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases 2.3.0 added

#6 Updated by Leos Stejskal almost 2 years ago

  • Status changed from Ready For Testing to Closed

#7 Updated by Tomer Brisker almost 2 years ago

  • Category set to Host registration

Also available in: Atom PDF