Skip to content

Commit d0fa25e

Browse files
committed
updates to Foreman 1.12 and Katello 3.0
1 parent 0c20a57 commit d0fa25e

File tree

21 files changed

+246
-135
lines changed

21 files changed

+246
-135
lines changed

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.0/foreman-training-handouts.pdf)
22-
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.0/foreman-training-exercises.pdf)
23-
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.0/foreman-training-solutions.pdf)
21+
* [Handouts](https://github.com/NETWAYS/foreman-training/releases/download/v1.1/foreman-training-handouts.pdf)
22+
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.1/foreman-training-exercises.pdf)
23+
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.1/foreman-training-solutions.pdf)
2424

2525
## Provide your own training
2626

Setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ and Puppetlabs EPEL 7 x86_64. This machine will require about 20GB.
1717

1818
To setup the Katello demo follow this guide:
1919

20-
# git clone https://github.com/Katello/katello-deploy.git
21-
# cd katello-deploy
22-
# vagrant up centos7-2.4
20+
# git clone https://github.com/Katello/forklift.git
21+
# cd forklift
22+
# vagrant up centos7-katello-3.0
2323

2424
This will setup your Katello server, login with the provided credentials and add the following content:
2525

2626
* GPG Key "RPM-GPG-KEY-CentOS-7" by uploading the key from a CentOS 7 system
2727
* Product "CentOS7" with the key assigned
2828
* Repository "CentOS7-Base-x86_64" of type "yum" and URL "http://mirror.centos.org/centos/7/os/x86_64/"
29-
* Sync this repository - it will consume about 7GB
29+
* Sync this repository - it will consume about 7GB (or choose "On Demand to save some storage)
3030
* Life Cycle Environment "Test" and "Production"
3131
* Content View "CentOS7"
3232
* Add the Repository "CentOS7-Base-x86_64"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class training::user (
2+
$id,
3+
$ssh_pub_key,
4+
$ssh_key_type = "ssh-rsa",
5+
$sudo = false
6+
) {
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+
12+
user { $id:
13+
ensure => present,
14+
managehome => true,
15+
}
16+
17+
ssh_authorized_key { $id:
18+
user => $id,
19+
type => $ssh_key_type,
20+
key => $ssh_pub_key,
21+
}
22+
23+
if $sudo {
24+
file { "/etc/sudoers.d/$id":
25+
ensure => file,
26+
mode => '0400',
27+
owner => 'root',
28+
group => 'root',
29+
content => "$id ALL=(ALL) NOPASSWD: ALL",
30+
}
31+
}
32+
}

_files/share/puppetmodules.tar.gz

-123 KB
Binary file not shown.

architecture/02_smart_proxy.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ using virsh to manage the dnsmasq underneath is available, a productive use is n
8585
!SLIDE smbullets small
8686
# Smart Proxy - DNS
8787
88-
* Adds and removes dns records of type A and PTR
88+
* Adds and removes dns records of type A, AAAA and PTR
8989
* Requires zone to be configured as dynamic zones
9090
* Supports: Bind, PowerDNS, Route53, MS DNS, Libvirt
9191
@@ -109,17 +109,18 @@ using virsh to manage the dnsmasq underneath is available, a productive use is n
109109
110110
~~~SECTION:notes~~~
111111
112-
* Foreman does not support IPv6 at the moment, so no AAAA records
113-
* Also no support for additional records like CNAME
112+
* Foreman does support IPv6 from 1.12 onwards
113+
* No support for additional records like CNAME
114114
115115
~~~ENDSECTION~~~
116116
117117
~~~SECTION:handouts~~~
118118
119119
****
120120
121-
The Smart Proxy DNS is used to add and remove dns records of type A and PTR, at the moment there is no
122-
support for IPv6 and additional records. For doing such updates it requires the zone to be a dynamic zone.
121+
The Smart Proxy DNS is used to add and remove dns records of type A and PTR, Foreman 1.12 introduced
122+
support for IPv6, but there is no support for additional records. For doing such updates it requires
123+
the zone to be a dynamic zone.
123124
124125
Commonly used on Linux is Bind which takes updates via nsupdate with preshared keys or if used in FreeIPA
125126
with Kerberos principal. The same mechanism could be used for sending updates to Microsofts DNS. Another

configmanagement/02_puppet.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ from unprivileged users.
257257
### Set defaults to the Smart class parameters provided by the imported class
258258
259259
Navigate to "Configure > Classes" and select the class "training::user". In the "Smart Class Parameter" tab
260-
insert your name as Default Value for the name for the user, add a ssh public key as Default Value for ssh_pub_key,
260+
insert your name as Default Value for the id of the user, add a ssh public key as Default Value for ssh_pub_key,
261261
for the parameter sudo select override and set the default to true.
262262
263263
Hint: To create a ssh key pair run "ssh-key-gen". The key string required for the puppet module is the second part
@@ -416,3 +416,23 @@ The hash is best used with a defined resource and create_resource function or wi
416416
Next release of the function will also allow to provide a filter for reducing the data for easier handling.
417417
418418
~~~ENDSECTION~~~
419+
420+
421+
!SLIDE smbullets small
422+
# Replace Puppet's default lookup
423+
424+
* Puppet uses Hiera as default lookup for parameters
425+
* Can be replaced with Foreman
426+
* Requires two plugins
427+
* Param lookup - Exposes parameters via API
428+
* Data binding - Replaces Puppet's lookup
429+
430+
~~~SECTION:handouts~~~
431+
432+
****
433+
434+
You can replace Puppet's default lookup with Foreman by installing Param lookup and Data binding plugin. This allows to
435+
use the Roles-Profiles-Pattern or similar concepts which do not directly assign classes and still use Foreman to configure
436+
parameters.
437+
438+
~~~ENDSECTION~~~
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
!SLIDE smbullets small
2+
# Config Groups
3+
4+
* Allows to group classes
5+
* Assign like single classes
6+
7+
~~~SECTION:handouts~~~
8+
9+
****
10+
11+
Config Groups allow to group classes and assign them in the same way you would use single classes.
12+
This follows the same ideas like the very popular Roles-Profiles-Pattern used in Puppet to simplify
13+
assignment via another layer of abstraction.
14+
15+
~~~ENDSECTION~~~

installation/01_requirements.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
* SCLorg SIG repository
1111
* optionally: Puppetlabs Repository
1212
* Fedora (not recommended)
13-
* Debian 7
14-
* optionally: Puppetlabs Repository
1513
* Debian 8
1614
* optionally: Puppetlabs Repository
17-
* Ubuntu 12.04 & 14.04
15+
* Ubuntu 14.04 & 16.04
1816
* optionally: Puppetlabs Repository
1917

2018
~~~SECTION:handouts~~~
@@ -27,27 +25,32 @@ On the mentioned operating systems packages are provided by the project, a insta
2725
is not recommended. On all platforms all updates should be applied before installation. Using the
2826
Puppetlabs Repository providing an up-to-date version of Puppet is preferred.
2927
28+
Please note that support for Foreman on Red Hat Enterprise Linux 6 and all its derivates is deprecated
29+
and upgrading to 7 is recommended.
30+
3031
~~~ENDSECTION~~~
3132
3233
!SLIDE smbullets small noprint
3334
# Requirements - Puppet & Facter
3435
3536
* Support matrix
3637
37-
Puppet version | Foreman installer | Smart proxy | Report/fact processors | ENC
38-
---------------|-------------------|-----------------|------------------------|--------------------------------
39-
0.25.x | Not supported | Untested | Untested | No Parametrized Classes
40-
2.6.0 - 2.6.5 | Not supported | Untested | Untested | No Parametrized Classes
41-
2.6.5+ | Not supported | Supported | Supported | Supported
42-
2.7.x | Supported | Supported | Supported | Supported
43-
3.0.x | Limited support | 1.1 or higher | Supported | Supported
44-
3.1.x - 3.4.x | 1.1 or higher | 1.1 or higher | Supported | Supported
45-
3.5.x | 1.4.3 or higher | 1.4.2 or higher | Supported | Supported
46-
3.6.0+ | 1.4.3 or higher | 1.5.1 or higher | Supported | Supported
47-
4.x | Not supported | Partial support | Untested | Untested
38+
Puppet version | Foreman installer | Smart proxy | Report/fact processors | ENC
39+
-----------------------|-------------------|-----------------|------------------------|--------------------------------
40+
0.25.x, 2.6.0 - 2.6.5 | Not supported | Untested | Untested | No Parametrized Classes
41+
2.6.5+ | Not supported | Supported | Supported | Supported
42+
2.7.x | Supported | Supported | Supported | Supported
43+
3.0.x | Limited support | 1.1 or higher | Supported | Supported
44+
3.1.x - 3.4.x | 1.1 or higher | 1.1 or higher | Supported | Supported
45+
3.5.x | 1.4.3 or higher | 1.4.2 or higher | Supported | Supported
46+
3.6.0+ | 1.4.3 or higher | 1.5.1 or higher | Supported | Supported
47+
4.x | 1.12 or higher | 1.12 or higher | Supported | Supported
4848
4949
* Puppet Enterprise is not supported
50-
* Facter 1.x is supported, 2.x requires Foreman >= 1.4.2, Structured Facts are not supported for now
50+
* All-in-one and FHS packaging model are both supported for Puppet 4
51+
* Puppet Master and Puppet Server are both supported
52+
* Facter 1.x is supported, 2.x requires Foreman >= 1.4.2
53+
* Structured Facts are supported with Foreman >= 1.12
5154
5255
!SLIDE smbullets small printonly
5356
# Requirements - Puppet & Facter
@@ -62,22 +65,29 @@ Puppet version | Foreman installer | Smart proxy | Report/fact processors |
6265
3.1.x - 3.4.x | 1.1 or higher | 1.1 or higher | Supported | Supported
6366
3.5.x | 1.4.3 or higher | 1.4.2 or higher | Supported | Supported
6467
3.6.0+ | 1.4.3 or higher | 1.5.1 or higher | Supported | Supported
65-
4.x | Not supported | Partial support | Untested | Untested
68+
4.x | 1.12 or higher | 1.12 or higher | Supported | Supported
6669
6770
~~~PAGEBREAK~~~
6871
6972
* Puppet Enterprise is not supported
70-
* Facter 1.x is supported, 2.x requires Foreman >= 1.4.2, Structured Facts are not supported for now
73+
* All-in-one and FHS packaging model are both supported for Puppet 4
74+
* Puppet Master and Puppet Server are both supported
75+
* Facter 1.x is supported, 2.x requires Foreman >= 1.4.2
76+
* Structured Facts are supported with Foreman >= 1.12
7177
7278
~~~SECTION:handouts~~~
7379
7480
****
7581
7682
An up-to-date version of Puppet 3.x is recommended while other versions will work. Puppet 4.x support is
77-
pending. Puppet Enterprise is not supported, but can work with manual tweaking of the setup.
83+
introduced with Foreman 1.12, supporting All-in-one and Filesystem-Hierarchy-Standard packaging standard.
84+
Puppet Enterprise is not supported, but can work with manual tweaking of the setup.
85+
86+
Both versions of the central server in a Puppet environment are supported. If the All-in-on package of Puppet 4
87+
is found it will use the Puppet Server, in all other cases it will setup Puppet Master using Apache and Passenger.
7888
7989
Facter 1.x is supported, Facter 2.x is supported by requires at least Foreman 1.4.2. Support for structured
80-
facts provided by Facter 2.x is not supported for now, feature request is pending.
90+
facts provided by Facter 2.x is also added with Foreman 1.12.
8191
8292
~~~ENDSECTION~~~
8393

installation/02_installer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Runs parameterized or interactively
1414
* command line flags
1515
* answers file
16+
* scenarios
1617

1718
~~~SECTION:handouts~~~
1819
@@ -22,7 +23,7 @@ The Foreman installer is based on a separate project named kafo (Katello/Foreman
2223
be used by other projects. It utilizes existing Puppet modules to install and configure all required
2324
components. Module parameters are provided as commandline arguments to the installer,
2425
as an answers file formatted in yaml (can be autosaved) or by running the installer
25-
in interactive mode.
26+
in interactive mode. The installer supports also predefined scenarios which is only used by Katello for now.
2627
2728
~~~PAGEBREAK~~~
2829

installation/04_installation.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* Steps:
77
* Make Puppetlabs repository available
88
* Make EPEL repository available
9-
* Make SCLorg repository available
109
* Make Foreman repository available
1110
* Install foreman-installer
1211

@@ -40,16 +39,6 @@ URL: http://fedoraproject.org/wiki/EPEL
4039

4140
Command: yum install epel-release
4241

43-
* Make SCLorg repository available
44-
45-
Install the release package provided by CentOS repository to make it available for package
46-
installation required as dependency.
47-
48-
URL: https://wiki.centos.org/AdditionalResources/Repositories/SCL
49-
50-
Command: yum install centos-release-scl
51-
52-
5342
* Make Foreman repository available
5443

5544
Install the release package provided by the Foreman repository to make it available for package
@@ -85,21 +74,21 @@ The Foreman installer is installed and "foreman-installer --help" could be run f
8574
Install the release package provided by the Puppetlabs repository to make it available for package
8675
installation of open source version of Puppet.
8776

88-
# yum install http://yum.puppetlabs.com/puppetlabs-release-el-7.rpm -y
77+
# yum install http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm -y
8978

90-
### Make EPEL repository available
79+
In the training we will stick with Puppet 3 and the Puppet Master because it does require much less
80+
initial resources allowing us to run more virtual machines in parallel. If you really want to run
81+
Puppet 4, increase the memory of the virtual machine at least to 3 GB and install the Puppet Collection
82+
repository.
9183

92-
Install the release package provided by the CentOS to make it available for package
93-
installation required as dependency.
94-
95-
# yum install epel-release -y
84+
# yum install http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm -y
9685

97-
### Make SCLorg repository available
86+
### Make EPEL repository available
9887

9988
Install the release package provided by the CentOS to make it available for package
10089
installation required as dependency.
10190

102-
# yum install centos-release-scl -y
91+
# yum install epel-release -y
10392

10493
### Make Foreman repository available
10594

@@ -196,7 +185,7 @@ To install run the following command:
196185
--foreman-proxy-dhcp-interface=eth0 \
197186
--foreman-proxy-dhcp-gateway=10.0.0.1 \
198187
--foreman-proxy-dhcp-range="10.0.0.100 10.0.0.200" \
199-
--foreman-proxy-dhcp-nameservers="10.0.0.1"
188+
--foreman-proxy-dhcp-nameservers="10.0.0.2"
200189
201190
This will output on success something similar:
202191

0 commit comments

Comments
 (0)