Skip to content

Commit 299cdc6

Browse files
committed
Update to Foreman 3.5 and Katello 4.7
* Restructure to use Katello as base * Update plugins * Update screenshots and graphics
1 parent f6c8db5 commit 299cdc6

91 files changed

Lines changed: 2254 additions & 1709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ In addition to the sources you can find the rendered material on
1818
[netways.github.io](https://netways.github.io/foreman-training)
1919

2020
* [Presentation](https://netways.github.io/foreman-training)
21-
* [Handouts](https://github.com/NETWAYS/foreman-training/releases/download/v1.6/foreman-training-handouts.pdf)
22-
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.6/foreman-training-exercises.pdf)
23-
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.6/foreman-training-solutions.pdf)
21+
* [Handouts](https://github.com/NETWAYS/foreman-training/releases/download/v1.7/foreman-training-handouts.pdf)
22+
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.7/foreman-training-exercises.pdf)
23+
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.7/foreman-training-solutions.pdf)
2424

2525
## Provide your own training
2626

Setup.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
## Virtual machine foreman.localdomain
44

5-
To setup a new version of the virtual machine install CentOS 8 from ISO, only configuration required is
5+
To setup a new version of the virtual machine install CentOS Stream 8 from ISO, only configuration required is
66
setting the network interface to manual, ip address 10.0.0.2, netmask 255.255.0.0, gateway 10.0.0.1,
77
dns 10.0.0.1.
88

99
Afterwards run the finish.sh provided in the _files directory to setup host entries and openldap.
1010

1111
## Virtual machine monitoring.localdomain
1212

13-
To setup a new version of the virtual machine install CentOS 8 from ISO, only configuration required is
13+
To setup a new version of the virtual machine install Ubuntu 22.04 Server from ISO, only configuration required is
1414
setting the network interface to manual, ip address 10.0.0.3, netmask 255.255.0.0, gateway 10.0.0.1,
15-
dns 10.0.0.1.
15+
dns 10.0.0.1 and creating a user training with the default password.
1616

17-
Afterwards copy the files from _files/monitoring into /root/ and run the finish.sh to setup host including
18-
Icinga 2, Icinga Web 2 and Director with preparations for the exercise.
17+
Afterwards run the finish.sh to setup host including Icinga 2, Icinga Web 2 and Director with preparations for the exercise.
1918

2019
## Local mirror
2120

_files/share/modules/training/manifests/user.pp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
class training::user (
2-
$id,
3-
$ssh_pub_key,
4-
$ssh_key_type = "ssh-rsa",
5-
$sudo = false
2+
String $id,
3+
String $ssh_pub_key,
4+
Enum[ 'ssh-dss', 'dsa', 'ssh-rsa', 'rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'ssh-ed25519', 'ed25519' ] $ssh_key_type = 'ssh-rsa',
5+
Boolean $sudo = false
66
) {
7-
validate_string($id)
8-
validate_string($ssh_pub_key)
9-
validate_re($ssh_key_type, [ '^ssh-dss$', '^dsa$', '^ssh-rsa$', '^rsa$', '^ecdsa-sha2-nistp256$', '^ecdsa-sha2-nistp384$', '^ecdsa-sha2-nistp521$', '^ssh-ed25519$', '^ed25519$' ])
10-
validate_bool($sudo)
11-
127
user { $id:
138
ensure => present,
149
managehome => true,
@@ -30,3 +25,4 @@
3025
}
3126
}
3227
}
28+

_files/share/monitoring/finish.sh

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
#!/bin/bash
2-
yum install epel-release -y
3-
yum install http://yum.puppetlabs.com/puppet6/puppet6-release-el-8.noarch.rpm -y
4-
yum install puppet-agent -y
5-
/opt/puppetlabs/bin/puppet module install puppetlabs-apache
6-
/opt/puppetlabs/bin/puppet module install puppetlabs-mysql
7-
/opt/puppetlabs/bin/puppet module install icinga-icinga2
8-
/opt/puppetlabs/bin/puppet module install icinga-icingaweb2
9-
/opt/puppetlabs/bin/puppet apply -v monitoring.localdomain.pp
2+
wget -O - https://packages.netways.de/netways-repo.asc | sudo apt-key add -
3+
echo "deb https://packages.netways.de/extras/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/netways-extras-release.list
4+
wget -O - https://apt.puppetlabs.com/DEB-GPG-KEY-puppet-20250406 | sudo apt-key add -
5+
echo "deb http://apt.puppetlabs.com jammy puppet7" | sudo tee /etc/apt/sources.list.d/puppet7.list
6+
apt update
7+
apt install -y icinga-installer
8+
9+
echo '10.0.0.1 host.localdomain
10+
10.0.0.2 foreman.localdomain
11+
10.0.0.3 monitoring.localdomain' >> /etc/hosts
12+
13+
icinga-installer -S server-db-mysql --initial-admin-username icinga --initial-admin-password icinga
14+
15+
usermod -a -G nagios training
16+
17+
sed -i "s@RewriteBase /icingaweb2/@RewriteBase /icingaweb2/\n\tRewriteCond %{REMOTE_ADDR} ^10\.0\.0\.2\n\tRewriteRule ^(.*)$ - [E=REMOTE_USER:foreman]@" /etc/apache2/conf.d/icingaweb2.conf
18+
systemctl restart apache2
19+
20+
echo 'object ApiUser "foreman" {
21+
password = "foreman"
22+
permissions = [ "*" ]
23+
}' >> /etc/icinga2/zones.d/main/api-users.conf
24+
systemctl restart icinga2
25+
26+
echo '[External]
27+
backend = "external"' >> /etc/icingaweb2/authentication.ini
28+
echo '[Foreman]
29+
users = "foreman"
30+
permissions = "module/director, director/api, director/*"' >> /etc/icingaweb2/roles.ini
31+
32+
icingacli director host create foreman_host --object_type template --check_command hostalive
33+
icingacli director service create ssh-linux --object_type template --check_command ssh
34+
icingacli director service create ssh --object_type apply --imports ssh-linux --assign_filter "host.vars.osfamily=%22Redhat%22 || host.vars.osfamily=%22Debian%22"
35+
icingacli director config deploy

_files/share/monitoring/icingaweb2.conf

Lines changed: 0 additions & 27 deletions
This file was deleted.

_files/share/monitoring/monitoring.localdomain.pp

Lines changed: 0 additions & 254 deletions
This file was deleted.

0 commit comments

Comments
 (0)