Top Banner
Lifecycle-Management mit Foreman und Katello Grundlagen und Spacewalk-Migration Christian Stankowic www.stankowic-development.net Free and Open Source software Conference 19.08.2017
78

 · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Jul 12, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Lifecycle-Management mit Foreman

und KatelloGrundlagen undSpacewalk-Migration

Christian Stankowicwww.stankowic-development.net

Free and Open Source softwareConference19.08.2017

Page 2:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

whoami

Christian Stankowic

VMware Global Inc.

Senior PSO Consultant

Blogger & Fachbuchautor

2

Page 3:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

AGENDA

Page 4:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Agenda

Überblick

Installation

Content-Management

Puppet

Automatisierung

Spacewalk-Migration

4

Page 5:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

ÜBERBLICK

Page 6:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Was ist Foreman?

Quelloffene Lifecycle-Management-Suite

Erstellung, Konfiguration undInventarisierung1 von Systemen

Unterstützt Konfiguration mittels Puppetoder optional2 Chef, Salt und Ansible

1. Facts, system profiling2. per Plugin

6

Page 7:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

facter

1 $ facter -p

2 architecture => x86_64

3 domain => stankowic.loc

4 interfaces => docker0,ens192,lo

5 ...

6 memoryfree => 1.14 GB

7 processor0 => Intel(R) Xeon(R) CPU D-1518

@ 2.20GHz

8 virtual => vmware

Listing 1: Ausgabe von facter7

Page 9:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Virtualize _all_ the workloads

Integration in gängige Hypervisor- undCloud-Plattformen:

VMware vSphere3oVirtAmazon EC2Microsoft AzureXENOpenStack, OpenNebula

3. ESXi und vCenter Server

9

Page 10:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Weitere Features

rollenbasierte Konfiguration

Mandantenfähig

Integration in LDAP, FreeIPA und MicrosoftActive Directory Domain Services

Verteilen von Infrastruktur-Diensten inSatelliten-Instanzen

Gut dokumentierte RESTful API zurAutomatisierung

10

Page 11:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Was ist Katello?

Content Management-Plugin für Foreman

Vereint die Software-Projekte Pulp undFiction Candlepin

Synchronisation von OSTree-/RPM-Paketen4

und Docker-/Puppet-Modulen

4. DEB-Unterstützung in Arbeit

11

Page 12:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Weitere Features

Verwaltung von Errata

Verwaltung von Subskriptionen undKanal-Berechtigungen

Snapshots, Einfrieren von Inhaltsbeständen(z.B. Dev, QA, Prod)

12

Page 13:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

13

Page 14:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Foreman/Katello vs. Satellite 6

Foreman RHS6Releases 1-2 Monate 11 MonatePuppet-Version

4.x 3.65

Server OS $Linux RHELSupport × ✓6

Orchestration Smart Proxy CapsuleRHN × ✓7

5. Puppet 4.x ab Release 6.36. Verwendung über CLI, WebUI und API, keine Fremd-Plugins; siehe auch Dokumentation7. Über Subscription Manager

14

Page 15:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

INSTALLATION

Page 16:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Installation

Foreman ist vorkompiliert erhältlich für:Debian 8Fedora 24Ubuntu 14.04 / 16.04Enterprise Linux (RHEL, CentOS, SL) 7

Katello-Pakete lediglich für EL6 / 7 x86_64!

16

Page 17:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Anforderungen

mindestens 2 Cores

mindestens 8 GB RAM (12 empfohlen)

30 GB Speicherplatz pro Betriebssystemempfohlen

siehe auch: theforeman.org/plugins/katello

17

Page 18:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Vorbereitung

Dedizierte Dateisysteme:/var/spool/squid (Cache, 10 GB)/var/lib/mongodb (Katello, 10 GB, inodes!)/var/lib/pulp (Content, 30 GB)/var/lib/pgsql (Foreman, 10 GB)

