Skip to content

Latest commit

 

History

History
159 lines (155 loc) · 6.63 KB

snip_host-registration-steps.adoc

File metadata and controls

159 lines (155 loc) · 6.63 KB

You can register hosts with {Project} using the host registration feature in the {ProjectWebUI}, Hammer CLI, or the {Project} API. For more information, see {ManagingHostsDocURL}Registering_Hosts_managing-hosts[Registering Hosts] in {ManagingHostsDocTitle}.

Procedure
  1. In the {ProjectWebUI}, navigate to Hosts > Register Host.

  2. From the Activation Keys list, select the activation keys to assign to your host.

  3. Click Generate to create the registration command.

  4. Click on the files icon to copy the command to your clipboard.

  5. Connect to your host using SSH and run the registration command.

  6. Ensure that the appropriate repositories have been enabled:

  7. Generate the host registration command using the Hammer CLI:

    # hammer host-registration generate-command

    If your hosts do not trust the SSL certificate of {ProjectServer}, you can disable SSL validation by adding the --insecure flag to the registration command.

    # hammer host-registration generate-command \
    --insecure true
  8. Connect to your host using SSH and run the registration command.

  9. Ensure that the appropriate repositories have been enabled:

  10. Generate the host registration command using the {Project} API:

    # curl -X POST https://{foreman-example-com}/api/registration_commands \
    --user "My_User_Name" \
    -H 'Content-Type: application/json'

    If your hosts do not trust the SSL certificate of {ProjectServer}, you can disable SSL validation by adding the --insecure flag to the registration command.

    # curl -X POST https://{foreman-example-com}/api/registration_commands \
    --user "My_User_Name" \
    -H 'Content-Type: application/json' \
    -d '{ "registration_command": { "insecure": true }}'

    To enter a password as a command line argument, use username:password syntax. Keep in mind this can save the password in the shell history. Alternatively, you can use a temporary personal access token instead of a password. To generate a token in the {ProjectWebUI}, navigate to My Account > Personal Access Tokens.

  11. Connect to your host using SSH and run the registration command.

  12. Ensure that the appropriate repositories have been enabled: