Managing servers on many occasions can become a difficult task for engineers. Especially because it doesn’t necessarily have to be one but several. With this, multiple circumstances increase significantly. So, today, I will teach you how to install Foreman an extraordinary application to help you with this task.
Foreman is a complete lifecycle management tool for physical and virtual servers. One of its most powerful features is to provide the opportunity to manage multiple servers from a single web interface. In addition, you can perform multiple tasks on several occasions. That is, task automation
Moreover, it is configurable through plugins and an extensive API development. So, let’s install Foreman.
1. Edit /etc/hosts file
First of all, it is necessary to update the /etc/hosts file so that it points to the hostname of the server.
:~$ sudo nano /etc/hosts
Next, set the correct hostname.
:~$ sudo hostnamectl set-hostname foreman.osradar.local
Now, you can continue.
2. Install some required packages
Before starting the Foreman installation it is necessary to install some necessary packages.
:~$ sudo apt install ca-certificates wget
Among the installed packages is wget that I will use to download the file to add the Foreman repository.
3. Install Foreman from an external repository
Now the next step is to install Foreman, however, I will do it adding an external repository to do it later from APT.
First, add the puppet repository.
:~$ wget https://apt.puppetlabs.com/puppet5-release-bionic.deb
Then, install the package.
:~$ sudo dpkg -i puppet5-release-bionic.deb
Now, you can add the Foreman repository.
:~$ echo "deb http://deb.theforeman.org/ bionic 1.20" | sudo tee /etc/apt/sources.list.d/foreman.list :~$ echo "deb http://deb.theforeman.org/ plugins 1.20" | sudo tee -a /etc/apt/sources.list.d/foreman.list :~$ wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -
Then, install Foreman installer package.
:~$ sudo apt install foreman-installer
Finally, run the installer.
:~$ sudo foreman-installer
It will take a while because it will download several packages and perform the entire installation process. If all goes well, you will find the credentials to access along with the address to which you should go from the web browser.
You will see this.
If your Foreman host is not listed, then run this command.
:~$ sudo /opt/puppetlabs/bin/puppet agent --test
And that’s it.
As you can notice, the installation of Foreman is something not very complex to do in Ubuntu 18.04. It is an extraordinary tool to manage multiple servers and services.
Any modern server is able to run this application without problems, however, take into account the number of dependencies needed. I would tell you that 16Gb of Ram should suffice.
If you want to broaden your knowledge, I recommend you visit Foreman’s official documentation to take full advantage of this great tool.