Skip to content

Commit de23906

Browse files
committed
updates to latest releases
1 parent 04135ff commit de23906

33 files changed

+351
-408
lines changed

Setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To setup the Katello demo follow this guide (it requires vagrant and ansible to
2929

3030
# git clone https://github.com/Katello/forklift.git
3131
# cd forklift
32-
# vagrant up centos7-katello-3.4
32+
# vagrant up centos7-katello-3.7
3333

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

@@ -48,7 +48,7 @@ This will setup your Katello server, login with the provided credentials and add
4848

4949
Register the system to itself:
5050

51-
# vagrant ssh centos7-katello-3.4
51+
# vagrant ssh centos7-katello-3.7
5252
# yum -y install katello-agent http://$(hostname -f)/pub/katello-ca-consumer-latest.noarch.rpm
5353
# subscription-manager register --org Default_Organization --activationkey="CentOS7-Test"
5454

advanced/02_cleanup.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,25 @@ before restarting the service you can optionally run the foreman-installer in si
133133
and see pending config changes, if some are shown run the foreman-installer again to apply them finally.
134134
135135
~~~ENDSECTION~~~~
136+
137+
138+
!SLIDE smbullets small
139+
# Foreman Maintain
140+
141+
* A tool developed to automate the previous tasks
142+
* Handles multiple strategies for
143+
* Backup
144+
* Restore
145+
* Handles Updates including Health checks
146+
* Maintenance mode prevents access to Foreman
147+
148+
~~~SECTION:handouts~~~
149+
150+
****
151+
152+
Foreman Maintain is a newly developed tool which tries to automate the previous tasks. It can handle multiple strategies for backup and restore,
153+
like offline and online, full and incremental. It ensures system health during Update and its maintenance mode prevents access to Foreman.
154+
155+
For more information: https://theforeman.org/plugins/foreman_maintain/0.2/index.html
156+
157+
~~~ENDSECTION~~~

advanced/03_api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ in the WebGUI but they have to be URL encoded.
2424
2525
Usage explainations can be found at http://theforeman.org/manuals/latest/index.html#5.1API
2626
27-
API documentation is located at http://theforeman.org/api/1.16/index.html
27+
API documentation is located at http://theforeman.org/api/1.18/index.html
2828
2929
~~~ENDSECTION~~~
3030
@@ -90,7 +90,7 @@ In the following command the ids depend on your environment and may differ:
9090
9191
# curl -k -u admin:PASSWORD -H "Accept: version=2,application/json" -H "Content-Type: application/json" \
9292
-X POST -d '{ "name":"training", "environment_id":"1", "puppet_ca_proxy_id":"1", "puppet_proxy_id":"1",
93-
"subnet_id":"1", "domain_id":"1", "architecture_id":"1", "operatingsystem_id":"1", medium_id":"1", "ptable_id":"80",
93+
"subnet_id":"1", "domain_id":"1", "architecture_id":"1", "operatingsystem_id":"1", medium_id":"1", "ptable_id":"94",
9494
"root_pass":"start123" }' \
9595
https://foreman.localdomain/api/hostgroups | python -m json.tool
9696

advanced/04_cli.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ A list of plugins is provided by the Github page of the framework: https://githu
3535
* Make sure to provide the correct credentials.
3636
* Create the new Operatingsystem entry for "CentOS 6.8"
3737
* Associate the template "Kickstart default PXELinux" and set it as default template
38-
* Associate the template "Kickstart RHEL default" and set it as default template
38+
* Associate the template "Kickstart default" and set it as default template
3939
4040
4141
!SLIDE supplemental exercises
@@ -54,7 +54,7 @@ A list of plugins is provided by the Github page of the framework: https://githu
5454
* Make sure to provide the correct credentials.
5555
* Create the new Operatingsystem entry for "CentOS 6.8"
5656
* Associate the template "Kickstart default PXELinux" and set it as default template
57-
* Associate the template "Kickstart RHEL default" and set it as default template
57+
* Associate the template "Kickstart default" and set it as default template
5858
5959
6060
!SLIDE supplemental solutions
@@ -86,10 +86,10 @@ The ids may vary depending on our environment but you can get them with the list
8686
8787
# hammer template add-operatingsystem --name "Kickstart default PXELinux" \
8888
--operatingsystem "CentOS 6.8"
89-
# hammer os set-default-template --config-template-id 24 --id 4
89+
# hammer os set-default-template --config-template-id 35 --id 6
9090
91-
### Associate the template "Kickstart RHEL default" and set as default template
91+
### Associate the template "Kickstart default" and set as default template
9292
93-
# hammer template add-operatingsystem --name "Kickstart RHEL default" \
93+
# hammer template add-operatingsystem --name "Kickstart default" \
9494
--operatingsystem "CentOS 6.8"
95-
# hammer os set-default-template --config-template-id 22 --id 4
95+
# hammer os set-default-template --config-template-id 31 --id 6