Netzwerk-Ports öffnen:http/https

tcp/5647 - Client-Kommunikationtcp/9090 - Smart Proxy / Capsule

18

Page 19:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Software-Installation 1/2

Einbinden von Software-Quellen je nachDistribution (Katello, Foreman, Puppet,...)

Installation des katello Paketsberücksichtigt Abhängigketen

Snapshot anlegen!

foreman-installer konfiguriert benötigteDienste automatisch

19

Page 20:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Software-Installation 2/2

Zusatzoptionen evaluieren:foreman-installer --scenario katello -h

1 # foreman-installer --scenario katello --

foreman-initial-organization ”Stankowic”

--foreman-initial-location ”Homelab”

Listing 2: Installation mit angepasster Organisationund Location

20

Page 21:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

21

Page 22:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

CONTENT

Page 23:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Spacewalk

Parent- und Child-Channels mit 1+Repositories

Systemen werden Parent- und optionalenChild-Channels zugewiesen

Automatische Zuordnung perAktivierungsschlüssel möglich

23

Page 24:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Foreman/Katello

Productmit 1+ Repositories

Versionsstände werden in Content Viewseingefroren

Content View enthält 1+ Repositories8

Content View kann YUM-Filter enthalten

8. YUM-, Datei-, Docker- oder Puppet-Inhalte

24

Page 25:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

25

Page 26:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

YUM-Filter

Einbeziehen oder Ausschließen von:PaketenPaketgruppenErrata (anhand ID, Datum oder Typ)

Ideal für feste Wartungsfenster (z.BQ1-Updates)

Filter können auch kombiniert werden

26

Page 27:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

27

Page 28:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Composite Content View

kombiniert mehrere Content Views in einemView

ideal, wenn OS- und Applikationspaketegetrennt versioniert werden

Filter werden überschrieben

28

Page 29:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

29

Page 30:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Lifecycle Environments

Systeme können nach Umgebungenunterteilt werden9, z.B.:

DevQAProd

Content View-Versionen werdenUmgebungen zugeordnet

9. Standardmäßig gehören alle Systeme Library an

30

Page 31:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Patch-Freigabe

Neue Patches importieren, Content Viewaktualisieren10

Freigabe der Patche für Dev (promoten)11

Patche werden getestet

Freigabe der Patche für QA

Freigabe der Patche für Prod

siehe auch katello-cvmanager

10, 11. manuell oder per API (z.B. hammer)

31

Page 32:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

32

Page 33:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

33

Page 34:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

34

Page 35:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

35

Page 36:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

36

Page 37:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

37

Page 38:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

38

Page 39:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

PUPPET

Page 40:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

40

Page 41:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Puppet in a nutshell

Client-/Server-Applikation12

Master konfiguriert und steuert Agenten

Manifeste definieren gewünschteKomponenten-Zustände13

Modulare Manifeste mit Facts

12. Auch ohne zentralen Server nutzbar13. Systemparameter, Dienste, Konfigurationen...

41

Page 42:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Resource Abstraction Language 1/2

Definition von Stati innerhalb Manifest

Unzählige Ressource-Typen: file, service,user,...14

Auflisten von Optionen pro Ressource:puppet describe resourceType

Beschreiben einer vorhandenen Ressource:puppet resource resourceType name

14. Auflisten mit puppet resource --types

42

Page 43:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Resource Abstraction Language 2/2

1 $ puppet describe service

2 $ puppet resource service httpd

3 service { ’httpd’:

4 ensure => ’started’,

5 enable => ’true’,

6 }

Listing 3: Informationen zu Services sowieBeschreibung eines Services

43

Page 44:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Puppet manifests in a nutshell

1 $ cat httpd.pp

2 package { ”httpd” :

3 ensure => ”installed”,

4 }

5 # puppet apply httpd.pp

6 ...

7 Notice: Finished catalog run in 8.03

seconds

