Project

General

Profile

Feature #30771

Global Registration - New workflow

Added by Leos Stejskal 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host registration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

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 WFNew

Associated revisions

Revision 2110556a (diff)
Added by Leos Stejskal 6 months 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
echo.

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.

History

#1 Updated by Leos Stejskal 7 months ago

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

#2 Updated by Leos Stejskal 7 months ago

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

#3 Updated by Leos Stejskal 7 months ago

  • Description updated (diff)

#4 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8018 added

#5 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 2.3.0 added

#6 Updated by Leos Stejskal 6 months ago

  • Status changed from Ready For Testing to Closed

#7 Updated by Tomer Brisker 5 months ago

  • Category set to Host registration

Also available in: Atom PDF