Foreman: Advanced Integration with RHEV-M – Part 2 of 2

Here is part 2…

Source: Advanced Integration with RHEV-M – Part 2 of 2

Foreman: Advanced integration with Red Hat Enterprise Virtualization Manager (RHEV-M) – Part 1 of 2

Interesting read for those who want to integrate Foreman into their RHEV environment.  I’m still working on figuring out the exact benefits of doing so, but this this seems like its the go-to guide to reference.

Source: Advanced integration with Red Hat Enterprise Virtualization Manager (RHEV-M) – Part 1 of 2

How to Add Standalone Puppet Agents to Foreman

foreman_medium
This example will walk us through the process of adding a standalone Puppet host to Foreman for the purpose of managing the host through Puppet. In this instance we are going to create a standalone-hostgroup for the server.

Note that the Foreman server must be able listening on ports 8140, and 6163 (according to Puppet documentation). My RHEL7 Foreman host was listening on these ports, but the firewall was blocking any inbound connections. I corrected this with the commands shown below.

First I needed to determine my default firewalld zone.

# firewall-cmd –get-default-zone

Then I ran the commands below to punch a hole in the firewall to allow the required traffic. I also reloaded firewald.

# firewall-cmd –permanent –zone=public –add-port=8140/tcp
# firewall-cmd –permanent –zone=public –add-port=61613/tcp

On the puppet client, install the puppet agent

# yum -y install puppet

Now we add an entry for the puppet server in /etc/puppet/puppet.conf in section [agent], where <PUPPETSERVER-FQDN> is the FQDN of your Foreman Server

server = <PUPPETSERVER-FQDN>

Now save the file.

Then on the Puppet client run the following command.

# puppet agent -t waitforcert 60

Log into Foreman WebUI.
Navigate to => “Infrastructure” => “Smart Proxies” => “Certificates”

In the list located the new puppet client and click on sign to accept the key for the new host. The host that I am adding is osd01.lab.localdomain.

NOTE: Once you have accepted the key you need to run the puppet client again (puppet agent -t)  on the client. Otherwise the client will not appear in on the “All hosts” page

foreman1

Now Lets create a new Host Group to use for this server. Come on, its will be a blast.

Navigate to => “Configure” => “Host groups“. Select the green “New Host Group” button and then add your host group. Here I have added a host group called “Standalone Hosts”. See below.

foreman2

Now we need to add our new client to this new host group. We do so by navigating to => “Hosts” => “All hosts“. Then select “Edit” to the left of the host.

foreman3

Click “Submit” an the bottom of the page and you are good to go.

How to Install Foreman on Centos/RHEL 7

foreman_medium

Here is a very short and to the point guide on how to install Foreman on Centos7. This guide can also be used perform a plain vanilla install of Foreman on RHEL7.

Source: Installing The Foreman on CentOS 7