Foreman is a provisioning and complete life cycle management orchestration tool for managing infrastructure from a graphical interface and also from command line tool hammer-cli.
With computing resources in foreman supports managing different type of hosts like vmware, aws, baremetal, kvm, docker etc. to name a few.
Under the hood foreman uses DHCP, TFTP, PXE which are part of foreman-proxy, a component used to provision the choice of operating system to the hosts. The advantages of foreman it has puppet built in that can be used to provisioned hosts to manage via puppet for any configuration management after installation.
Installing foreman on centos 7. Before we begin with the install make sure hostname is set to unique other than localhost.localdomain:
hostnamectl set-hostname cipher.sand.box
Add the required repos for foreman:
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
rpm -ivh http://yum.theforeman.org/releases/1.9/el7/x86_64/foreman-release.rpm
yum install foreman-installer
To enable foreman-proxy execute the below command:
foreman-installer --enable-foreman-proxy
Adding firewall rules to allow foreman services:
firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --permanent --add-port=67-69/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=3000/tcp
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --permanent --add-port=5910-5930/tcp
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=8140/tcp
firewall-cmd --permanent --add-port=8443/tcp
firewall-cmd --reload
After the settings foreman can be accessed from https://ip.ip.ip.ip or https://server.sand.box hostname.
Related Articles
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.
Building a Predictable KVM Infrastructure: From Chaos to Control
How to engineer a predictable KVM-based infrastructure focusing on repeatability, observability, and operational safety.
Modular vagrant file
How to structure a modular Vagrantfile using separate .rb config files for resources, disks, and networks.