Foreman Blog

Building Ubuntu Using Katello File Repo

NOTE: This blog post describes how to use Katello 3.5 to host Ubuntu repos, and is aimed at those wanting to get Apt repo support going without upgrading. If you are using a later version of Katello, it may already support deb packages natively.

Building Ubuntu Using Katello File Repo

I have an offline network and need to build both RPM based systems and DEB based systems. Instead of installing Katello to handle rpms, and something else to handle debs, I set up Katello to handle both.

Get Local Copy of Repo

I created a script to do this for me, with following assumptions:

  • Using box that has debmirror installed
    • Installing this on a Fedora box required me to remove /etc/debmirror.conf for this script to work
  • Has rsync installed
  • Media is mounted at /mnt has enough space to copy the repo
  • The example is downloading xenial, but can be duplicated to do other releases.
  • /mnt has a copy of file_repogen.rb

    #!/bin/bash
     arch=amd64
     section=main,restricted,universe,multiverse,main/debain-installer,universe/debian-installer,multiver/debian-installer,restricted/debian-installer
     release=xenial,xenial-updates
     server=us.archive.ubuntu.com
     inpath=/ubuntu
     outpath=/mnt/ubuntu/xenial
    
     debmirror --arch=$arch \
     	    --no-source \
     	    --section=$section \
     	    --host=$server \
     	    --dist=$release \
     	    --di-dist=dists \
     	    --di-arch=arches \
     	    --root=$inpath \
     	    --progress \
     	    --ignore-release-gpg \
     	    --no-check-gpg \
     	    --exclude-deb-section=games \
     	    --exclude=sid \
     	    --method=rsync \
     	    $outpath
    
    for i in $(echo $release | sed “s/,/ /g”); do rsync -L –progress –exclude=*i386 -a rsync://$server/ubuntu/dists/$i $outpath/dists/ done /mnt/file_repogen.rb /mnt/ubuntu/xenial

Import into Katello

Your repo has been downloaded and prepped with a pulp_manifest so it’s ready to be imported into Katello.

I created a product called Ubuntu and made a repository for each Ubuntu Distro I was trying to use. In this case, I have a repo called xenial. The type is file and the url is pointed to the media I have made available on my system. Then I start the sync and slowly sync the repo.

  • Issues: /var/spool/pulp stores a copy of the files as it syncs, which I did not give enough space to since it was not listed in the katello installer documentation. Due to this, it takes many many failed syncs to sync all the files.

Set up the Foreman Info

  • Update the Ubuntu Mirror Installation media to http://foreman/pulp/isos/Default_Organization-Ubuntu-$release/
  • Add your operating system to foreman

Build a Host

You should now be able to build a host selecting Ubuntu as an operating system and it will build off your local media.

update - Getting Foreman search results into your Puppet manifest

How to use the Foreman search language inside Puppet manifests and get information about other nodes. This page is an update of the previous post written by Ohad Levy

2018 Foreman Survey Analysis

As with previous years, we ran a Foreman Community Survey in order to give you all the opportunity to tell us how we’re doing - where it’s good, and where it’s bad. That survey closed a while ago, and I’m here to show you the results.

Foreman Community Newsletter - May 2018

Foreman 1.17.1, Katello 3.5.2, GDPR, Summit, and all the usual goodies.

Load-Balanced Smart Proxies with HAProxy

In production Foreman and Katello setups you might like to load balance the work of Smart Proxies across a cluster. This post describes how to do this, utilizing Foreman 1.17, Katello 3.6 and HAProxy.

Foreman 1.18.0-RC1 has been released! Follow the quick start to install it. and follow the quick start guide to install it.

Foreman 1.17.1 is now available with several bugfixes. Follow the quick start to install it.

A new bug fix release for Foreman 1.16 is now available. This release contains fixes for 2 security bugs and other minor patches. See the Foreman 1.16.1 release notes for more details..