This is an old revision of the document!
The purpose of this guide is to walk through necessary steps to install Foreman within the context of OPNFV. To read the full user guide please visit http://www.theforeman.org
Your provisioning server should have CentOS7 already installed (please use full install, not minimal). Before you install Foreman make sure you have some settings and packages:
Edit your yum.conf if your environment requires proxy:
vi /etc/yum.conf
Now add:
proxy=http://your_proxy_server:your_proxy_port
sudo yum update
sudo yum -y install bind-utils
sudo yum -y install bind
sudo yum -y install dhcp
sudo yum -y install tftp-server
Disable firewalld, selinux:
sudo systemctl stop firewalld
sudo systemctl disable firewalld
setenforce 0
edit SELINUX=permissive in /etc/selinux/config
Foreman requires your hostname and FQDN are set:
Edit the hostname and make the name of the host:
sudo vi /etc/hostname
and make it something like:
foreman.localdomain
Also make an entry in /etc/hosts:
sudo vi /etc/hosts
And add both FQDN and hostname:
192.168.22.130 foreman.localdomain foreman
In case the name changes have not taken place restart named service:
sudo systemctl restart systemd-hostnamed
Install puppet:
sudo rpm –httpproxy=your_proxy_server –httpport=your_proxy_port -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
Now you are ready to move on and add the foreman repository:
sudo yum -y install epel-release http://yum.theforeman.org/releases/1.7/el7/x86_64/foreman-release.rpm
and get the foreman installer:
sudo yum -y install foreman-installer
Now run the installer with the right arguments for your setup:
sudo foreman-installer
–enable-foreman-proxy
–foreman-proxy-tftp=true
–foreman-proxy-tftp-servername=192.168.122.130
–foreman-proxy-dhcp=true
–foreman-proxy-dhcp-interface=eth2
–foreman-proxy-dhcp-gateway=192.168.122.1
–foreman-proxy-dhcp-range="192.168.122.21 192.168.122.51"
–foreman-proxy-dhcp-nameservers="192.168.122.1"
–foreman-proxy-dns=true
–foreman-proxy-dns-interface=eth2
–foreman-proxy-dns-zone=localdomain
–foreman-proxy-dns-reverse=65.6.10.in-addr.arpa
–foreman-proxy-dns-forwarders=192.168.122.1
–foreman-proxy-foreman-base-url=https://localhost
–foreman-proxy-oauth-consumer-key=ag9QcrzYTZQVhsnuEb8zYVc6taL4jmXj
–foreman-proxy-oauth-consumer-secret=CWieWvBUMrfsvSc88UcmNTtrGtSzUCCf
You should see the following
Installing Done [100%] [……………………………………………………………………………….]
Success! * Foreman is running at https://foreman.localdomain Initial credentials are admin / N2cbeKHrMe9FNzdq * Foreman Proxy is running at https://foreman.localdomain:8443 * Puppetmaster is running at port 8140 The full log is at /var/log/foreman-installer/foreman-installer.log
Please notice the above message gives you the credentials to the Foreman GUI.
If you get a 401 Error, access the Foreman gui and go to Administer>Settings>Auth and copy the OAuth key and secrets and add them to the above foreman-installer command.
One thing that requires manual intervention is to go to Hosts→Installation Media and remove the minor version from the CentOS 7 entry as the minor version not only is not required but it also fail to access the http mirror for CentOS