diff --git a/guides/common/modules/con_basic-content-management-workflow.adoc b/guides/common/modules/con_basic-content-management-workflow.adoc index 31126b51477..49ec52ff1ee 100644 --- a/guides/common/modules/con_basic-content-management-workflow.adoc +++ b/guides/common/modules/con_basic-content-management-workflow.adoc @@ -58,31 +58,7 @@ Use the following procedure to create an activation key that you can use to subs Use the following procedure to register an existing CentOS Stream host to {Project} -.Procedure -. Log on to the Centos 8 host you want register. -. Download the consumer RPM for your {ProjectServer}. -. This is located in the `pub` directory on {ProjectServer}'s web server. -For example, for a {ProjectServer} with the host name `{foreman-example-com}`, enter the following command on the host to register: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# rpm -Uvh _http://{foreman-example-com}_/pub/katello-ca-consumer-latest.noarch.rpm ----- -+ -This RPM installs the necessary certificates for accessing repositories on {ProjectServer} and configures Subscription Manager to use the server's URL. -. On the host, enter the following command to register the host to {Project} using the activation key: -+ -[options="nowrap" subs="+quotes"] ----- -# subscription-manager register --activationkey="_My_Activation_Key_" --org="_My_Organization_" ----- -. After registration, enable content from {ProjectServer}: -+ -[options="nowrap" subs="+quotes"] ----- -# yum repolist ----- -. Check the `/etc/yum.repos.d/redhat.conf` and ensure that the appropriate repositories have been enabled. +include::proc_host_registration_steps.adoc[leveloffset=+1] == Using Content Views diff --git a/guides/common/modules/proc_host_registration_steps.adoc b/guides/common/modules/proc_host_registration_steps.adoc new file mode 100644 index 00000000000..f67a7a5f291 --- /dev/null +++ b/guides/common/modules/proc_host_registration_steps.adoc @@ -0,0 +1,47 @@ +.Procedure + +. Generate registration command ++ +UI: In the {ProjectWebUI}, navigate to *Hosts > Register Host* and generate the registration command. ++ +Or you can generate command via API: +ifdef::foreman-el,foreman-deb[] ++ +[options="nowrap" subs="+quotes,attributes"] +---- +# hammer host-registration generate-command + +# or manually: + +# curl -X POST https://{foreman-example-com}/api/registration_commands \ + --user username \ + -H 'Content-Type: application/json' +---- +endif::[] +ifdef::katello,satellite[] ++ +[options="nowrap" subs="+quotes,attributes"] +---- +# hammer host-registration generate-command --activation-keys your-key + +# or manually: + +# curl -X POST https://{foreman-example-com}/api/registration_commands \ + --user username \ + -H 'Content-Type: application/json' \ + -d '{ "registration_command": { "activation_keys": ["key1, key2"] }}' +---- +endif::[] +ifdef::katello,satellite[] ++ +Use an activation key to simplify specifying the environments. +For more information about activation keys, see {ContentManagementDocURL}Managing_Activation_Keys_content-management[Managing Activation Keys] in the _Content Management Guide_. +endif::[] ++ +To enter password via command line argument, use `username:password` syntax. +Keep in mind this can save the password in the shell history. ++ +For more information about registration see {ManagingHostsDocURL}registering-a-host_managing-hosts[Registering a Host to {ProjectName}]. + +. Log on to the host you want register and run the command +. Check the `/etc/yum.repos.d/redhat.conf` and ensure that the appropriate repositories have been enabled. diff --git a/guides/common/modules/proc_registering-capsule-to-satellite-server.adoc b/guides/common/modules/proc_registering-capsule-to-satellite-server.adoc index 1d99d074fca..96057d96515 100644 --- a/guides/common/modules/proc_registering-capsule-to-satellite-server.adoc +++ b/guides/common/modules/proc_registering-capsule-to-satellite-server.adoc @@ -19,30 +19,4 @@ For more information on manifests and repositories, see {ContentManagementDocURL * The base operating system on which you want to install {SmartProxyServer} must not be configured to use a proxy to connect to the Red Hat CDN. * You must configure the host and network-based firewalls accordingly. For more information, see {InstallingSmartProxyDocURL}capsule-ports-and-firewalls-requirements_{smart-proxy-context}[Ports and Firewalls Requirements]. -* You must have a {ProjectServer} user name and password. -For more information, see {AdministeringDocURL}Configuring_External_Authentication_admin[Configuring External Authentication] in _Administering {ProjectName}_. - -.Procedure -. Download the `katello-ca-consumer-latest.noarch.rpm` package on the base operating system on which you want to install {SmartProxy}. -The consumer RPM configures the host to download content from the content source that is specified in {Project}. -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://_{foreman-example-com}_/pub/katello-ca-consumer-latest.noarch.rpm ----- -. Install the `katello-ca-consumer-latest.noarch.rpm` package: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# yum localinstall katello-ca-consumer-latest.noarch.rpm ----- -. Register the {SmartProxy} base operating system with the environments that you want {SmartProxy} to belong to. -Use an activation key to simplify specifying the environments. -For more information about activation keys, see {ContentManagementDocURL}Managing_Activation_Keys_content-management[Managing Activation Keys] in the _Content Management Guide_. -+ -[options="nowrap" subs="+quotes"] ----- -# subscription-manager register \ ---activationkey=_example_activation_key_ \ ---org=_My_Organization_ ----- +include::proc_host_registration_steps.adoc[leveloffset=+1] diff --git a/guides/common/modules/proc_registering-to-satellite-server.adoc b/guides/common/modules/proc_registering-to-satellite-server.adoc index 91eaf67dfb2..01ac905d0e0 100644 --- a/guides/common/modules/proc_registering-to-satellite-server.adoc +++ b/guides/common/modules/proc_registering-to-satellite-server.adoc @@ -20,27 +20,4 @@ For more information, see {InstallingSmartProxyDocURL}capsule-ports-and-firewall * You must have a {ProjectServer} user name and password. For more information, see {AdministeringDocURL}Configuring_External_Authentication_admin[Configuring External Authentication] in _Administering {ProjectName}_. -.Procedure -. Download the `katello-ca-consumer-latest.noarch.rpm` package on the base operating system on which you want to install {SmartProxy}. -The consumer RPM configures the host to download content from the content source that is specified in {Project}. -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://_{foreman-example-com}_/pub/katello-ca-consumer-latest.noarch.rpm ----- -. Install the `katello-ca-consumer-latest.noarch.rpm` package: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# yum localinstall katello-ca-consumer-latest.noarch.rpm ----- -. Register the {SmartProxy} base operating system with the environments that you want {SmartProxy} to belong to. -Use an activation key to simplify specifying the environments. -For more information about activation keys, see {ContentManagementDocURL}Managing_Activation_Keys_content-management[Managing Activation Keys] in the _Content Management Guide_. -+ -[options="nowrap" subs="+quotes"] ----- -# subscription-manager register \ ---activationkey=_example_activation_key_ \ ---org=_My_Organization_ ----- +include::proc_host_registration_steps.adoc[leveloffset=+1] diff --git a/guides/common/modules/proc_using-activation-keys-for-host-registration.adoc b/guides/common/modules/proc_using-activation-keys-for-host-registration.adoc index 6b3523c2d96..c7fbec242ec 100644 --- a/guides/common/modules/proc_using-activation-keys-for-host-registration.adoc +++ b/guides/common/modules/proc_using-activation-keys-for-host-registration.adoc @@ -8,33 +8,7 @@ The kickstart provisioning templates in {ProjectNameX} contain commands to regis * Registering existing Red Hat Enterprise Linux hosts. Configure Subscription Manager to use {ProjectServer} for registration and specify the activation key when running the `subscription-manager register` command. -.Procedure - -To use an activation key for host registration with an existing Red Hat Enterprise Linux 7 host to {ProjectServer}, complete the following steps: - -. Download the consumer RPM for your {ProjectServer}. -This is located in the `pub` directory on the host's web server. -For example, for a {ProjectServer} with the host name `{foreman-example-com}`, enter the following command on the host to register: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# rpm -Uvh _http://{foreman-example-com}_/pub/katello-ca-consumer-latest.noarch.rpm ----- -+ -This RPM installs the necessary certificates for accessing repositories on {ProjectServer} and configures Subscription Manager to use the server's URL. -. On the host, enter the following command to register the host to {Project} using the activation key: -+ -[options="nowrap" subs="+quotes"] ----- -# subscription-manager register --activationkey="_My_Activation_Key_" \ ---org="_My_Organization_" ----- -. To view a list of hosts for an organization, on {ProjectServer}, enter the following command: -+ -[options="nowrap" subs="+quotes"] ----- -# hammer host list --organization "_My_Organization_" ----- +include::proc_host_registration_steps.adoc[leveloffset=+1] .Multiple Activation Keys diff --git a/guides/doc-Configuring_Load_Balancer/topics/Registering_Clients.adoc b/guides/doc-Configuring_Load_Balancer/topics/Registering_Clients.adoc index 9382922bcda..a39dbc3ae42 100644 --- a/guides/doc-Configuring_Load_Balancer/topics/Registering_Clients.adoc +++ b/guides/doc-Configuring_Load_Balancer/topics/Registering_Clients.adoc @@ -6,11 +6,17 @@ For more information about registering clients and configuring them to use Puppe To register clients, proceed to one of the following procedures: +* xref:registering-clients-using-the-host-registration[] * xref:registering-clients-using-the-bootstrap-script[] * xref:registering-clients-manually[] +[id='registering-clients-using-the-host-registration'] +== {ProjectName} host registration + +include::../common/modules/proc_host_registration_steps.adoc[leveloffset=+1] + [id='registering-clients-using-the-bootstrap-script'] -== Registering Clients Using the Bootstrap Script +== **(Deprecated)** Registering Clients Using the Bootstrap Script To register clients, enter the following command on the client. You must complete the registration procedure for each client. @@ -59,7 +65,7 @@ For more information, see {ManagingHostsDocURL}Registering_a_Host_Using_the_Boot The script prompts for the password corresponding to the {Project} user name you entered with the `--login` option. [id='registering-clients-manually'] -== Registering Clients Manually +== **(Deprecated)** Registering Clients Manually with katello-ca-consumer rpm To register clients manually, complete the following procedure on each client that you register. diff --git a/guides/doc-Managing_Hosts/topics/Registering_Hosts.adoc b/guides/doc-Managing_Hosts/topics/Registering_Hosts.adoc index b7cf52ce646..10206261fa4 100644 --- a/guides/doc-Managing_Hosts/topics/Registering_Hosts.adoc +++ b/guides/doc-Managing_Hosts/topics/Registering_Hosts.adoc @@ -12,7 +12,7 @@ For more information about the remote execution jobs, see {ManagingHostsDocURL}c By using this method you can also configure hosts with Red{nbsp}Hat Insights during registration to {Project}. For more information about using Insights with {Project} hosts, see {ManagingHostsDocURL}Using_Red_Hat_Insights_with_Hosts_managing-hosts[Monitoring Hosts Using Red{nbsp}Hat Insights]. -. Download and install the consumer RPM `_server.example.com_/pub/katello-ca-consumer-latest.noarch.rpm` and then run Subscription Manager. +. *(Deprecated)* Download and install the consumer RPM `_server.example.com_/pub/katello-ca-consumer-latest.noarch.rpm` and then run Subscription Manager. This method is suited for hosts that haven't been provisioned through {Project}. . *(Deprecated)* Download and run the bootstrap script (_server.example.com_/pub/bootstrap.py). @@ -23,7 +23,6 @@ You can also register Atomic Hosts to {ProjectServer} or {SmartProxyServer}. Use one of the following procedures to register a host: * xref:registering-a-host_{context}[] -* xref:Registering_a_Host_Manually_{context}[] * xref:Registering_an_Atomic_Host_{context}[] * xref:Registering_a_Host_Using_the_Bootstrap_Script_{context}[] @@ -60,8 +59,6 @@ include::proc_registering-a-host.adoc[leveloffset=+1] include::ref_customizing-the-registration-templates.adoc[leveloffset=+2] -include::proc_registering-a-host-to-satellite-manually.adoc[leveloffset=+1] - include::proc_registering-an-atomic-host-to-satellite.adoc[leveloffset=+1] include::proc_registering-a-host-to-satellite-using-the-bootstrap-script.adoc[leveloffset=+1] diff --git a/guides/doc-Managing_Hosts/topics/proc_registering-a-host-to-satellite-manually.adoc b/guides/doc-Managing_Hosts/topics/proc_registering-a-host-to-satellite-manually.adoc deleted file mode 100644 index 9483bad6aec..00000000000 --- a/guides/doc-Managing_Hosts/topics/proc_registering-a-host-to-satellite-manually.adoc +++ /dev/null @@ -1,87 +0,0 @@ -[id="Registering_a_Host_Manually_{context}"] -= Registering a Host to {ProjectName} Manually - -Use the following procedure to manually register a host to {ProjectNameX}. - -.Prerequisites -* {ProjectServer}, any {SmartProxyServer}s, and all hosts must be synchronized with the same NTP server, and have a time synchronization tool enabled and running. -* The daemon *rhsmcertd* must be running on the hosts. -* An activation key must be available for the host. -For more information, see {ContentManagementDocURL}Managing_Activation_Keys_content-management[Managing Activation Keys] in the _Content Management Guide_. -* Subscription Manager must be version 1.10 or later. -The package is available in the standard Red{nbsp}Hat Enterprise Linux repository. - -.Procedure - -{RHEL} hosts register to the Red{nbsp}Hat Content Delivery Network by default. - -Update each host configuration so that they receive updates from the correct {ProjectServer} or {SmartProxyServer}: - -. Note the fully qualified domain name (FQDN) of {ProjectServer} or {SmartProxyServer}, for example _server.example.com_. -. Log in to the host as the `root` user and download the `katello-ca-consumer-latest.noarch.rpm` package from {ProjectServer} or {SmartProxyServer} to which the host is to be registered. -The consumer RPM configures the host to download content from the content source that is specified in {ProjectName}. -+ -[options="nowrap", subs="+quotes,attributes"] ----- -# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://_{foreman-example-com}_/pub/katello-ca-consumer-latest.noarch.rpm ----- -+ -. Install the `katello-ca-consumer-latest.noarch.rpm` package: -+ ----- -# yum localinstall katello-ca-consumer-latest.noarch.rpm ----- -+ -NOTE: The RPM package is not signed. -If required, you can add the `--nosignature` option to install the package. -The `katello-ca-consumer-_hostname_-1.0-1.noarch.rpm` package is an additional `katello-ca-consumer` RPM that contains the server's host name. -The `katello-ca-consumer-latest.noarch.rpm` package always reflects the most recent version. -Both serve the same purpose. - -. Clear any old host data related to Subscription Manager: -+ -[options="nowrap", subs="+quotes,verbatim,attributes"] ----- -# subscription-manager clean ----- -+ -. Register the host using RHSM: -+ -[options="nowrap", subs="+quotes,verbatim,attributes"] ----- -# subscription-manager register --org=_your_org_name_ \ ---activationkey=_your_activation_key_ ----- -+ -.Command Output after Registration: -==== -[options="nowrap", subs="+quotes,verbatim,attributes"] ----- -# subscription-manager register --org=MyOrg --activationkey=TestKey-1 -The system has been registered with id: 62edc0f8-855b-4184-b1b8-72a9dc793b96 ----- -==== - -[NOTE] -==== -You can use the `--environment` option to override the Content View and life cycle environment defined by the activation key. -For example, to register a host to the Content View "MyView" in a "Development" life cycle environment: - -[options="nowrap", subs="+quotes,verbatim,attributes"] ----- - # subscription-manager register --org=_your_org_name_ \ - --environment=Development/MyView \ - --activationkey=_your_activation_key_ ----- -==== - -[NOTE] -==== -For {RHEL} 6.3 hosts, the release version defaults to {RHEL}{nbsp}6 Server and needs to be pointed to the 6.3 repository: - -. In the {ProjectWebUI}, navigate to *Hosts* > *Content Hosts*. -. Select the check box next to the host that needs to be changed. -. From the *Select Action* list, select *Set Release Version*. -. From the *Release Version* list, select *6.3*. -. Click *Done*. -==== diff --git a/guides/doc-Managing_Hosts/topics/proc_registering-a-host.adoc b/guides/doc-Managing_Hosts/topics/proc_registering-a-host.adoc index c7a4ecd5624..cfa306ec0f3 100644 --- a/guides/doc-Managing_Hosts/topics/proc_registering-a-host.adoc +++ b/guides/doc-Managing_Hosts/topics/proc_registering-a-host.adoc @@ -17,6 +17,12 @@ ifdef::satellite,orcharhino[] * You must have an activation key created. * Optional: If you want to register hosts to Red{nbsp}Hat Insights, you must synchronize the `{RepoRHEL7Server}` repository and make it available in the activation key that you use. This is required to install the `insights-client` package on hosts. +* {ProjectServer}, any {SmartProxyServer}s, and all hosts must be synchronized with the same NTP server, and have a time synchronization tool enabled and running. +* The daemon *rhsmcertd* must be running on the hosts. +* An activation key must be available for the host. +For more information, see {ContentManagementDocURL}Managing_Activation_Keys_content-management[Managing Activation Keys] in the _Content Management Guide_. +* Subscription Manager must be version 1.10 or later. +The package is available in the standard Red{nbsp}Hat Enterprise Linux repository. endif::[] * Optional: If you want to register hosts through {SmartProxy}, ensure that the *Registration* and *Templates* features are enabled on this {SmartProxy}. + @@ -113,3 +119,16 @@ Copy the CA file to the `/etc/pki/ca-trust/source/anchors/` directory on hosts a # update-ca-trust ---- . On the hosts that you want to register, enter the `curl` command as `root`. + +ifdef::katello,satellite,orcharhino[] +[NOTE] +==== +For Red{nbsp}Hat Enterprise Linux 6.3 hosts, the release version defaults to Red{nbsp}Hat Enterprise{nbsp}Linux{nbsp}6 Server and needs to be pointed to the 6.3 repository: + +. In the {ProjectWebUI}, navigate to *Hosts* > *Content Hosts*. +. Select the check box next to the host that needs to be changed. +. From the *Select Action* list, select *Set Release Version*. +. From the *Release Version* list, select *6.3*. +. Click *Done*. +==== +endif::[]