foreman_large

Installing The Foreman on CentOS 7

I have been using The Foreman as a front end for Puppet Open Source for a little while, I barely even scratch the surface of its features, but it has made my life easier as an ENC.

Previously I had been using it on Ubuntu without an issue. But we have now moved to using RHEL based systems so I had to get it up an running on a fresh CentOS 7 system. As we run a pretty basic setup, we have everything in one box, that is foreman, puppet master, puppet ca and the puppet postgresdb.

There are good installation instructions on The Foreman’s website however I kept hitting a brick wall when trying to install.

I would follow the instructions to the letter, yet everytime I would receive the following errors:

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[myserver.test.internal]: Could not evaluate: Could not load data from https://myserver.test.internal

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[myserver.test.internal]: Failed to call refresh: Could not load data from https://myserver.test.internal

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[myserver.test.internal]: Could not load data from https://myserver.test.internal

After a fair bit of hair pulling I found that if you install puppet server first, before running the foreman-installer, and then if you explicitly specify the option --enable-foreman-proxy then the installation completes successfully. I have copied the installation steps from The Foreman quick start guide below, and have included the --enable-foreman-proxy option so you can easily follow along.

Installation steps for CentOS 7 (Taken from The Foreman quick start guide)

Repositories

Using a recent version of Puppet is recommended, which is available from the Puppet Labs repository. You may skip this and use the older version from EPEL without a problem, however it has reduced community support.

rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm

Enable the EPEL (Extra Packages for Enterprise Linux) and the Foreman repos:

yum -y install epel-release http://yum.theforeman.org/releases/1.7/el7/x86_64/foreman-release.rpm

Downloading the installer

yum -y install foreman-installer

Install Puppet Server

yum install puppet-server
reboot

Running the installer

The installation run is non-interactive, but the configuration can be customized by supplying any of the options listed inforeman-installer --help, or by running foreman-installer -i for interactive mode. More examples are given in the Installation Options section. Adding -v will disable the progress bar and display all changes. To run the installer, execute:

foreman-installer --enable-foreman-proxy
Advertisements

6 comments

  1. thanks for this. This worked fine for me.

    But now I wanted to upgrade to 1.8 and this isn’t working yet – error with dependencies. Did you get it working for your installation?

    Like

  2. I am still having issues in installing foreman on EL7. It seems like the packages in the repository are showing as 0. But the same worked 2 days back. I even tried the repo site with no luck. Please check if anything you can help here…

    [root@server1~]# yum repolist
    Loaded plugins: ulninfo
    repo id repo name status
    epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 8,918
    foreman/x86_64 Foreman 1.9 387
    foreman-plugins/x86_64 Foreman plugins 1.9 253
    ol7_UEKR3/x86_64 Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7Server (x86_64) 345
    ol7_latest/x86_64 Oracle Linux 7Server Latest (x86_64) 13,338
    puppetlabs-deps/x86_64 Puppet Labs Dependencies El 7 – x86_64 17
    puppetlabs-products/x86_64 Puppet Labs Products El 7 – x86_64 198
    rhscl-ruby193-epel-7-x86_64 Ruby193 – epel-7-x86_64 0
    rhscl-v8314-epel-7-x86_64 V8 3.14.5.10 – epel-7-x86_64 0
    repolist: 23,456
    [root@server1~]#

    [root@server1 yum.repos.d]# cat rhsc*
    [rhscl-ruby193-epel-7-x86_64]
    name=Ruby193 – epel-7-x86_64
    baseurl=https://www.softwarecollections.org/repos/rhscl/ruby193/epel-7-x86_64
    enabled=1
    gpgcheck=0
    [rhscl-v8314-epel-7-x86_64]
    name=V8 3.14.5.10 – epel-7-x86_64
    baseurl=https://www.softwarecollections.org/repos/rhscl/v8314/epel-7-x86_64
    enabled=1
    gpgcheck=0
    [root@server1 yum.repos.d]#

    Like

  3. By the way, I think the issue is due to that the puppet master fails to start because of “duplicated” port bindings with IPv4 and IPv6. There would be a number of ways to resolve this, but for me, since I don’t need IPv6 in my environment–disabling IPv6 allows me to used the foreman instructions directly without modification.

    See https://wiki.centos.org/FAQ/CentOS7#head-8984faf811faccca74c7bcdd74de7467f2fcd8ee for information on how to disable IPv6 in CentOS 7.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s