Professional Documents
Culture Documents
Getting Started With Foreman - Part 1
Getting Started With Foreman - Part 1
Getting Started With Foreman - Part 1
org
BERYJU.ORG
Enov8 IT
Model, Plan, C
Measure your
Operations.
Enov8 Limited
What is Foreman
This is a multi-part series about provisioning and automating things with Foreman. It's going
cover deploying Debian, Windows (7/10/Server) and ESXi as well as automating things like
Package installs.
Since I am using VMWare, this tutorial is going to involve integration with vCenter and ESXi.
Foreman supports Bare metal, Amazon EC2, Google Compute Engine, OpenStack, Libvirt
and oVirt, so if you use any of those some of the instructions won't match up.
https://beryju.org/en/blog/getting-started-foreman-part-1 1/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
Table of Contents
BERYJU.ORG
Installing Foreman
Installing the OS
In this case I am going to give the Foreman VM 1 vCPU and 2 GB of RAM as well as 25 GB of
HDD Space. The Specs are very dependent on the amount of hosts you are managing with
puppet. For my production Foreman VM, which has about 50 hosts checking in, I provisioned
3 vCPUs and 4 GB of RAM.
https://beryju.org/en/blog/getting-started-foreman-part-1 2/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Since this will deploy machines over DHCP, I am going to set a static IP. Also since we don't
have a DNS Server yet (let's assume), I am going to set it to the Google DNS
https://beryju.org/en/blog/getting-started-foreman-part-1 3/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
The hostname for this test box is war-dev-puppet01.beryju.org, but don't let that puppet
throw you o . I chose to use puppet instead of foreman since it ts better in my naming
Scheme. For partitioning I am going to go with a single Partition.
Installing Foreman
https://beryju.org/en/blog/getting-started-foreman-part-1 4/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
Dependant on your distribution, you might need to adjust that jessie. This adds the Foreman
APT Repository, installs their public GPG Key and installs the foreman-installer Package.
This package installs Foreman, Foreman Smart Proxies and everything else needed.
This should be the result we get after running above commands. Now we can access the
Web Interface of Foreman, which is listening on https://<ip>. First time authentication
happens with the credentials provided after the installation. You probably want to change
your password to something you can actually remember. To do that, you click on Admin User
on the Top Bar, My Account and change it there.
Setting up Foreman
https://beryju.org/en/blog/getting-started-foreman-part-1 5/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
Now that we have everything installed, let's start setting Foreman up for provisioning. To start
BERYJU.ORG
that process, we go to Infrastructure and then Provisioning setup. On that page we select
a Network adapter for the provision network. This will most likely stay on eth0.
On the next page we ll in some information about our network, which look like this in my
example:
On the next page we are going to copy and execute the rst snippet, which re-con gures
Foreman with a Smart-Proxy, a DHCP Server and a TFTP Server. After the installer is done,
we should get a similar output to earlier. But don't reload the webpage, since we are not
quite done with the wizard yet. Click on Next to continue and Choose an OS Mirror. Since I am
using Debian 8 in this case, I am going to keep the o cial Debian Mirror. Click Submit once
again and we're done with the provisioning setup (mostly).
We need to do one nal thing before we can use Foreman to create and provision VMs.
Navigate to Infrastructure, Compute Resources and select New. Here we can add our vCenter
or ESXi connection, which looks like this in my case:
https://beryju.org/en/blog/getting-started-foreman-part-1 6/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Ok I lied. One more thing we have to do before creating our rst VM. We have to set our
Foreman box as DNS Proxy for the Domain we're using. This is done by going to
Infrastructure -> Domains -> <your domain> -> DNS Proxy. The reason why we set this is so
that Foreman creates A Records for our VMs as well as PTR Records.
Alright, enough setting up. Let's create a VM to test if everything works. Go to Hosts -> New
host. For this VM it should look something like this (obviously with your Hostnames)
https://beryju.org/en/blog/getting-started-foreman-part-1 7/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Switch over to the Interfaces tab to con gure the VMs Interfaces. Click Edit on the rst
Interface to change the Domain, Subnet and Portgroup, which you might need to change.
Over on the Operating System tab, all we have to do is set the root password. On the Virtual
Machine Tab we have to set the VM Host/Cluster as well as the datastore. Let's start the
creating by clicking Submit and cross our ngers!
https://beryju.org/en/blog/getting-started-foreman-part-1 8/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Now it's time to grab a co ee and read some /r/homelab until the install nishes.
After about 10-15 mins, it should be done with the install, and if all goes well, this is what the
host page should look like now.
https://beryju.org/en/blog/getting-started-foreman-part-1 9/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
Search
Search …
Related Posts
Setup Walkthrough 45
Popular Tags
HOMELAB SETUP DEBIAN ERROR VCENTER VYOS ESXI 6.5 ACTIVE DIRECTORY
https://beryju.org/en/blog/getting-started-foreman-part-1 10/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
Archives
3 November 2019
1 June 2017
3 July 2016
1 May 2016
1 March 2016
Syndicate
https://beryju.org/en/blog/getting-started-foreman-part-1 11/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Privacy Policy
https://beryju.org/en/blog/getting-started-foreman-part-1 12/13
04/03/2020 Getting Started with Foreman: Part 1 | BeryJu.org
BERYJU.ORG
Instant secu
13 risk fact
Get My Free Score
SSL & DNS
https://beryju.org/en/blog/getting-started-foreman-part-1 13/13