Listing 4: Manifest zur Installation von Apache44

Page 45:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Puppet manifests in a nutshell

1 $ cat httpd-file.pp

2 package { ”httpd” :

3 ensure => ”installed”,

4 }

5 file { ’/var/www/html/index.html’’:

6 content => ”Yes this is $hostname”

7 }

8 # puppet apply httpd-file.pp

Listing 5: Apache-Manifest mit Datei und fact45

Page 46:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Foreman -Master of Puppets?

Foreman integriert Puppet Master und CA15

Puppet-Dashboards16

Konfiguration von Klassen, Variablen,...

Gruppierung von Klassen in Config Groups

Environment pro Lifecycle Environment

Overrides pro Host bzw. Hostgroup

15. auf dem Master bzw. den Smart Proxies/Capsules16. Aktivität und Kompliance

46

Page 47:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

47

Page 48:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

48

Page 49:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

49

Page 50:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

50

Page 51:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

51

Page 52:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

52

Page 53:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Drittanbieter-Module

Place to be: Puppetforge

Kopie heruntergeladener Puppet-Module inPuppet-Produkt, Aktualisierung des ContentViews

unbedingt Abhängigkeiten undAnforderungen überprüfen17

17. RHNS6 < 6.3 nutzt noch Puppet v3!

53

Page 54:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

54

Page 55:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

AUTOMATE

Page 56:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

API

Foreman und Katello bieten eine gutdokumentierte REST-API

Schnelle Integration in eigeneAnwendungen

Dokumentation online und auf eigenemServer18

18. http://hostname/apidoc

56

Page 57:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

hammer

umfangreiches Tool zur Steuerung vonForeman, Katello, Docker,...

erweiterbar, auto-completion

Verwalten von lokalen oder entfernenSystemen

mehr als 50 Kommandos19

19. für Foreman und Katello

57

Page 58:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Beispiel: Update _all_ the repos

1 $ hammer content-view update --async --

name CentOS_7

2 $ hammer content-view publish --async --

name CentOS_7

3 $ hammer content-view version promote --

organization Stankowic --to-lifecycle-

environment Dev --name CentOS_7

Listing 6: Aktualisieren und Veröffentlichen einesContent Views

58

Page 59:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Maintenance: Status quo

Wartungsarbeiten sind in größerenUmgebungen i.d.R. komplexer:

Erstellen von SnapshotsAusplanen des MonitoringsDokumentieren der ÄnderungenLöschen von Snapshots...

Vorarbeiten und Dokumentationumfangreicher als Wartung

59

Page 60:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

60

Page 61:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

katprep

Python-Toolkit, automatisiert Wartungen

Vorbereiten, Warten und Bereinigen vonSystemen mit einzelnen Befehlen

Changelogs mit Pandoc20

integriert sich in gängige Hypervisor undMonitoring-Systeme:

KVM, XEN, Hyper-V,... (libvirt)VMware vSphere (pyVmomi)Nagios/Icinga 1.x und Icinga2

20. derzeit Vorlagen für Markdown und HTML

61

Page 62:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

katprep

unterstützt verschiedene Filter21

startet Systeme automatisch neu, falls einUpdate dies erfordert

Konfiguration über System-Parameter22

automatischer Abgleich mitVM-/Monitoring-Systemen möglich(auto-discovery)

Join the development: GitHub21. Organisation, Location, Hostgruppe, Environment22. Snapshots, Monitoring,...

62

Page 63:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Installation

Toolkit herunterladen und installieren

Zugangsdaten eintragen

Informationen automatisch erkennenlassen oder gestapelt eintragen

Wartung (simulieren)

63

Page 64:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Kommandos

Zugangsdaten pflegen: katprep_authconfig

Parameter erkennen/setzen:katprep_populate / katprep_parameters

System-Bestandsaufnahme:katprep_snapshot

Wartungen steuern: katprep_maintenance