advanced/07_monitoring.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ because of redirect rules directing the request to HTTPs.
2828
2929
check_http -H foreman.localdomain -e 301
3030
31+
~~~PAGEBREAK~~~
32+
3133
Log entries containing "500 Internal Server Error" will typically indicate a software failure caused by
3234
something not running properly or a bug. Check_logfiles provided at http://labs.consol.de could be used
3335
to monitor.
3436
3537
check_logfiles --logfile /var/log/foreman/production.log --rotation loglogdate8logdate8gz \
3638
--criticalpattern '500 Internal Server Error' --tag foreman
3739
38-
~~~PAGEBREAK~~~
39-
4040
To monitor the Smart proxy query the feature list for expected features as a feature will be deactivated if
4141
an error during startup occures.
4242

architecture/01_foreman.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
* Web Interface + API + CLI
55
* Supported platforms:
6-
* Server: RHEL/Fedora, Debian/Ubuntu, (Linux)
6+
* Server: RHEL/CentOS, Debian/Ubuntu, (Linux)
77
* DB: PostgreSQL, MySQL, SQLite
88
* Provisioning: RHEL/Fedora, Debian/Ubuntu, Solaris, SuSE, CoreOS, FreeBSD, Juniper Junos, Cisco NX-OS, (Windows, MacOS)
99
* Usermanagement:
@@ -28,7 +28,7 @@
2828
2929
Foreman provides in addition to the Web Interface an API and CLI.
3030
31-
It supports as platform RHEL/Fedora and Debian/Ubuntu via packages and via installation from source
31+
It supports as platform RHEL/CentOS and Debian/Ubuntu via packages and via installation from source
3232
also other Linux distribution.
3333
3434
As database backend PostgreSQL, MySQL and SQLite are supported, while the default is PostgreSQL,

architecture/02_smart_proxy.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Autonomous web-based component
55
* Restful API to connect to various systems from Foreman
66
* Decentralisation of some Foreman features (templates) for isolated networks
7-
* Supported Platforms: RHEL/Fedora, Debian/Ubuntu, (Linux, Windows)
7+
* Supported Platforms: RHEL/CentOS, Debian/Ubuntu, (Linux, Windows)
88
* Supported Subsystems:
99
* DHCP - ISC DHCP, MS DHCP Servers, Libvirt
1010
* DNS - Bind, PowerDNS, Route53, MS DNS Server, Libvirt
@@ -27,7 +27,7 @@
2727
The smart proxy is an autonomous web-based component providing a restful API to connect to varios
2828
systems from higher ochestration tools such as Foreman.
2929
30-
The Project provides packages for installation on RHEL/Fedora and Debian/Ubuntu. Installing from
30+
The Project provides packages for installation on RHEL/CentOS and Debian/Ubuntu. Installing from
3131
source allows to support other Linux distributions and also Windows which is required for some
3232
implementations of subsystems.
3333
@@ -80,6 +80,8 @@ needs netsh command installed and the user running the service needs administrat
8080
server does not need to be the DHCP server. For testing enviroments also an implementation for Libvirt
8181
using libvirt API to manage the dnsmasq underneath is available, a productive use is not recommended.
8282
83+
Additional providers like infoblox or remote connection to ISC DHCP are available as plugins.
84+
8385
~~~ENDSECTION~~~
8486
8587
!SLIDE smbullets small
@@ -128,6 +130,8 @@ possibilty is to install the Smart Proxy on a Windows server and give it the pri
128130
Other implementations like PowerDNS and Route53 are also supported. Libvirt is again only supported as a
129131
testing environment.
130132
133+
Additional providers like infoblox or powerdns are available as plugins.
134+
131135
~~~ENDSECTION~~~
132136
133137
@@ -165,6 +169,12 @@ in the most cases no manual configuration is required because it is completly in
165169
* allows certificate management using the Web GUI
166170
* creates autosign entry for hosts during provisioning
167171
172+
~~~SECTION:notes~~~
173+
174+
WIP: Tokenbased autosigning - https://github.com/theforeman/smart-proxy/pull/592
175+
176+
~~~ENDSECTION~~~
177+
168178
~~~SECTION:handouts~~~
169179
170180
****

