Foreman on Ubuntu 20.04: Difference between revisions

No edit summary
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
From [https://theforeman.org/manuals/3.5/quickstart_guide.html https://theforeman.org/manuals/3.5/quickstart_guide.html]
From [https://theforeman.org/manuals/3.5/quickstart_guide.html https://theforeman.org/manuals/3.5/quickstart_guide.html]


Install Ubuntu
Install Ubuntu and patch and ugprade
 
<pre>sudo apt-get install aptitude
sudo aptitude update
sudo aptitude upgrade</pre>


Update hostanmes
Update hostanmes
Line 24: Line 28:
echo "deb http://deb.theforeman.org/ focal 3.5" | sudo tee /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ focal 3.5" | sudo tee /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 3.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list</pre>
echo "deb http://deb.theforeman.org/ plugins 3.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list</pre>
Update & download installer
<pre>sudo apt-get update && sudo apt-get -y install foreman-installer</pre>


Foreman Options
Foreman Options
Line 44: Line 51:
  --foreman-proxy-dhcp-range="192.168.2.175 192.168.2.220"
  --foreman-proxy-dhcp-range="192.168.2.175 192.168.2.220"
</pre>
</pre>
Make executable
<pre>sudo chmod 775 foreman-install.sh</pre>
Run
<pre>sudo ./foreman-install.sh</pre>
=== Configuring Foreman ===
Add Infrastructure (in this order)
<pre>
Compute Resources
Compute Profiles
Subnets
Domains</pre>
==== Compute Resources ====
[[File:Foreman infra computeresources.png]]
==== Compute Resources ====
[[File:Foreman infra computeprofile1.png]]
==== Subnets ====
[[File:Foreman infra subnet.png]]

Latest revision as of 00:34, 6 January 2024

From https://theforeman.org/manuals/3.5/quickstart_guide.html

Install Ubuntu and patch and ugprade

sudo apt-get install aptitude
sudo aptitude update
sudo aptitude upgrade

Update hostanmes

sudo hostnamectl set-hostname pm.lab.bpopp.net

In /etc/hosts, replace 127.0.1.1 line with:

192.168.2.23  pm.lab.bpopp.net

Test with Ping

ping $(hostname -f)

Update puppet

sudo apt-get -y install ca-certificates
cd /tmp && wget https://apt.puppet.com/puppet7-release-focal.deb
sudo apt-get install /tmp/puppet7-release-focal.deb

Add foreman repos

sudo wget https://deb.theforeman.org/foreman.asc -O /etc/apt/trusted.gpg.d/foreman.asc
echo "deb http://deb.theforeman.org/ focal 3.5" | sudo tee /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 3.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list

Update & download installer

sudo apt-get update && sudo apt-get -y install foreman-installer

Foreman Options

#!/bin/bash

foreman-installer \
 --enable-foreman-proxy \
 --foreman-proxy-tftp=true \
 --foreman-proxy-tftp-servername=192.168.2.6 \
 --enable-foreman-compute-vmware \
 --foreman-proxy-dns=true \
 --foreman-proxy-dns-zone=lab.bpopp.net \
 --foreman-proxy-dns-provider=nsupdate \
 --foreman-proxy-dns-server=192.168.2.1 \
 --foreman-proxy-dhcp=true  \
 --foreman-proxy-dhcp-managed=true \
 --foreman-proxy-dhcp-gateway="192.168.2.1" \
 --foreman-proxy-dhcp-nameservers="192.168.2.1" \
 --foreman-proxy-dhcp-range="192.168.2.175 192.168.2.220"

Make executable

sudo chmod 775 foreman-install.sh

Run

sudo ./foreman-install.sh

Configuring Foreman

Add Infrastructure (in this order)

Compute Resources
Compute Profiles
Subnets
Domains

Compute Resources

Compute Resources

Subnets