Science and technology

Managing deb Content in Foreman

Foreman is a knowledge heart automation instrument to deploy, configure, and patch hosts. It depends on Katello for content material administration, which in flip depends on Pulp to handle repositories. See Manage content using Pulp Debian for extra info.

Pulp gives many plugins for various content material sorts, together with RPM packages, Ansible roles and collections, PyPI packages, and deb content material. The latter is known as the pulp_deb plugin.

Content administration in Foreman

The primary concept for offering content material to hosts is to reflect repositories and supply content material to hosts through both the Foreman server or hooked up Smart Proxies.

This tutorial is a step-by-step information to including deb content material to Foreman and serving hosts working Debian 10. “Deb content” refers to software program packages and errata for Debian-based Linux programs (e.g., Debian and Ubuntu). This article focuses on Debian 10 Buster however the directions additionally work for Ubuntu 20.04 Focal Fossa, except famous in any other case.

1. Create the working system

1.1. Create an structure

Navigate to Hosts > Architectures and create a brand new structure (if the structure the place you need to deploy Debian 10 hosts is lacking). This tutorial assumes your hosts run on the x86_64 structure, as Foreman does.

1.2. Create an set up media

Navigate to Hosts > Installation Media and create new Debian 10 set up media. Use the upstream repository URL http://ftp.debian.org/debian/.

Select the Debian working system household for both Debian or Ubuntu.

Alternatively, you may also use a Debian mirror. However, content material synced through Pulp doesn’t work for 2 causes: first, the linux and initrd.gz recordsdata aren’t within the anticipated places; second, the Release file shouldn’t be signed.

1.three. Create an working system

Navigate to Hosts > Operating Systems and create a brand new working system referred to as Debian 10. Use 10 as the foremost model and go away the minor model subject clean. For Ubuntu, use 20.04 as the foremost model and go away the minor model subject clean.

Select the Debian working system household for Debian or Ubuntu, and specify the discharge identify (e.g., Buster for Debian 10 or Stretch for Debian 9). Select the default partition tables and provisioning templates, i.e., Preseed default *.

1.four. Adapt default Preseed templates (optionally available)

Navigate to Hosts > Partition Tables and Hosts > Provisioning Templates and adapt the default Preseed templates if obligatory. Note that you might want to clone locked templates earlier than modifying them. Cloned templates won’t obtain updates with newer Foreman variations. All Debian-based programs use Preseed templates, that are included with Foreman by default.

1.5. Associate the templates

Navigate to Hosts > Provisioning Templates and seek for Preseed. Associate all desired provisioning templates to the working system. Then, navigate to Hosts > Operating Systems and choose Debian 10 because the working system. Select the Templates tab and affiliate any provisioning templates that you really want.

2. Synchronize content material

2.1. Create content material credentials for Debian upstream repositories and Debian shopper

Navigate to Content > Content Credentials and add the required GPG public keys as content material credentials for Foreman to confirm the deb packages’ authenticity. To get hold of the mandatory GPG public keys, confirm the Release file and export the corresponding GPG public key as follows:

  • Debian 10 foremost:

    wget http://ftp.debian.org/debian/dists/buster/Release && wget http://ftp.debian.org/debian/dists/buster/Release.gpg
    gpg --verify Release.gpg Release
    gpg --keyserver keys.gnupg.internet --recv-key 16E90B3FDF65EDE3AA7F323C04EE7237B7D453EC
    gpg --keyserver keys.gnupg.internet --recv-key 0146DC6D4A0B2914BDED34DB648ACFD622F3D138
    gpg --keyserver keys.gnupg.internet --recv-key 6D33866EDD8FFA41C0143AEDDCC9EFBF77E11517
    gpg --armor --export E0B11894F66AEC98 DC30D7C23CBBABEE DCC9EFBF77E11517 > debian_10_main.txt

  • Debian 10 safety:

    wget http://safety.debian.org/debian-security/dists/buster/updates/Release && wget http://safety.debian.org/debian-security/dists/buster/updates/Release.gpg
    gpg --verify Release.gpg Release
    gpg --keyserver keys.gnupg.internet --recv-key 379483D8B60160B155B372DDAA8E81B4331F7F50
    gpg --keyserver keys.gnupg.internet --recv-key 5237CEEEF212F3D51C74ABE0112695A0E562B32A
    gpg --armor --export EDA0D2388AE22BA9 4DFAB270CAA96DFA > debian_10_security.txt

  • Debian 10 updates:

    wget http://ftp.debian.org/debian/dists/buster-updates/Release && wget http://ftp.debian.org/debian/dists/buster-updates/Release.gpg
    gpg --verify Release.gpg Release
    gpg --keyserver keys.gnupg.internet --recv-key 16E90B3FDF65EDE3AA7F323C04EE7237B7D453EC
    gpg --keyserver keys.gnupg.internet --recv-key 0146DC6D4A0B2914BDED34DB648ACFD622F3D138
    gpg --armor --export E0B11894F66AEC98 DC30D7C23CBBABEE > debian_10_updates.txt

  • Debian 10 shopper:
    wget --output-document=debian_10_client.txt https://apt.atix.de/atix_gpg.pub