Reports erstellen: katprep_report

64

Page 65:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Vorgehensweise

Bestandsaufnahme durchführen

Wartung vorbereiten, durchführen undüberprüfen

Erneute Bestandsaufnahme durchführen

Reports erstellen

Über gesparte Zeit freuen :-)

65

Page 66:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

katprep_maintenance

Mit -n / --dry-run arbeiten!

Wartung vorbereiten: prepare

Installation durchführen: execute

Status überprüfen: verify

Snapshots, etc. entfernen: cleanup

Verwerfen: rollback23

23. noch nicht implementiert

66

Page 67:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

67

Page 68:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

MIGRATION

Page 69:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Unterschiede zu Spacewalk

Spacewalk ForemanDatenbank PGSQL, Oracle MongoDB +

PGSQLClient OS RPM RPM, DEB24

Konfiguration custom25 PuppetSoftware Kanal : Repos Repos : Prod-

ucts : CVsAktivierung Manuell, SchlüsselOrchestration Proxy Capsule

24. Foreman-only, experimenteller Pulp-Support25. SUSE Manager implementiert Salt

69

Page 70:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Passive Vorgehensweise

Installation eines neuen Systems

Abbilden der Software-Quellen und-Zustände

Erstellen der Konfigurationen anhandTest-Systeme

Sukzessive Migration der Systemesiehe auch Transitioning from Red Hat Satellite 5 to 6

70

Page 71:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Registrieren neuer Clients

Ausführen des Bootstrap-Skripts26

Installation von Puppet und katello-agent27

Zuweisen/Überprüfen von Subskriptionen

Aktualisieren von weiteren Informationen28

26. http://server/pub/bootstrap.py27. Zur Überprüfung installierter Errata28. Besitzer, Hostgruppen, katprep,...

71

Page 72:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Bootstrap

Registriert neue Systeme

Entfernen von RHN-Altlasten(yum-rhn-plugin, rhnsd, osad,...)

Migriert Systeme von Spacewalk und RedHat Satellite 5

Optional Angabe von Aktivierungsschlüssel,Hostgruppe, Organization,...

72

Page 73:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Dr. virt-who 1/2

RHEL-Systeme erhalten lediglich einetemporäre wibbly-wobbly Subskription29,wenn die Lizenz nicht validiert werden kann

bei virtualisierten Systemen werdenHypervisor30 als Content-Hosts geführt

Überprüfung der Subskription mittelssubscription-manager31

29. maximal 24 Stunden30. VMware vSphere, Red Hat Enterprise Virtualization und Microsoft Hyper-V31. siehe auch Dokumentation

73

Page 74:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Dr. virt-who 2/2

virt-who32 überprüft Host-VM-Zuordnungenmit verknüpften Manifest

Dienst ist über Lizenzen und Installationeninformiert

Wirkt Unterlizensierung entgegen

Zuweisung einzelner Lizenzverträge imBackend möglich

32. RE-GIS-TRATE!

74

Page 75:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Temporäre Subskription

1 # subscription-manager status

2 ...

3 Overall Status: Insufficient

4 ...

5 - Guest has not been reported on any host

and is using a temporary unmapped

6 guest subscription.

Listing 7: Temporäre Zuordnnung aufgrund fehlenderLizenz-Validierung

75

Page 76:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

FRAGEN?

Page 77:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Links

Foreman-Webseite

Katello-Plugin

Red Hat Satellite 6-Dokumentation

Puppetforge

katprep-Framework

Foreman-/Katello-Artikelserie

77

Page 78:  · Spacewalk Foreman Datenbank PGSQL,Oracle MongoDB + PGSQL ClientOS RPM RPM,DEB24 Konfiguration custom25 Puppet Software Kanal:Repos Repos : Prod-ucts:CVs Aktivierung Manuell,Schlüssel

Vielen Dank für die Aufmerksamkeit!

http://www.stankowic-development.net

78