Install Foreman en Almalinux 8
Basico
Definir hostname
[root@foreman-bd ~]# hostnamectl set-hostname foreman-bd.uclv.hpc.cu
Editar el fichero hosts y adicionar: 192.168.206.101 foreman-bd.uclv.hpc.cu
[root@foreman-bd ~]# nano /etc/hosts
192.168.206.101 foreman-bd.uclv.hpc.cu
Configurar NTP y sincronizar
[root@foreman-bd ~]# timedatectl set-timezone America/Havana
[root@foreman-bd ~]# dnf -y install chrony
Adicionar a /etc/chrony.conf: pool 10.12.1.250 iburst
[root@foreman-bd ~]# nano /etc/chrony.conf
pool 10.12.1.250 iburst
[root@foreman-bd ~]# systemctl enable --now chronyd
[root@foreman-bd ~]# systemctl restart chronyd
[root@foreman-bd ~]# chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* rt-internet-1.uclv.cu 2 6 377 29 -1382us[-2999us] +/- 104ms
Deshabilitar SELinux
[root@foreman-bd ~]# nano /etc/sysconfig/selinux
SELINUX=permissive
[root@foreman-bd ~]# setenforce 0
Revisar estado del firewall
[root@foreman-bd ~]# firewall-cmd --add-port={7,22,53,80,389,623,636,443,3000,3306,5432,5646,5671,7911,8000,8140,8443,9090,16514,5000,5900-5930}/tcp --permanent
[root@foreman-bd ~]# firewall-cmd --add-port={53,623,67-69}/udp --permanent
[root@foreman-bd ~]# firewall-cmd --reload
Habilitar repositorio de puppet 7.x
[root@foreman-bd ~]# dnf localinstall https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
Habilitar repositorio de Foreman
[root@foreman-bd ~]# dnf localinstall https://yum.theforeman.org/releases/3.3/el8/x86_64/foreman-release.rpm
Habilitar repositorio de Katello
[root@foreman-bd ~]# dnf localinstall https://yum.theforeman.org/katello/4.5/katello/el8/x86_64/katello-repos-latest.rpm
Habilitar repositoriopowertools
[root@foreman-bd ~]# dnf config-manager --set-enabled powertools
Habilitar los modulos de Katello y Pulpcore
[root@foreman-bd ~]# dnf module enable katello:el8 pulpcore:el8
Instalar Rubi en el sistema
[root@foreman-bd ~]# dnf module reset ruby
[root@foreman-bd ~]# dnf module enable ruby:2.7
[root@foreman-bd ~]# dnf install ruby -y
Instalar el instalador de Foreman
[root@foreman-bd ~]# dnf install foreman-installer-katello
Instalar foreman en modo no-interactivo
[root@foreman-bd ~]# foreman-installer --scenario katello \
--foreman-initial-organization "UCLV" \
--foreman-initial-location "DataCenter"
Instalar foreman interactivo
[root@foreman-bd ~]# foreman-installer -i --scenario katello --foreman-initial-organization "UCLV" --foreman-initial-location "DataCenter"
2022-09-19 21:17:45 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-09-19 21:17:51 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-09-19 21:17:51 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
Welcome to the Katello installer!
---------------------------------
This wizard will gather all required information. You can change any parameter
to your needs.
Ready to start? (y/n)
y
Main Config Menu
1. [✓] Configure certs
2. [✓] Configure foreman
3. [✓] Configure foreman_cli
4. [✓] Configure foreman_cli_ansible
5. [✗] Configure foreman_cli_azure
6. [✗] Configure foreman_cli_discovery
7. [✗] Configure foreman_cli_host_reports
8. [✓] Configure foreman_cli_katello
9. [✓] Configure foreman_cli_kubevirt
10. [✗] Configure foreman_cli_openscap
11. [✓] Configure foreman_cli_puppet
12. [✓] Configure foreman_cli_remote_execution
13. [✓] Configure foreman_cli_tasks
14. [✓] Configure foreman_cli_templates
15. [✗] Configure foreman_cli_virt_who_configure
16. [✗] Configure foreman_cli_webhooks
17. [✗] Configure foreman_compute_ec2
18. [✗] Configure foreman_compute_gce
19. [✗] Configure foreman_compute_libvirt
20. [✗] Configure foreman_compute_openstack
21. [✗] Configure foreman_compute_ovirt
22. [✗] Configure foreman_compute_vmware
23. [✗] Configure foreman_plugin_acd
24. [✓] Configure foreman_plugin_ansible
25. [✗] Configure foreman_plugin_azure
26. [✓] Configure foreman_plugin_bootdisk
27. [✗] Configure foreman_plugin_chef
28. [✗] Configure foreman_plugin_column_view
29. [✗] Configure foreman_plugin_default_hostgroup
30. [✗] Configure foreman_plugin_discovery
31. [✗] Configure foreman_plugin_expire_hosts
32. [✗] Configure foreman_plugin_hooks
33. [✗] Configure foreman_plugin_host_reports
34. [✓] Configure foreman_plugin_kubevirt
35. [✗] Configure foreman_plugin_leapp
36. [✗] Configure foreman_plugin_memcache
37. [✗] Configure foreman_plugin_monitoring
38. [✗] Configure foreman_plugin_openscap
39. [✓] Configure foreman_plugin_puppet
40. [✓] Configure foreman_plugin_puppetdb
41. [✓] Configure foreman_plugin_remote_execution
42. [✓] Configure foreman_plugin_remote_execution_cockpit
43. [✗] Configure foreman_plugin_rh_cloud
-- press enter/return to continue or q to stop --
44. [✗] Configure foreman_plugin_salt
45. [✗] Configure foreman_plugin_setup
46. [✗] Configure foreman_plugin_snapshot_management
47. [✗] Configure foreman_plugin_statistics
48. [✓] Configure foreman_plugin_tasks
49. [✓] Configure foreman_plugin_templates
50. [✗] Configure foreman_plugin_virt_who_configure
51. [✗] Configure foreman_plugin_webhooks
52. [✓] Configure foreman_proxy
53. [✓] Configure foreman_proxy_content
54. [✗] Configure foreman_proxy_plugin_acd
55. [✗] Configure foreman_proxy_plugin_ansible
56. [✗] Configure foreman_proxy_plugin_chef
57. [✗] Configure foreman_proxy_plugin_dhcp_infoblox
58. [✗] Configure foreman_proxy_plugin_dhcp_remote_isc
59. [✗] Configure foreman_proxy_plugin_discovery
60. [✗] Configure foreman_proxy_plugin_dns_infoblox
61. [✗] Configure foreman_proxy_plugin_monitoring
62. [✗] Configure foreman_proxy_plugin_openscap
63. [✗] Configure foreman_proxy_plugin_remote_execution_script
64. [✗] Configure foreman_proxy_plugin_reports
65. [✗] Configure foreman_proxy_plugin_salt
66. [✗] Configure foreman_proxy_plugin_shellhooks
67. [✓] Configure katello
68. [✗] Configure puppet
69. Display current config
70. Save and run
71. Cancel run without Saving
Choose an option from the menu... 70
2022-09-19 21:18:06 [NOTICE] [configure] Starting system configuration.
2022-09-19 21:18:20 [NOTICE] [configure] 250 configuration steps out of 1430 steps complete.
2022-09-19 21:18:23 [NOTICE] [configure] 500 configuration steps out of 1432 steps complete.
2022-09-19 21:18:26 [NOTICE] [configure] 750 configuration steps out of 1437 steps complete.
2022-09-19 21:19:16 [NOTICE] [configure] 1000 configuration steps out of 1441 steps complete.
2022-09-19 21:26:19 [NOTICE] [configure] 1250 configuration steps out of 1441 steps complete.
2022-09-19 21:28:26 [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-09-19T21:28:45.828925 #19565] INFO -- : Corrected 0 invalid pools
I, [2022-09-19T21:28:45.828970 #19565] 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://foreman-bd.uclv.hpc.cu
Initial credentials are admin / SUPERPASSWORD
* 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://foreman-bd.uclv.hpc.cu:9090
The full log is at /var/log/foreman-installer/katello.log