# Foreman and Katello ###### tags: `foreman`, `katello` I have been working on RH Satellite with general user privilege. It locked me out from experiencing full functionality and feature. Therefore I install an open source version for lab use. *__NOTE__*: While writing this article, the latest Foreman version that is supported on CentOS 7 is 3.3. It might support 3.4 sooner or later. *__NOTE__*: According to foreman manual https://docs.theforeman.org/3.3/Installing_Server/index-katello.html, minimum 20GB RAM is required, and 4GB is required for installation. (I think for testing/lab purpose, 16GB should be ok to run most of services) Hostname: lab-foreman FQDN: lab-foreman.homelab.com VM Spec: - 4 vCPU - 20GB RAM - 64GB Disk #### Installing Foreman 3.3 with Katello 4.5 Plugin on CentOS 7 VM Set FQDN for the server ``` [root@lab-foreman ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.122.104 lab-foreman.homelab.com lab-foreman ``` Configure Repositories ``` [root@lab-foreman ~]# yum clean all [root@lab-foreman ~]# yum localinstall https://yum.theforeman.org/releases/3.3/el7/x86_64/foreman-release.rpm -y [root@lab-foreman ~]# yum localinstall https://yum.theforeman.org/katello/4.5/katello/el7/x86_64/katello-repos-latest.rpm -y [root@lab-foreman ~]# yum localinstall https://yum.puppet.com/puppet7-release-el-7.noarch.rpm -y [root@lab-foreman ~]# yum install epel-release centos-release-scl-rh -y ``` Running the installer ``` [root@lab-foreman ~]# yum update -y [root@lab-foreman ~]# yum install foreman-installer-katello -y [root@lab-foreman ~]# foreman-installer --scenario katello 2022-10-04 23:37:45 [NOTICE] [root] Loading installer configuration. This will take some time. 2022-10-04 23:37:48 [NOTICE] [root] Running installer with log based terminal output at level NOTICE. 2022-10-04 23:37:48 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions. 2022-10-04 23:44:39 [NOTICE] [configure] Starting system configuration. 2022-10-04 23:49:41 [NOTICE] [configure] 250 configuration steps out of 1354 steps complete. 2022-10-04 23:51:20 [NOTICE] [configure] 500 configuration steps out of 1356 steps complete. 2022-10-04 23:55:05 [NOTICE] [configure] 750 configuration steps out of 1362 steps complete. 2022-10-04 23:55:18 [NOTICE] [configure] 1000 configuration steps out of 1379 steps complete. 2022-10-05 00:04:06 [NOTICE] [configure] 1250 configuration steps out of 1379 steps complete. 2022-10-05 00:08:46 [NOTICE] [configure] System configuration has finished. Executing: foreman-rake upgrade:run ============================================= Upgrade Step 1/8: katello:correct_repositories. This may take a long while. ============================================= Upgrade Step 2/8: katello:clean_backend_objects. This may take a long while. 0 orphaned consumer id(s) found in candlepin. Candlepin orphaned consumers: [] ============================================= Upgrade Step 3/8: katello:upgrades:4.0:remove_ostree_puppet_content. ============================================= Upgrade Step 4/8: katello:upgrades:4.1:sync_noarch_content. ============================================= Upgrade Step 5/8: katello:upgrades:4.1:fix_invalid_pools. I, [2022-10-05T00:08:59.050249 #28771] INFO -- : Corrected 0 invalid pools I, [2022-10-05T00:08:59.050300 #28771] INFO -- : Removed 0 orphaned pools ============================================= Upgrade Step 6/8: katello:upgrades:4.1:reupdate_content_import_export_perms. ============================================= Upgrade Step 7/8: katello:upgrades:4.2:remove_checksum_values. ============================================= Upgrade Step 8/8: katello:upgrades:4.4:publish_import_cvvs. Success! * Foreman is running at https://lab-foreman.homelab.com Initial credentials are admin / diJqfkJVTxAcs2fm * To install an additional Foreman proxy on separate machine continue by running: foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar" * Foreman Proxy is running at https://lab-foreman.homelab.com:9090 The full log is at /var/log/foreman-installer/katello.log ``` ``` [root@lab-foreman ~]# firewall-cmd --permanent --add-port=443/tcp success [root@lab-foreman ~]# firewall-cmd --reload success ``` Access Web UI with the initial credentials from the installation output. ![](https://i.imgur.com/KBsLrRX.png) Just check memory usage after installation complete. ``` [root@lab-foreman ~]# free -m total used free shared buff/cache available Mem: 19915 6605 10504 88 2805 12875 Swap: 3967 0 3967 ``` #### Todo: - Sync a Github repo - Sync a Ubuntu APT Repository #### Reference: - https://access.redhat.com/articles/1365633 - https://theforeman.org/manuals/3.4/quickstart_guide.html - https://computingforgeeks.com/how-to-install-foreman-on-centos-rhel-7/ - https://docs.theforeman.org - https://docs.theforeman.org/3.3/Installing_Server/index-katello.html