Ricozome Wiki

Piste:

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
pages_it:provisioning:theforeman [2017/09/07 12:48]
ebelhomme
pages_it:provisioning:theforeman [2017/09/08 07:20] (Version actuelle)
ebelhomme [The Foreman installation with Katello support]
Ligne 11: Ligne 11:
  
 More readings : More readings :
 +  * https://theforeman.org/
 +  * https://theforeman.org/plugins/katello/index.html
   * https://access.redhat.com/documentation/fr-FR/Red_Hat_Satellite/6.0/html-single/Installation_Guide/   * https://access.redhat.com/documentation/fr-FR/Red_Hat_Satellite/6.0/html-single/Installation_Guide/
   * https://www.linuxtechi.com/katello-download-yum-repositories-register-clients-for-patching/   * https://www.linuxtechi.com/katello-download-yum-repositories-register-clients-for-patching/
Ligne 17: Ligne 19:
  
 === Software === === Software ===
 +
 Foreman/Katello install on amd64 arch excusively, and can run on RHEL/CentOS 6 or 7. Foreman/Katello install on amd64 arch excusively, and can run on RHEL/CentOS 6 or 7.
  
 === Hardware === === Hardware ===
 +
 12GB are highly recommended. 12GB are highly recommended.
  
Ligne 27: Ligne 31:
  
 === Storage === === Storage ===
-^ mountpoint  ^  size  ^ comments  ^+
 Red Hat strongly recommends to use **LVM** for partitioning, and **XFS** as filesystem for storage and database. Red Hat strongly recommends to use **LVM** for partitioning, and **XFS** as filesystem for storage and database.
  
 +^ mountpoint  ^  size  ^ comments  ^
 | /  |  10GB  | base system  | | /  |  10GB  | base system  |
 | /var/lib/pulp  |  500GB+  | storage for mirrored repositories | | /var/lib/pulp  |  500GB+  | storage for mirrored repositories |
Ligne 157: Ligne 162:
 Then click on //**Save**// button. Then click on //**Save**// button.
 <newcolumn> <newcolumn>
-{{ :pages_it:provisioning:foreman_sync_3.png?direct&600|}}+{{ :pages_it:provisioning:foreman_sync_3.png?direct|}}
 </columns> </columns>
 ---- ----
  
 === GPG key === === GPG key ===
 +
 +We need to import the GPG key used by the remote repository. In our case, the GPG key is accessible on 
 http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
 +
 +<columns - ->
 +On the Menu bar, click on //**Content**//, then on //**GPG Keys**// menu item
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_gpg_1.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Click on //**Create GPG Key**// Button
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_gpg_2.png?direct&600|}}
 +</columns>
 +----
 +<columns - ->
 +Fill the form with the following informations :
 +  * **Name** : a name for the GPG key to create,
 +  * **GPG Key content** : you can copy & paste the content of the GPG key in the form, of you can use the //**Upload**// button to upload the GPG key.
 +
 +Then click on //**Save**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_gpg_3.png?direct|}}
 +</columns>
 +----
  
 === Product === === Product ===
  
-Dowbload policy  +<columns - -> 
-  * **On demand** : only repo's metadata are downloaded from the remote repositorythen packages are fetched and stored on local FS only when clients request them+On the Menu bar, click on //**Content**//, then on //**Products**// menu item 
-  * **Background** : repo's metadata are downloaded from the remote repositorythen packages are downloaded as a background task after the initial sync, +<newcolumn> 
-  * **Immediate** : both repo's metadata and packages are downloaded.+{{ :pages_it:provisioning:foreman_product_1.png?direct|}} 
 +</columns> 
 +---- 
 +<columns - -> 
 +Click on //**Create Product**// Button 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_product_2.png?direct&600|}} 
 +</columns> 
 +---- 
 +<columns - -> 
 +Fill the form with the following informations : 
 +  * **Name** : the name for the product, 
 +  * **Label** : the label used internammy by Foreman
 +  * **GPG Key** : select with the drop-down list the relevant GPG key, 
 +  * **Sync Plan** : select with the drop-down list the relevant sync pla to apply to this product
 +  * **Description** : put a description for this product.
  
