Skip to content

Commit

Permalink
Use Global Registration instead of katello_ca_consumer rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
stejskalleos authored and lzap committed Nov 11, 2021
1 parent 6ae9cbb commit b88b60b
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 196 deletions.
26 changes: 1 addition & 25 deletions guides/common/modules/con_basic-content-management-workflow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
47 changes: 47 additions & 0 deletions guides/common/modules/proc_host_registration_steps.adoc
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
25 changes: 1 addition & 24 deletions guides/common/modules/proc_registering-to-satellite-server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
5 changes: 1 addition & 4 deletions guides/doc-Managing_Hosts/topics/Registering_Hosts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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}[]

Expand Down Expand Up @@ -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]
Expand Down

This file was deleted.

19 changes: 19 additions & 0 deletions guides/doc-Managing_Hosts/topics/proc_registering-a-host.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
+
Expand Down Expand Up @@ -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::[]

0 comments on commit b88b60b

Please sign in to comment.