configmanagement/02_puppet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ from unprivileged users.
258258
259259
Navigate to "Configure > Classes" and select the class "training::user". In the "Smart Class Parameter" tab
260260
insert your name as Default Value for the id of the user, add a ssh public key as Default Value for ssh_pub_key,
261-
for the parameter sudo select override and set the default to true.
261+
for the parameter sudo select override, set the key type to boolean and the default to true.
262262
263263
Hint: To create a ssh key pair run "ssh-keygen". The key string required for the puppet module is the second part
264264
of the pub file.

configmanagement/03_ansible.md

Lines changed: 19 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ back to other tools.
5151
* Ansible transfers reports to Foreman via callback
5252
* Ansible uses Foreman as dynamic inventory
5353
54-
~~~SECTION:notes~~~
55-
56-
Role import is broken in the Smart proxy but works still in the Foreman integration
57-
Playing roles is broken in Foreman integration but works using Smart proxy
58-
59-
~~~ENDSECTION~~~
60-
6154
~~~SECTION:handouts~~~
6255
6356
****
@@ -143,14 +136,14 @@ The playbook only requires an array of hosts and roles.
143136
### Configure callback plugin
144137
145138
# vi /etc/ansible/ansible.cfg
139+
[defaults]
146140
callback_whitelist = foreman
147-
bin_ansible_callbacks = True
148-
# vi .bash_profile
149-
export FOREMAN_URL="https://foreman.localdomain"
150-
export FOREMAN_SSL_CERT="/etc/puppetlabs/puppet/certs/foreman.localdomain.pem"
151-
export FOREMAN_SSL_KEY="/etc/puppetlabs/puppet/private_keys/foreman.localdomain.pem"
152-
export FOREMAN_SSL_VERIFY="false"
153-
# . .bash_profile
141+
...
142+
[callback_foreman]
143+
url = 'https://foreman.example.com'
144+
ssl_cert = /etc/puppetlabs/puppet/ssl/certs/foreman.localdomain.pem
145+
ssl_key = /etc/puppetlabs/puppet/ssl/private_keys/foreman.localdomain.pem
146+
verify_certs = /etc/puppetlabs/puppet/ssl/certs/ca.pem
154147
155148
### Add your host to the inventory
156149
@@ -166,7 +159,7 @@ The playbook only requires an array of hosts and roles.
166159
167160
### Download the role "reallyenglish.ntpd"
168161
169-
# ansible-galaxy install reallyenglish.ntpd
162+
# ansible-galaxy install reallyenglish.ntpd -p /etc/ansible/roles
170163
171164
### Create a playbook and run it
172165
@@ -228,8 +221,8 @@ You can run the script directly to the output and use it with the parameter `-i`
228221
229222
### Download Dynamic Inventory and sample configuration
230223
231-
# wget -p /etc/ansible/ http://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/foreman.ini
232-
# wget -p /etc/ansible/ http://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/foreman.py
224+
# wget -P /etc/ansible/ http://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/foreman.ini
225+
# wget -P /etc/ansible/ http://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/foreman.py
233226
# chmod +x /etc/ansible/foreman.py
234227
235228
### Adjust configuration
@@ -255,16 +248,14 @@ You can run the script directly to the output and use it with the parameter `-i`
255248
* Steps:
256249
* Install Foreman Plugin and Smart Proxy Plugin
257250
* Import roles and assign them
258-
* Configure settings in Foreman
259251
* Prepare Smart proxy to play roles
260252
* Play roles using the webinterface
261253
262254
~~~SECTION:handouts~~~
263255
264256
****
265257
266-
Graphical integration has some bugs and requires improvements which are worked on.
267-
Also integration with the callback plugin is not easy as it utilizes environment variables for configuration.
258+
Graphical integration uses Remote-Execution plugin which will be covered later in more depth.
268259
269260
~~~ENDSECTION~~~
270261
@@ -283,19 +274,9 @@ Also integration with the callback plugin is not easy as it utilizes environment
283274
284275
* Install Foreman Plugin and Smart Proxy Plugin using foreman-installer
285276
* Import roles and assign them
286-
287-
This requires to adjust the Ansible configuration to include only a single roles_path.
288-
289-
* Configure settings in Foreman
290-
291-
You can configure the account used, the password and how to get superuser privileges.
292-
You can override configuration with host parameters.
293-
In production do not use root, but keep it now.
294-
295277
* Prepare Smart proxy to play roles
296278
297-
Smart Proxy needs a SSH configuration to disable host key checking and an Ansible directory
298-
to play roles.
279+
Smart Proxy needs a SSH key to play roles.
299280
300281
* Play roles using the webinterface
301282
@@ -315,25 +296,17 @@ to play roles.
315296
316297
* Import roles and assign them
317298
318-
Adjust the Ansible configuration to include only a single roles_path.
319-
320-
# vi /etc/ansible/ansible.cfg
321-
roles_path = /etc/ansible/roles
322-
323-
Navigate to "Configure > Roles" and import using "Import from Foreman host".
299+
Navigate to "Configure > Roles" and import using "Import from foreman.localdomaon".
324300
Afterwards navigate to the host and edit them to assign the roles in the new "Ansible Roles" tab.
325301
326-
* Configure settings in Foreman
327-
328-
Navigate to "Administer > Settings", on the "Ansible" tab set the password.
329-
330302
* Prepare Smart proxy to play roles
331303
332-
# install -o foreman-proxy -g foreman-proxy -m 0755 -d ~foreman-proxy/.ansible
333-
# install -o foreman-proxy -g foreman-proxy -m 0755 -d ~foreman-proxy/.ssh
334-
# sudo -u foreman-proxy vi ~foreman-proxy/.ssh/config
335-
Host *
336-
StrictHostKeyChecking on
304+
# install -o foreman-proxy -g foreman-proxy -m 0700 -d ~foreman-proxy/.ssh
305+
# su - foreman-proxy -s /bin/bash
306+
# ssh-keygen -f .ssh/id_rsa_foreman_proxy
307+
[ENTER]
308+
[ENTER]
309+
# ssh-copy-id -i .ssh/id_rsa_foreman_proxy root@foreman.localdomain
337310
338311
* Play roles using the webinterface
339312
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
!SLIDE small noprint
22
# Forthcoming Hands-on Training
33

4-
* 06.03.2018 - 07.03.2018 [NETWAYS](https://www.netways.de/schulungen/foreman/) (German)
5-
* 03.07.2018 - 04.07.2018 [NETWAYS](https://www.netways.de/schulungen/foreman/) (German)
6-
* 20.11.2018 - 21.11.2018 [NETWAYS](https://www.netways.de/schulungen/foreman/) (German)
4+
* 20.11.2018 - 21.11.2018 [NETWAYS](https://www.netways.de/en/trainings/foreman/) (German)
75

86

97
!SLIDE center noprint
108
# Forthcoming Hands-on Training
119

1210
For other events and trainings hosted by NETWAYS see our
1311

14-
[event calendar](https://www.netways.de/en/about_netways/events/)
12+
[event calendar](https://www.netways.de/en/about_us/events/)

0 commit comments

Comments
 (0)