-=== Environment ===+Then click on //**Save**// button. 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_product_3.png?direct|}} 
 +</columns> 
 +---- 
 +<columns - -> 
 +One the product is created, the user is automatically directed to the //**Repositories**// pane. At this time there is not yet any configured repository, so let's create one by clicking on the //**New Repository**// button : 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_product_4.png?direct|}} 
 +</columns> 
 +---- 
 +<columns - - -> 
 +Fill the form with the following informations : 
 +  * **Name** : a name for the repository, 
 +  * **Label** : the label used internammy by Foreman, 
 +  * **Type** : select //**yum**// on the drop-down menu, 
 +  * **URL** : enter here the URL of the Yum repository to mirror 
 +  * **Dowbload policy** 
 +    * **On demand** : only repo's metadata are downloaded from the remote repository, then packages are fetched and stored on local FS only when clients request them, 
 +    * **Background** : repo's metadata are downloaded from the remote repository, then packages are downloaded as a background task after the initial sync, 
 +    * **Immediate** : both repo's metadata and packages are downloaded. 
 +  * **GPG Key** : Select with the drop-down menu the GPG key to use with this repository. 
 + 
 +Then click on //**Save**// button. 
 +<newcolumn> 
 +{{:pages_it:provisioning:foreman_product_5.png?direct|}} 
 +<newcolumn> 
 +{{:pages_it:provisioning:foreman_product_6.png?direct|}} 
 +</columns> 
 +---- 
 + 
 +=== Lifecycle Environments === 
 + 
 +<columns - -> 
 +On the Menu bar, click on //**Content**//, then on //**LifeCycle Environments**// menu item 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_lifecycle_1.png?direct|}} 
 +</columns> 
 +---- 
 +<columns - -> 
 +Click on //**Create Environment Path**// Button 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_lifecycle_2.png?direct&600|}} 
 +</columns> 
 +---- 
 +<columns - -> 
 +Fill the form with the following informations : 
 +  * **Name** : a name for the environment, 
 +  * **Label** : the label used internammy by Foreman, 
 +  * **Description** : a description 
 + 
 +Then click on //**Save**// button. 
 +<newcolumn> 
 +{{ :pages_it:provisioning:foreman_lifecycle_3.png?direct|}} 
 +</columns> 
 +----
  
 === Content View === === Content View ===
 +
 +<columns - ->
 +On the Menu bar, click on //**Content**//, then on //**Content Views**// menu item
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_1.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Click on //**Create New View**// Button
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_2.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Fill the form with the following informations :
 +  * **Name** : a name for the view,
 +  * **Label** : the label used internammy by Foreman,
 +  * **Description** : a description
 +Then click on //**Save**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_3.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Once the view is created, go on the //**Yum Content**// pane, then select the //**Add**// pane from the //**Repository Selection**//
 +
 +Then select the repositories to include into the view (in the example below, //base// and //updates// repositories from CentOS 7 Product are selected.
 +
 +Finally, click on //**Add Repositories**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_4.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +go on the //**Versions**// pane, then click on //**Publish New Version**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_5.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Fill the //**Description**// form, then click on //**Save**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_6.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +The version is going to be published. This may take a while.
 +
 +When the publshing procedure is completed, you can click on the //**Promote**// button for the Version 1.0.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_7.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Select the right //library// by clicking on the checkbox, then click on //**Promote Version**//.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_contentview_8.png?direct|}}
 +</columns>
 +----
  
 === Activation keys === === Activation keys ===
  
 +<columns - ->
 +On the Menu bar, click on //**Content**//, then on //**Activation Keys**// menu item
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_activationkeys_1.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Click on //**Create Activation Key**// Button
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_activationkeys_2.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Fill the form with the following informations :
 +  * **Name** : The name of the activation key,
 +  * **Unlimited Hosts** : check the box if you don't need to restrict the ammount of clients registered,
 +  * **Description** : put a descriptive text,
 +  * **Environment** : select the desired environments.
 +
 +Then click on //**Save**// button.
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_activationkeys_3.png?direct|}}
 +</columns>
 +----
 +<columns - ->
 +Once the key is created, it can be used to register client hosts to this system by using the following command :
 +<code>
 +subscription-manager register --org="orga_axians_aix" --activationkey="Axians Aix production key"
 +</code>
 +<newcolumn>
 +{{ :pages_it:provisioning:foreman_activationkeys_4.png?direct|}}
 +</columns>
 +----
 ==== Configure client host ==== ==== Configure client host ====
  
-  Install necessary packages+=== Prerequisites === 
 + 
 +The target system must have the required package installed prior registration : 
 +  **subscription-manager** normally comes from distribution's official repository or installation media, 
 +  * **katello-ca-consumer-katello.xxx** must by downloaded from the Katello server itself. 
 + 
 +In the following example, the Foreman/Katello server IP address is **192.168.122.178** and its FQDN is **katello.internal.lan** :
 <code shell> <code shell>
 yum install -y subscription-manager yum install -y subscription-manager
Ligne 185: Ligne 383:
 </code> </code>
  
-  * register the server to Katello server+=== Client registration === 
 + 
 +In order to register a client host to Katello, you need to provide the following elements : 
 +  * the **oraganization** name, in our example, the organization name is //**orga_axians_aix**//, 
 +  * the **activation key**. in our axample,  the key is "**Axians Aix production key**"
 <code shell> <code shell>
 subscription-manager register --org="orga_axians_aix" --activationkey="Axians Aix production key" subscription-manager register --org="orga_axians_aix" --activationkey="Axians Aix production key"
Ligne 193: Ligne 395:
 </code> </code>
  
-List available subscriptions :+=== List available subscriptions ===
  
 <code> <code>
Ligne 215: Ligne 417:
 </code> </code>
  
-Attach to a subscription :+=== Attach to a subscription ===
 <code> <code>
   subscription-manager attach --pool=4028fa325e577a77015e5b0d989a0025   subscription-manager attach --pool=4028fa325e577a77015e5b0d989a0025
   Successfully attached a subscription for: EPEL7 for CentOS/RHEL   Successfully attached a subscription for: EPEL7 for CentOS/RHEL
 </code> </code>