You can choose the respective ASCII-armored TXT recordsdata to add to your Foreman occasion.

2.2. Create merchandise referred to as Debian 10 and Debian 10 shopper

Navigate to Content > Hosts and create two new merchandise.

2.three. Create the mandatory Debian 10 repositories

Navigate to Content > Products and choose the Debian 10 product. Create three deb repositories:

  • Debian 10 foremost:
    • URL: http://ftp.debian.org/debian/
    • Releases: buster
    • Component: foremost
    • Architecture: amd64
  • Debian 10 safety:
    • URL: http://deb.debian.org/debian-security/
    • Releases: buster/updates
    • Component: foremost
    • Architecture: amd64

If you need, you possibly can add a self-hosted errata service: https://github.com/ATIX-AG/errata_server and https://github.com/ATIX-AG/errata_parser

  • Debian 10 updates:
    • URL: http://ftp.debian.org/debian/
    • Releases: buster-updates
    • Component: foremost
    • Architecture: amd64

Select the content material credentials that you simply created in step 2.1. Adjust the parts and structure as wanted. Navigate to Content > Products and choose the Debian 10 shopper product. Create a deb repository as follows:

  • Debian 10 subscription-manager
    • URL: https://apt.atix.de/Debian10/
    • Releases: steady
    • Component: foremost
    • Architecture: amd64

Select the content material credentials you created in step 2.1. The Debian 10 shopper accommodates the subscription-manager bundle, which runs on every content material host to obtain content material from the Foreman Server or an hooked up Smart Proxy. Navigate to apt.atix.de for additional directions.

2.four. Synchronize the repositories

If you need, you possibly can create a sync plan to sync the Debian 10 and Debian 10 shopper merchandise periodically. To sync the product as soon as, click on the Select Action > Sync Now button on the Products web page.

2.5. Create content material views

Navigate to Content > Content Views and create a content material view referred to as Debian 10 comprising the Debian upstream repositories created within the Debian 10 product and publish a brand new model. Do the identical for the Debian 10 shopper repository of the Debian 10 shopper product.

2.6. Create a composite content material view

Create a brand new composite content material view referred to as Composite Debian 10 comprising the beforehand printed Debian 10 and Debian 10 shopper content material views and publish a brand new model. You might optionally add different content material views of your selection (e.g., Puppet).

2.7. Create an activation key

Navigate to Content > Activation Keys and create a brand new activation key referred to as debian-10:

  • Select the Library lifecycle setting and add the Composite Debian 10 content material view.
  • On the Details tab, assign the right lifecycle setting and composite content material view.
  • On the Subscriptions tab, assign the mandatory subscriptions, i.e., the Debian 10 and Debian 10 shopper merchandise.

three. Deploy a bunch

three.1. Enable provisioning through Port 8000

Connect to your Foreman occasion through SSH and edit the next file:

/and many others/foreman-proxy/settings.yml

Search for :http_port: 8000 and ensure it’s not commented out (i.e., the road doesn’t begin with a #).

three.2. Create a bunch group

Navigate to Configure > Host Groups and create a brand new host group referred to as Debian 10. Check out the Foreman documentation on creating host groups, and ensure to pick out the right entries on the Operating System and Activation Keys tabs.

three.three. Create a brand new host

Navigate to Hosts > Create Host and both choose the host group as described above or manually enter the similar info.

Tip: Deploying hosts working Ubuntu 20.04 is even simpler, as you should utilize its official set up media ISO picture and do offline installations. Check out orcharhino’s Managing Ubuntu Systems Guide for extra info.

ATIX has developed a number of Foreman plugins, and is an integral a part of the Foreman open source ecosystem. The neighborhood’s suggestions on our contributions is handed again to our clients, as we repeatedly try to enhance our downstream product, orcharhino.

Most Popular

To Top