Introduction
Foreman is an open-source complete life cycle systems management tool for provisioning, configuring and monitoring physical and virtual servers. Foreman has deep integration to configuration management software, with Ansible, Puppet, Chef, Salt and other solutions through plugins, which allows users to automate repetitive tasks, deploy applications, and manage change to deployed servers.
Foreman is used by system administrators to manage servers throughout their lifecycle, from provisioning and configuration to orchestration and monitoring.
In this article, we will show how to install Foreman on Ubuntu 20.04.
Adding hostname in the host's file
- Adding the server’s hostname to its public IP address in the host's file.
The below line should be added to the host's file.$ sudo nano /etc/hosts
Save and close the file.(your_instance_ip_address) (your_domain_name or server_name)
Install Packages
- Install dependency packages.
$ sudo apt install -y apt-transport-https wget gpg gnupg ca-certificates
- Downloading the Puppet repository.
$ sudo wget https://apt.puppet.com/puppet6-release-focal.deb
- Adding the Puppet repository.
$ sudo dpkg -i ./puppet6-release-focal.deb
- Adding Foreman repository to the system with the following details below.
echo "deb http://deb.theforeman.org/ focal 3.0" | sudo tee /etc/apt/sources.list.d/foreman.list echo "deb http://deb.theforeman.org/ plugins 3.0" | sudo tee -a /etc/apt/sources.list.d/foreman.list
- Download the Foreman GPG keys.
$ sudo wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -
- Update the package index.
$ sudo apt update
Install Foreman package
- Downloading the foreman installer.
$ sudo apt -y install foreman-installer
- Run the foreman installer.
(Note: This process will take some time to install).
$ sudo foreman-installer
Output
From the above screenshot, you can see the default credentials for login into Foreman Web UI. Copy the initial credentials to the clipboard.
Verify Foreman installation
- After the successful installation of the Foreman, Open the browser and enter the following URL.
(your_instance_ip_address or domain/server name)
Output
- Use the Initial credentials already copied to the clipboard to log in to your Foreman Account. Once after successfully log in you will see the dashboard page of Foreman.