Step-by-step installation/configuration guide for Foreman+Puppet on CentOS 6

Few days ago i have to repeat same thing that was done before half year ago. That was my usual setup of Foreman+puppet, but never in same way. It’s not looking like DevOps thing. Sometime it could be tricky to get all things together. So, here is small notice of installation/configuration process for Foreman+puppet.

Let’s start with usefull links for this topic: http://theforeman.org/manuals/1.1/quickstart_guide.html

1. CentOS 6 x86_64 minimal installation with EPEL repo and Percona repo
2. I have turn off selinux and firewall due to not production environment. So, please make sure that this will be secure for you
3. Create FQDN for this host: example puppet.inside.lan and foreman.inside.lan
4. Foreman installation steps:

5. Run automatic installer:

6. So, now i can try to login to Foreman WebUI. In my case i need ssh tunnel: https://foreman.inside.lan/. Default username/password: “admin”/”changeme”.
7. Configure Foreman Smart-Proxy: More > Configuration > Smart Proxies and add a new proxy with the URL https://puppet.inside.lan:8443/.
8. I’d recommend to store data inside MySQL than SQLite. So, in that case we need to install MySQL/Percona Server and re-configure Puppet and Foreman.
9. Installation of Percona Server 5.5

10. Configure /etc/my.cnf

11. Start Percona/MySQL server
a. mysql> create database puppet;
b. mysql> grant all on puppet.* to puppet@’localhost’ identified by ‘password’;
12. Configure Foreman to use MySQL Server:
Edit /etc/foreman/database.yml

It could be that during this step you have to install additional Gem package:

13. Migrate Foreman data from SQLite to MySQL:

14. Configure Puppet Master:

Edit fileserver.conf:

Edit autosign.conf:

Author: GergunD

Leave a Reply