deb Content in orcharhino

orcharhino use the Katello plugin for content management, which in turn relies on Pulp to manage repositories. Pulp itself uses different plugins for different content types, including RPM packages, files, and deb content. The latter is called pulp_deb plugin.

Content Management in orcharhino
The base idea to provide content to hosts is to mirror repositories and provide content to hosts either via the orcharhino server or attached orcharhino proxies.

This tutorial shows step by step how to add deb content to orcharhino and serve hosts running Debian 10. deb content refers to software packages and errata for Debian-based Linux systems, e.g. Debian and Ubuntu. The article focuses on Debian 10 Buster, but also works for Ubuntu 20.04 Focal Fossa, too, unless noted otherwise.

1. Creating Operating System

1.1. Create an architecture.
Navigate to Hosts > Architectures and create a new architecture if the architecture you want to deploy Debian 10 hosts on is missing. This tutorial assumes your hosts run on the x86_64 architecture, as does orcharhino itself.

1.2. Create an installation media.
Navigate to Hosts > Installation Media and create a new Debian 10 installation media.
Use the following upstream repository URL:
Select the Debian operating system family for both Debian and Ubuntu. Alternatively, you can also use a Debian Mirror. However, synced content via Pulp does not work for two reasons: first, the linux and initrd.gz file are not in the expected locations; second, the Release file is not signed.

1.3. Create an operating system.
Navigate to Hosts > Operating Systems and create a new operating system called Debian 10.
Use 10 as major version and leave out the minor version field. For Ubuntu, use 20.04 as major version and also leave out the minor version field. Select the Debian operating system family for both Debian and Ubuntu and specify the release name (e.g. Buster for Debian 10 or Stretch for Debian 9)
Select the default partition tables and provisioning templates, i.e. Preseed default *.

1.4. (Optional) Adapt default Preseed Templates.
Navigate to Hosts > Partition Tables and Hosts > Provisioning Templates and adapt the default Preseed templates if necessary. Note that you need to clone locked templates before editing them. Cloned templates will not receive updates with newer Foreman versions.
All Debian-based systems use Preseed templates which are included with orcharhino by default.

1.5. Associate Templates.
Navigate to Hosts > Provisioning Templates and search for Preseed. Associate all desired provisioning templates to the operating system. Then, navigate to Hosts > Operating Systems and select the Debian 10 operating system entry. Select the Templates tab and associate any desired provisioning templates.

2. Synchronize Content

2.1. Create content credentials for Debian upstream repositories and Debian client. 

Navigate to Content > Content Credentials and add the required GPG public keys as content credential for orcharhino to verify the authenticity of the deb packages. To obtain the necessary GPG public keys, simply verify the Release file yourself and export the corresponding GPG public key as follows:

Debian 10 main:
 wget && wget     
 gpg --verify Release.gpg Release
 gpg --keyserver --recv-key 16E90B3FDF65EDE3AA7F323C04EE7237B7D453EC
 gpg --keyserver --recv-key 0146DC6D4A0B2914BDED34DB648ACFD622F3D138
 gpg --keyserver --recv-key 6D33866EDD8FFA41C0143AEDDCC9EFBF77E11517
 gpg --armor --export E0B11894F66AEC98 DC30D7C23CBBABEE DCC9EFBF77E11517 >                                       debian_10_main.txt
Debian 10 security:
 wget && wget
 gpg --verify Release.gpg Release
 gpg --keyserver --recv-key 379483D8B60160B155B372DDAA8E81B4331F7F50
 gpg --keyserver --recv-key 5237CEEEF212F3D51C74ABE0112695A0E562B32A
 gpg --armor --export EDA0D2388AE22BA9 4DFAB270CAA96DFA > debian_10_security.txt
Debian 10 updates:
wget && wget
 gpg --verify Release.gpg Release
 gpg --keyserver --recv-key 16E90B3FDF65EDE3AA7F323C04EE7237B7D453EC
 gpg --keyserver --recv-key 0146DC6D4A0B2914BDED34DB648ACFD622F3D138
 gpg --armor --export E0B11894F66AEC98 DC30D7C23CBBABEE > debian_10_updates.txt
Debian 10 client:
Debian 10 orcharhino client GPG key: see ATIX Service Portal

You can select the respective ascii-armored .txt files for upload to your orcharhino.

2.2. Create products called Debian 10 and Debian 10 client.
Navigate to Content > Hosts and create two new products.

2.3. Create the necessary Debian 10 repositories.
Navigate to Content > Products and select the Debian 10 product.
Create three repositories of type deb as follows:

Debian 10 main:
   Releases: buster
   Component: main
   Architecture: amd64
Debian 10 security:
  Releases: buster/updates
  Component: main
  Architecture: amd64
Debian 10 updates:
  Releases: buster-updates
  Component: main
  Architecture: amd64
Select the corresponding content credentials as created in step 2.1. Adjust the component and architecture as required. Navigate to Content > Products and select the Debian 10 client product.
Create a repository of type deb as follows:

Debian 10 orcharhino client
URL: see ATIX Server Portal
Releases: stable
Component: main
Architecture: amd64

Select the corresponding content credentials as created in step 2.1.

2.4. Synchronize the repositories.
You may optionally create a sync plan to sync the Debian 10 and Debian 10 client products periodically.
To sync the product once, click the Select Action > Sync Now button on the products page.

2.5. Create content views.
Navigate to Content > Content Views and create a content view called Debian 10 comprising the Debian upstream repositories created in the Debian 10 product and publish a new version.
Do the same for the Debian 10 client repository of the Debian 10 client product.

2.6. Create a composite content view.
Create a new composite content view called Composite Debian 10 comprising the previously published Debian 10 and Debian 10 client content views and publish a new version.
You may optionally add further content views of your choice (e.g. Puppet).

2.7. Create an activation key.
Navigate to Content > Activation Keys and create a new activation key called debian-10 as follows.
Select the Library lifecycle environment and add the Composite Debian 10 content view.
On the Details tab, assign the correct lifecycle environment and composite content view.
On the Subscriptions tab, assign the necessary subscriptions, i.e. the Debian 10 and Debian 10 client products.

3. Deploy a Host.
3.1. Create a host group.
Navigate to Configure > Host Groups and create a new host group called Debian 10.
Check out the orcharhino documentation on how to create host groups and make sure to select the correct entries on the Operating System and Activation Keys tabs.

3.2. Create a new host.
Navigate to Hosts > Create Host and either select the host group as described above or manually enter the identical information. Refer to the provisioning guide  for more information.

Deploying hosts running Ubuntu 20.04 is even easier as you can use their official installation media .iso image and therefore perform offline installations. Refer to the managing Ubuntu systems guide for more information.

This post is also available in: Englisch