Skip to content

Commit

Permalink
updates to latest releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoetz committed Mar 14, 2019
1 parent de23906 commit 04727be
Show file tree
Hide file tree
Showing 21 changed files with 117 additions and 78 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ In addition to the sources you can find the rendered material on
[netways.github.io](https://netways.github.io/foreman-training)

* [Presentation](https://netways.github.io/foreman-training)
* [Handouts](https://github.com/NETWAYS/foreman-training/releases/download/v1.3/foreman-training-handouts.pdf)
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.3/foreman-training-exercises.pdf)
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.3/foreman-training-solutions.pdf)
* [Handouts](https://github.com/NETWAYS/foreman-training/releases/download/v1.4/foreman-training-handouts.pdf)
* [Exercises](https://github.com/NETWAYS/foreman-training/releases/download/v1.4/foreman-training-exercises.pdf)
* [Solutions](https://github.com/NETWAYS/foreman-training/releases/download/v1.4/foreman-training-solutions.pdf)

## Provide your own training

Expand Down
10 changes: 8 additions & 2 deletions Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To setup the Katello demo follow this guide (it requires vagrant and ansible to

# git clone https://github.com/Katello/forklift.git
# cd forklift
# vagrant up centos7-katello-3.7
# vagrant up centos7-katello-3.10

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

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

Register the system to itself:

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

If you own a Red Hat Developer Subscription, it is also possible to create a Manifest and show the Red Hat
specific parts.

If you own a SUSE Subscription, you can install "tfm-rubygem-foreman_scc_manager" to show the SLES specific
parts. At the moment it requires you to install the nightly package because 3.10 does not include plugin
version 1.6.0 or higher.
6 changes: 3 additions & 3 deletions advanced/03_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ If you want to see all systems reported to run operating system "Debian" :
In the following command the ids depend on your environment and may differ:

# curl -k -u admin:PASSWORD -H "Accept: version=2,application/json" -H "Content-Type: application/json" \
-X POST -d '{ "name":"training", "environment_id":"1", "puppet_ca_proxy_id":"1", "puppet_proxy_id":"1",
"subnet_id":"1", "domain_id":"1", "architecture_id":"1", "operatingsystem_id":"1", medium_id":"1", "ptable_id":"94",
"root_pass":"start123" }' \
-X POST -d '{ "name":"training", "environment_id":1, "puppet_ca_proxy_id":1, "puppet_proxy_id":1,
"subnet_id":1, "domain_id":1, "architecture_id":1, "operatingsystem_id":1, "medium_id":1, "ptable_id":94,
"root_pass":"start123", "organization_id":2, "location_id":1 }' \
https://foreman.localdomain/api/hostgroups | python -m json.tool

### Change the root password for the hostgroup "training" using the API
Expand Down
8 changes: 4 additions & 4 deletions advanced/04_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ A list of plugins is provided by the Github page of the framework: https://githu

Adjust the configuration if required in `~/.hammer/cli.modules.d/foreman.yml`:

# vi ~/.hammer/cli.modules.d/foreman.yml
:foreman:
:username: 'admin'
:password: 'PASSWORD'
# vi ~/.hammer/cli.modules.d/foreman.yml
:foreman:
:username: 'admin'
:password: 'PASSWORD'

### Create the new Operatingsystem entry for "CentOS 6.8"

Expand Down
12 changes: 2 additions & 10 deletions advanced/05_multitenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,13 @@
****
Foreman has build in multitenancy which is not enabled by default. To enable it run the Foreman Installer
with the corresponding parameters or edit "/etc/foreman/settings.yaml".
Foreman has build in multitenancy which is starting from version 1.21 enabled by default.
Depending on your needs you can add Organizations and/or Locations. After that every object will require
Depending on your needs you can add Organizations and/or Locations. Every object will require
exactly one context with the exception of users who can have multiple contexts and one of these assigned
as their default context. But he has to keep care of in which context he works because objects he creates
will be in this context.
Organization and Location can both be nested to represent a hierarchy with a top-down approach.
~~~PAGEBREAK~~~

The best way to think about multitenancy is in advance and if it could be required directly from the start of your enviroment.
Later enabling is possible but migration is a quite challenging and time consuming task.

In Katello it is enabled by default, so we will see it in the last chapter.

~~~ENDSECTION~~~
7 changes: 3 additions & 4 deletions advanced/06_troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ the agent has to run more than once to complete the full configuration.
* IRC
* User channel for support
* Developer channel for development support
* Mailing lists
* Users list for support, questions, etc
* Developer list for development support
* Community Platform based on Discourse
* Server fault
* Youtube
* Issue tracker
Expand All @@ -136,7 +134,8 @@ First have a look into the Wiki page collecting common issues: http://projects.t
If your problem is not covered there the fastest way to get in touch with the team is the IRC Channel. The channel #theforeman is
hosted on irc.freenode.net, the developer channel #theforeman-dev is only for support on development of Foreman and plugins.

Same goes for the mailing lists hosted via Google Groups. To subscribe simply send a email to foreman-users+subscribe@googlegroups.com for the user list, to foreman-dev+subscribe@googlegroups.com for development support and for release and security information to foreman-announce+subscribe@googlegroups.com.
The mailing lists have been replaced with Discourse to provide a Community Platform which is basicly a forum with mailing list support.
You can get help here, discuss development and follow release workflow including test weeks.

On 'Server Fault' you can ask questions and find answers tagged with foreman: http://serverfault.com/questions/tagged/foreman

Expand Down
14 changes: 7 additions & 7 deletions configmanagement/03_ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ to use Foreman as dynamic inventory.
* Configure callback plugin
* Add your host to the inventory
* Create and distribute a SSH key
* Download the role "reallyenglish.ntpd"
* Download the role "geerlingguy.ntp"
* Create a playbook and run it

!SLIDE supplemental exercises
Expand Down Expand Up @@ -107,7 +107,7 @@ We will use the static configuration for now, dynamic inventory will be introduc

Use `ssh-keygen` and `ssh-copy-id`.

* Download the role "reallyenglish.ntpd"
* Download the role "geerlingguy.ntp"

Ansible roles can be downloaded from Ansible Galaxy using the CLI.

Expand Down Expand Up @@ -140,7 +140,7 @@ The playbook only requires an array of hosts and roles.
callback_whitelist = foreman
...
[callback_foreman]
url = 'https://foreman.example.com'
url = 'https://foreman.localdomain'
ssl_cert = /etc/puppetlabs/puppet/ssl/certs/foreman.localdomain.pem
ssl_key = /etc/puppetlabs/puppet/ssl/private_keys/foreman.localdomain.pem
verify_certs = /etc/puppetlabs/puppet/ssl/certs/ca.pem
Expand All @@ -157,17 +157,17 @@ The playbook only requires an array of hosts and roles.
[Enter]
# ssh-copy-id foreman.localdomain

### Download the role "reallyenglish.ntpd"
### Download the role "geerlingguy.ntp"

# ansible-galaxy install reallyenglish.ntpd -p /etc/ansible/roles
# ansible-galaxy install geerlingguy.ntp -p /etc/ansible/roles

### Create a playbook and run it

# vi playbook.yml
---
- hosts: foreman.localdomain
roles:
- reallyenglish.ntpd
- geerlingguy.ntp
# ansible-playbook playbook.yml


Expand Down Expand Up @@ -310,4 +310,4 @@ Afterwards navigate to the host and edit them to assign the roles in the new "An

* Play roles using the webinterface

Navigate to the host and press "Ansible roles". It is also avaiable as action from the Host overview for bulk requests.
Navigate to the host and press "Run Ansible roles" from the "Schedule Remote Job" selection. It is also available as action from the Host overview for bulk requests.
6 changes: 4 additions & 2 deletions global/Pre/Training/02_Forthcoming_Training.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
!SLIDE small noprint
# Forthcoming Hands-on Training

* 20.11.2018 - 21.11.2018 [NETWAYS](https://www.netways.de/en/trainings/foreman/) (German)
* 09.04.2019 - 10.04.2019 [NETWAYS](https://www.netways.de/trainings/foreman/) (German)
* 16.07.2019 - 17.07.2019 [NETWAYS](https://www.netways.de/trainings/foreman/) (German)
* 12.11.2019 - 13.11.2019 [NETWAYS](https://www.netways.de/trainings/foreman/) (German)


!SLIDE center noprint
# Forthcoming Hands-on Training

For other events and trainings hosted by NETWAYS see our

[event calendar](https://www.netways.de/en/about_us/events/)
[event calendar](https://www.netways.de/en/events/)
18 changes: 16 additions & 2 deletions installation/04_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ With the provided credentials login to 'https://foreman.localdomain' using your
* If the Puppet agent on the Foreman server has already run the domain will already be created
but not associated.
* With Foreman 1.21 multi-tenancy is active by default, but not all objects get it assigned by default.
~~~ENDSECTION~~~

Expand All @@ -248,6 +249,10 @@ but not associated.
If the Puppet agent on the Foreman server has already run the domain will already be created
but not associated.

With Foreman 1.21 multi-tenancy is active by default, but not all objects get it assigned by default.
So you have to switch to "Any Organization" and "Any Location" to find those objects and ensure
organization and location are set when adjusting objects.


!SLIDE supplemental solutions
# Lab ~~~SECTION:MAJOR~~~.~~~SECTION:MINOR~~~: Add DNS configuration to Foreman
Expand All @@ -272,7 +277,8 @@ Click on 'New Domain' and in the dialog insert:
* DNS Proxy: 'foreman.localdomain'

If the domain 'localdomain' was already created click on the domain name and change the
DNS Proxy to 'foreman.localdomain'.
DNS Proxy to 'foreman.localdomain'. Ensure organization and location are set to "Default
Organization" and "Default Location".

Press 'Submit' to store the configuration.

Expand All @@ -290,6 +296,7 @@ Press 'Submit' to store the configuration.
~~~SECTION:notes~~~
* Subnets are not automatically created like domains.
* The Smart Proxy should be moved into organization and location before creating the subnet.
~~~ENDSECTION~~~

Expand All @@ -315,6 +322,9 @@ Press 'Submit' to store the configuration.

We will use the complete DHCP range the DHCP server provides.

Ensure the Smart Proxy is in the correct organization and location and that you are in the right
context when creating the subnet.


!SLIDE supplemental solutions
# Lab ~~~SECTION:MAJOR~~~.~~~SECTION:MINOR~~~: Add DHCP configuration to Foreman
Expand All @@ -332,15 +342,17 @@ We will use the complete DHCP range the DHCP server provides.
Select 'Import IPv4 subnets' from the drop down menu next to the Smart Proxy 'foreman.localdomain' and in the dialog insert:

* Name: 'foreman'
* Description: keep empty
* Protocol: IPv4
* Network address: '10.0.0.0'
* Network mask: '255.255.0.0'
* Network prefix: '16'
* Network mask: '255.255.0.0'
* Gateway address: '10.0.0.1'
* Primary DNS server: '10.0.0.2'
* Secondary DNS server: keep empty
* IPAM: 'DHCP'
* VLAN ID: keep empty
* MTU: keep default
* Boot mode: 'DHCP'

Press 'Submit' to store the configuration.
Expand All @@ -361,4 +373,6 @@ Afterwards we have to return to the configuration via 'Infrastructure > Subnets'
* TFTP Proxy: 'foreman.localdomain'
* Reverse DNS Proxy: 'foreman.localdomain'

No parameters, "Default Organization" and "Default location" should be the default.

Press 'Submit' to store the configuration with this change.
4 changes: 0 additions & 4 deletions katello/01_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* Red Hat Subscriptions
* Track internal use
* Defined scenario for Foreman Installer
* Multitenancy is enabled by default
* Upstream project for Red Hat Network Satellite 6

<div style="text-align:right">
Expand All @@ -34,7 +33,6 @@
* Red Hat Subscriptions
* Track internal use
* Defined scenario for Foreman Installer
* Multitenancy enabled by default
* Upstream project for Red Hat Network Satellite 6

~~~SECTION:handouts~~~
Expand All @@ -54,8 +52,6 @@ cases Red Hat. It also provides the possiblity to track the internal use of some
It uses the same technology for installation as the Foreman by providing a scenario to the Foreman installer. The usage of this
installer is the supported way of installation for Katello, so there is no way of adding the plugin later to an existing Foreman installation for now.
It alters Foreman in several ways including enabling multitenancy by default to enable internal Subscription managment.
Katello is also the upstream project for Red Hat Network Satellite 6 like Spacewalk was for Satellite 5.
Detailed information on the project homepage: http://www.katello.org/
Expand Down
6 changes: 6 additions & 0 deletions katello/03_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* Products and Repositories on click
* Content Hosts consume subscriptions

* SUSE
* Similar workflow to Red Hat via Plugin

* Other software
* Tracks subscribed Content Hosts for products

Expand All @@ -24,6 +27,9 @@ synchronize them to your system.
~~~PAGEBREAK~~~

For SUSE a similar workflow can be enabled when using the Foreman SCC Manager plugin which is
available as package and you can find upstream at https://github.com/ATIX-AG/foreman_scc_manager.

The Content Hosts cosume these subscriptions in the same way like they were directly connected to
the Red Hat Network. If you purchased Virtual Subscriptions it requires you to run virt-what and
report your virtualization hosts before you can consume subscriptions with the virtual machines.
Expand Down
2 changes: 1 addition & 1 deletion plugins/02_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Additional templates are available in the WebGUI.
### Run the synchronisation job with an API call

# curl -H "Accept:application/json,version=2" -H "Content-Type:application/json" \
-u admin:PASSWORD -k https://foreman.example.com/api/v2/templates/import -X POST
-u admin:PASSWORD -k https://foreman.localdomain/api/v2/templates/import -X POST

### Optional: Change settings to add a prefix during import

Expand Down
2 changes: 1 addition & 1 deletion plugins/03_dhcp_browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ More details on: https://github.com/theforeman/foreman_dhcp_browser
You will find one reservation for every host created earlier.

!SLIDE supplemental solutions
# Lab ~~~SECTION:MAJOR~~~.~~~SECTION:MINOR~~~: Templates
# Lab ~~~SECTION:MAJOR~~~.~~~SECTION:MINOR~~~: DHCP Browser

****

Expand Down
16 changes: 13 additions & 3 deletions plugins/08_openscap.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ More details on: https://theforeman.org/plugins/foreman_openscap/0.8/index.html
* Install the Foreman and Smart Proxy Plugin OpenSCAP
* Make the Puppet Module "foreman_scap_client" available
* Create a Policy for CentOS 7 and assign it to a host
* Make the Foreman client repository available to one host
* Initiate a Puppet agent run on the host
* Create a report on the host and upload it to the Smart proxy
* Upload the report from the Smart proxy to the Foreman
Expand All @@ -67,6 +68,7 @@ More details on: https://theforeman.org/plugins/foreman_openscap/0.8/index.html
* Install the Foreman and Smart Proxy Plugin OpenSCAP using the foreman-installer
* Make the Puppet Module "foreman_scap_client" available
* Create a Policy for CentOS 7 and assign it to a host
* Make the Foreman client repository available to one host
* Initiate a Puppet agent run on the host
* Create a report on the host and upload it to the Smart proxy
* Upload the report from the Smart proxy to the Foreman
Expand Down Expand Up @@ -112,21 +114,29 @@ The Foreman plugin requires the datastream files which have "ds" in their name.
"Hosts > SCAP content" and name it "Centos-7".
Content files are avaiable now so navigate to "Hosts > Policies" to create a "New Policy".
Name it "Centos-7-Common", choose SCAP Content "Centos-7" and XCCDF Profile "Common Profile for General-Purpose System",
Name it "Centos-7-Common", choose SCAP Content "Centos-7" and XCCDF Profile "Standard System Security Profile",
schedule it "Weekly" on "Sunday" and assign it to Hostgroup "SCAP".
To view the guide click on the "Show Guide" button next to the policy.
Assign this Hostgroup to one off your CentOS 7 systems.
### Execute a Puppet agent run on the host
### Make the Foreman client repository available to one host
Login to the host you assigned the Hostgroup with the Policy and execute
# puppet agent -t
# yum install -y http://yum.theforeman.org/client/1.21/el7/x86_64/foreman-client-release.rpm
Replace the version number with the one of your Foreman installation.
~~~PAGEBREAK~~~

### Execute a Puppet agent run on the host

Login to the host you assigned the Hostgroup with the Policy and execute

# puppet agent -t

### Create a report on the host and upload to Smart proxy

The Puppet agent prepared a cronjob on your system, get it and execute its content.
Expand Down
2 changes: 1 addition & 1 deletion plugins/09_cockpit.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ More details on: https://github.com/theforeman/foreman_cockpit

~~~SECTION:notes~~~
Requires https://github.com/theforeman/foreman_cockpit/pull/15 to be merged
Requires https://github.com/theforeman/foreman_cockpit/pull/15 to be applied via patch as it is not a part of release
~~~ENDSECTION~~~

Expand Down
2 changes: 1 addition & 1 deletion plugins/10_remote_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Puppet run is executed on the remote system and report is uploaded
This will install both the Foreman and Smart proxy Plugin, create a SSH key and restart the services.
# foreman-installer --enable-foreman-plugin-remote-execution\
# foreman-installer --enable-foreman-plugin-remote-execution \
--enable-foreman-proxy-plugin-remote-execution-ssh
### Bring out the SSH key
Expand Down
2 changes: 1 addition & 1 deletion provisioning/02_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Partition tables are handled separately to allow the usage of the same host temp
* Steps:
* Change the Installation media "CentOS mirror" to the local repo
* Associate the PXELinux template "Kickstart default PXELinux" with CentOS
* Associate the Provision template "Kickstart RHEL default" with CentOS
* Associate the Provision template "Kickstart default" with CentOS
* Associate the operating system with the Partition table "Kickstart default", Installation media "CentOS mirror",
select the Templates and set Parameter "enable-puppetlabs-puppet5-repo" to "true"
Expand Down
Loading

0 comments on commit 04727be

Please sign in to comment.