Skip to content

Commit f609fd3

Browse files
committed
Open source release
0 parents  commit f609fd3

File tree

239 files changed

+19694
-0
lines changed

Some content is hidden

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

239 files changed

+19694
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
stats

.nojekyll

Whitespace-only changes.

COPYING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Copyright (c) 2016 NETWAYS GmbH <[email protected]>
2+
3+
Material is licensed under (http://creativecommons.org/licenses/by-sa/4.0/)[http://creativecommons.org/licenses/by-sa/4.0/]

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Training
2+
3+
This training is designed as a two day hands-on training introducing Foreman.
4+
5+
In the training you will get basic knowlegde of the architecture of Foreman. You will
6+
install and configure Foreman to provide several ways of provisioning. The configuration
7+
management solution used is Puppet to show configuration management integration into Foreman.
8+
Furthermore user and permission management of Foreman is shown. And last but not least
9+
Foreman's extensibility is shown by introducing some plugins from basic ones to Katello.
10+
11+
Targeted audience are experienced Linux administrators in need of a provisioning and
12+
management solution for their systems. Knowledgement of Puppet is of advantage but not
13+
required.
14+
15+
## Online Material
16+
17+
In addition to the sources you can find the rendered material on
18+
[netways.github.io](https://netways.github.io/foreman-training)
19+
20+
* [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)
24+
25+
## Provide your own training
26+
27+
Feel free to use this material as it is to provide your own training.
28+
29+
To run the presentation you will need [showoff 0.9.11.1](https://rubygems.org/gems/showoff/versions/0.9.11.1).
30+
After installing it simply run `showoff serve` to get presenter mode with additional notes
31+
and display window to present to your students.
32+
33+
For creating the rendered documents on your own run `showoff static print` (handouts),
34+
`showoff static supplemental exercises` (exercises) or `showoff static supplemental solutions`
35+
(solutions) followed by
36+
`wkhtmltopdf -s A5 --print-media-type --footer-left [page] --footer-right 'Foreman Training' static/index.html handouts.pdf`
37+
38+
If you want to change the design to represent your corporate identity have a look at 'foreman.css',
39+
to change the included content adjust 'showoff.json' for example to add your own introduction as pre slides.
40+
41+
There will be optional content included in the training repository which does not fit in our
42+
two day training, for example adding content about Docker integration is planed. This material
43+
can be included in your training material by changing 'showoff.json', too. In the same way
44+
remove content you do not want to show or change order if you feel it fits your need better.
45+
46+
For some notes on setting up the training enviroment have a look at 'Setup.md'.
47+
48+
If you provide a training we would be happy to add it to the forthcoming trainings to give you
49+
some promotion on this site, simply contribute your date to the slides. In exchange we would like
50+
you to credit us for providing the material.
51+
In addition you can make sure to add it to the [events](http://theforeman.org/events/) listed by
52+
the Foreman project.
53+
54+
# Contribution
55+
56+
Patches to fix mistakes or add optional content are always appreciated. If you want to see
57+
changes on the default content of the training we are open for suggestions but keep in mind
58+
that the training is intended for a two day hands-on training.
59+
60+
The rendered content will be updated at least if we do a newer version of the material which
61+
will also be tagged on git.
62+
63+
Material is licensed under [Creative Commons Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).

Setup.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Setup
2+
3+
## Virtual machine
4+
5+
To setup a new version of the virtual machine install CentOS from ISO, only configuration required is
6+
setting the network interface to manual, ip address 10.0.0.2, netmask 255.255.0.0, gateway 10.0.0.1,
7+
dns 10.0.0.1.
8+
9+
Afterwards run the finish.sh provided in the _files directory to setup host entries and openldap.
10+
11+
## Local mirror
12+
13+
A Vagrant file is provided in the directory to setup a local mirror of CentOS 7 x86_64, EPEL 7 x86_64
14+
and Puppetlabs EPEL 7 x86_64. This machine will require about 20GB.
15+
16+
## Katello Demo
17+
18+
To setup the Katello demo follow this guide:
19+
20+
# git clone https://github.com/Katello/katello-deploy.git
21+
# cd katello-deploy
22+
# vagrant up centos7-2.4
23+
24+
This will setup your Katello server, login with the provided credentials and add the following content:
25+
26+
* GPG Key "RPM-GPG-KEY-CentOS-7" by uploading the key from a CentOS 7 system
27+
* Product "CentOS7" with the key assigned
28+
* 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
30+
* Life Cycle Environment "Test" and "Production"
31+
* Content View "CentOS7"
32+
* Add the Repository "CentOS7-Base-x86_64"
33+
* Publish new version
34+
* Promote "Version 1.0" to Life Cycle Environment "Test"
35+
* Activation Key "CentOS7-Test"
36+
* Assigned to Life Cycle Environment "Test" and Content View "CentOS7"
37+
* Subscription to Repository "CentOS7-Base-x86_64"
38+
39+
Use this information to deploy some docker containers as Content Hosts:
40+
41+
# cd docker/clients/
42+
# cp docker-compose.yml.example docker-compose.yml
43+
# vi docker-compose.yml
44+
# docker-compose scale el7=5
45+

Vagrantfile

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure(2) do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://atlas.hashicorp.com/search.
15+
config.vm.box = "https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-7.1/centos-7.1.box"
16+
config.vm.hostname = "mirror"
17+
config.vm.synced_folder ".", "/vagrant", type: "rsync"
18+
19+
# Disable automatic box update checking. If you disable this, then
20+
# boxes will only be checked for updates when the user runs
21+
# `vagrant box outdated`. This is not recommended.
22+
# config.vm.box_check_update = false
23+
24+
# Create a forwarded port mapping which allows access to a specific port
25+
# within the machine from a port on the host machine. In the example below,
26+
# accessing "localhost:8080" will access port 80 on the guest machine.
27+
# config.vm.network "forwarded_port", guest: 80, host: 8080
28+
29+
# Create a private network, which allows host-only access to the machine
30+
# using a specific IP.
31+
# config.vm.network "private_network", ip: "192.168.33.10"
32+
33+
# Create a public network, which generally matched to bridged network.
34+
# Bridged networks make the machine appear as another physical device on
35+
# your network.
36+
# config.vm.network "public_network"
37+
38+
# Share an additional folder to the guest VM. The first argument is
39+
# the path on the host to the actual folder. The second argument is
40+
# the path on the guest to mount the folder. And the optional third
41+
# argument is a set of non-required options.
42+
# config.vm.synced_folder "../data", "/vagrant_data"
43+
44+
# Provider-specific configuration so you can fine-tune various
45+
# backing providers for Vagrant. These expose provider-specific options.
46+
# Example for VirtualBox:
47+
#
48+
# config.vm.provider "virtualbox" do |vb|
49+
# # Display the VirtualBox GUI when booting the machine
50+
# vb.gui = true
51+
#
52+
# # Customize the amount of memory on the VM:
53+
# vb.memory = "1024"
54+
# end
55+
#
56+
# View the documentation for the provider you are using for more
57+
# information on available options.
58+
59+
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
60+
# such as FTP and Heroku are also available. See the documentation at
61+
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
62+
# config.push.define "atlas" do |push|
63+
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
64+
# end
65+
66+
# Enable provisioning with a shell script. Additional provisioners such as
67+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
68+
# documentation for more information about their specific syntax and use.
69+
config.vm.provision "shell", inline: <<-SHELL
70+
sleep 10
71+
sudo yum -y install rsync httpd
72+
sudo systemctl enable httpd.service
73+
sudo systemctl start httpd.service
74+
# CentOS 7
75+
sudo mkdir -p /var/www/html/centos/7.2.1511/os/
76+
sudo ln -s /var/www/html/centos/7.2.1511 /var/www/html/centos/7
77+
sudo rsync -avSHP --delete --exclude "local*" --exclude "isos" mirror.eu.oneandone.net::centos/7.2.1511/os/ /var/www/html/centos/7.2.1511/os/
78+
sudo mkdir -p /var/www/html/epel/7/x86_64/
79+
sudo rsync -vaH --exclude="debug*" --numeric-ids --delete --delete-after --delay-updates rsync://rsync.hrz.tu-chemnitz.de/fedora-epel/7/x86_64/ /var/www/html/epel/7/x86_64/
80+
sudo mkdir -p /var/www/html/puppetlabs/el/7/dependencies/x86_64/
81+
sudo rsync -av --copy-links --del rsync://yum.puppetlabs.com/packages/yum/el/7/dependencies/x86_64/ /var/www/html/puppetlabs/el/7/dependencies/x86_64/
82+
sudo mkdir -p /var/www/html/puppetlabs/el/7/products/x86_64/
83+
sudo rsync -av --copy-links --del rsync://yum.puppetlabs.com/packages/yum/el/7/products/x86_64/ /var/www/html/puppetlabs/el/7/products/x86_64/
84+
SHELL
85+
end

_files/share/finish.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
echo "foreman.localdomain" > /etc/hostname
2+
echo "10.0.0.1 host.localdomain host" >> /etc/hosts
3+
echo "10.0.0.2 foreman.localdomain foreman" >> /etc/hosts
4+
5+
yum install -y openldap-servers openldap-clients
6+
7+
echo 'dn: olcDatabase={2}hdb,cn=config
8+
changetype: modify
9+
replace: olcSuffix
10+
olcSuffix: dc=localdomain
11+
-
12+
replace: olcRootDN
13+
olcRootDN: cn=admin,dc=localdomain
14+
-
15+
add: olcRootPW
16+
olcRootPW: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s' > start.ldif
17+
18+
echo 'dn: dc=localdomain
19+
dc: localdomain
20+
ou: localdomain
21+
objectClass: dcObject
22+
objectClass: organizationalUnit' > domain.ldif
23+
24+
echo 'dn: ou=users,dc=localdomain
25+
objectClass: organizationalUnit
26+
ou: users
27+
description: Users
28+
29+
dn: cn=administrator,ou=users,dc=localdomain
30+
objectClass: inetOrgPerson
31+
cn: administrator
32+
sn: User
33+
description: Administrator
34+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
35+
givenName: Administrator
36+
mail: administrator@localdomain
37+
uid: administrator
38+
39+
dn: cn=viewer,ou=users,dc=localdomain
40+
objectClass: inetOrgPerson
41+
cn: viewer
42+
sn: User
43+
description: Viewer
44+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
45+
givenName: Viewer
46+
mail: viewer@localdomain
47+
uid: viewer
48+
49+
dn: cn=selfservice,ou=users,dc=localdomain
50+
objectClass: inetOrgPerson
51+
cn: selfservice
52+
sn: User
53+
description: Selfservice
54+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
55+
givenName: Selfservice
56+
mail: selfservice@localdomain
57+
uid: selfservice
58+
59+
dn: ou=groups,dc=localdomain
60+
objectClass: organizationalUnit
61+
ou: groups
62+
description: Groups
63+
64+
dn: cn=admins,ou=groups,dc=localdomain
65+
objectClass: posixGroup
66+
cn: admins
67+
description: Admins
68+
gidNumber: 666
69+
memberUid: administrator' > users.ldif
70+
71+
systemctl start slapd
72+
systemctl enable slapd
73+
ldapadd -Y EXTERNAL -H ldapi:/// -f start.ldif
74+
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
75+
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
76+
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
77+
ldapadd -x -D "cn=admin,dc=localdomain" -w netways -f domain.ldif
78+
ldapadd -x -D "cn=admin,dc=localdomain" -w netways -f users.ldif
79+

_files/share/puppetmodules.tar.gz

123 KB
Binary file not shown.

_files/share/users.ldif

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
dn: ou=users,dc=localdomain
2+
objectClass: organizationalUnit
3+
ou: users
4+
description: Users
5+
6+
dn: cn=administrator,ou=users,dc=localdomain
7+
objectClass: inetOrgPerson
8+
cn: administrator
9+
sn: User
10+
description: Administrator
11+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
12+
givenName: Administrator
13+
mail: administrator@localdomain
14+
uid: administrator
15+
16+
dn: cn=viewer,ou=users,dc=localdomain
17+
objectClass: inetOrgPerson
18+
cn: viewer
19+
sn: User
20+
description: Viewer
21+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
22+
givenName: Viewer
23+
mail: viewer@localdomain
24+
uid: viewer
25+
26+
dn: cn=selfservice,ou=users,dc=localdomain
27+
objectClass: inetOrgPerson
28+
cn: selfservice
29+
sn: User
30+
description: Selfservice
31+
userPassword: {SSHA}pQjSq3J3wXsHahiaYh6UyQpCTFx4G80s
32+
givenName: Selfservice
33+
mail: selfservice@localdomain
34+
uid: selfservice
35+
36+
dn: ou=groups,dc=localdomain
37+
objectClass: organizationalUnit
38+
ou: groups
39+
description: Groups
40+
41+
dn: cn=admins,ou=groups,dc=localdomain
42+
objectClass: posixGroup
43+
cn: admins
44+
description: Admins
45+
gidNumber: 666
46+
memberUid: administrator

advanced/00_overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
!SLIDE subsection
2+
# ~~~SECTION:MAJOR~~~ Advanced Topics
3+

0 commit comments

Comments
 (0)