Installing Foreman
After installing Puppet Master, our next step is to install the Foreman web user interface that will be used to manage and report. Foreman is an open source project that can be used with Puppet or Chef. With Foreman and Puppet, you can manage your servers for configuration management, orchestration, and monitoring. For installation of Foreman, we will first add the relevant repositories, and after that install it.
Add repository details, as follows:
$ sudo -i # echo "deb http://deb.theforeman.org/ trusty stable" > /etc/apt/sources.list.d/foreman.list # echo "deb http://deb.theforeman.org/ plugins stable" >> /etc/apt/sources.list.d/foreman.list
You can also use sudonano
to add the details to the relevant files. In the preceding commands, echo
outputs the text to the screen or a file. >
overwrites the file, if it exists; if it does not exist, the file will be created. >>
adds content to the end of the file without overwriting it.
We need to add the key for the repository, as we are manually adding the source details using this command:
# wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add -
Now we have successfully added the repository details; we can continue with the repository updates, as follows:
# apt-get update
We need Apache as our web server. So, we install apache2 and foreman-installer
as shown in the following:
# apt-get install -y foreman-installer
The final step is to run the foreman-installer
. It will take some time to complete. For my server, it took more than five minutes.
# foreman-installer
Do not forget to write down the user and password details to connect your server. In the next section, we will see the basics of the user interface.