Software-Updates für zwei-bis-viele Systeme



Ähnliche Dokumente
Debian Installationstools

Benutzer und Rechte Teil 1

English. Deutsch. niwis consulting gmbh ( manual NSEPEM Version 1.0

Benutzer und Rechte Teil 1, Paketverwaltung, SSH

Exercise (Part XI) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Serverprovisioning in einer dynamischen Infrastruktur Systemmanagement LinuxTag 2012

Security. Stefan Dahler. 6. Zone Defense. 6.1 Einleitung

Icinga 2 Einführung und Übersicht

Softwareinstallation unter Linux

EEX Kundeninformation

USB Treiber updaten unter Windows 7/Vista

TSM-Client unter RedHat/CentOS-Linux einrichten

Keine Angst vor Puppet 4. Secure Linux Administration Conference 2015 Martin Alfke

Informationen zur Verwendung des TFE-Portals / Information for Using the TFE portal

Cloud Control und die Datenbank

Installation mit Lizenz-Server verbinden

Das Debian Bug Tracking System

Softwareupdate-Anleitung // AC Porty L Netzteileinschub

Zentrales Konfigurationsmanagement mit Puppet

OpenNebula. public and private cloud management.! Martin Alfke

Debian Packaging. Sebastian Reichel

Einführung in Ansible

Renée Bäcker. Perl $foo Magazin

Damit die Installation klappt, muss Linux zuvor mit einer Minimalinstallation installiert worden sein!

Linux - a bit advanced

WRT als Plattform für anderes

Exercise (Part V) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Folgende Voraussetzungen für die Konfiguration müssen erfüllt sein:

X2Go Remote Desktop - Einsatzszenarien für Privatanwender

Management von grossen IT Umgebungen mit Open Source Tools

Softwareanforderungen für Microsoft Dynamics CRM Server 2015

Exercise (Part I) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Dockerbank Container-basiertes Deployment von biomedizinischen IT-Lösungen

Uwe Baumann artiso Solutions

am besten erst den ganzen Abschnitt lesen, besonders das mit dem patch!

Order Ansicht Inhalt

How to use the large-capacity computer Lilli? IMPORTANT: Access only on JKU Campus!! Using Windows:

VNUML Projektpraktikum

Firewall Implementierung unter Mac OS X

Workbooster File Exchanger Command Line Tool

Paketmanagement. Alexander Günther gpg:0xebe4a38a. 16. Dezember UnFUG

Python SVN-Revision 12

NEWSLETTER. FileDirector Version 2.5 Novelties. Filing system designer. Filing system in WinClient

1. Java installieren 2. Java für graf.eit.h-da.de im Java Control Panel freigeben 3. Starten der Java Applets oder Java Web Start im Webbrowser

Linux Prinzipien und Programmierung

1.1. Apache / Tomcat via JK JNI ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED

Pragmatische Einblicke in Deployment- & Konfigurations- Management Tools

Customer Support Info PP 80x

VPN / IPSec Verbindung mit dem DI 804 HV und dem SSH Sentinel

Automatisierte Serververwaltung mit Hilfe von Puppet

Maintainer Schulung (Teil 2)

Ingenics Project Portal

OTRS - Nagios Integration. Jens Bothe Senior Consultant, OTRS AG

Switching. Übung 2 System Management. 2.1 Szenario

1. Java installieren 2. Java Applets für graf.eit.h-da.de im Java Control Panel freigeben 3. Starten der Java Applets im Webbrowser

Unigraphics Schnittstelle entfernen

Continuous Delivery in der Realität eines Großunternehmens

Vernetzung von Linux und Windows

Remote Logging mit rsyslog

Remotely Anywhere Verwendung von Zertifikaten Schritt für Schritt Anleitung zur Implementation von Zertifikaten in Remotely Anywhere

Softwareupdate-Anleitung // Porty L 600 / Porty L 1200

Druckereinrichtung unter Ubuntu LTS mit Keyring

Die Gentoo-Paketverwaltung

Infrastruktur entwickeln mit Chef

Virtualisierung in der Praxis. Thomas Uhl Topalis AG

Nagios-Monitoring mit check_mk. D. Bucher - WWU Münster

Powershell DSC Oliver Ryf

Einrichten der TSM-Backup-Software unter dem Betriebssystem Ubuntu

Wireless LAN Installation Windows XP

VDR Video Disk Recorder

ECLIPSE PLUG-IN. Redwood Anwendertage 2015

Installation und Aktualisierung der VMware-Tools

Checkliste. Verantwortlich: Benedikt Pawletta K-SIPE-2 Status:

SFTP SCP - Synology Wiki

ecall sms & fax-portal

Archive / Backup System für OpenVMS

SSH und VNC unter Raspbian

Matrix42. Use Case - Inventory. Version Februar

1. Check_MK Konferenz. 22. Oktober 2014

Java Tools JDK. IDEs. Downloads. Eclipse. IntelliJ. NetBeans. Java SE 8 Java SE 8 Documentation

Konzept Projekt Lisa

Zabbix 2.4. What's new? What's new in Zabbix of

Inhalt. Was ist Nagios? Installation Konfiguration Demo

Backups einfach gemacht mit Backup Manager

Benutzer und Rechte Teil 1, Paketverwaltung, SSH

The linux container engine. Peter Daum

Makropaket changes. Knut Lickert. 14. Juni 2005

Debian Installer Basics

Cameraserver mini. commissioning. Ihre Vision ist unsere Aufgabe

Debian Installer Basics

Konfigurationsmanadment mit Chef und Vagrant. August 2012, Seite: 1/20

German Metasploit Framework Tutorial 16. August 2005 dav

Hybride Cloud-Infrastrukturen Bereitstellung & Verwaltung mit System Center 2012

Play with Ansible - Provisioning von Weblogic mit Ansible

<Insert Picture Here> Grid Control 11g Installation Ralf Durben

Einrichten eines SSH - Server

Transkript:

Software-Updates für zwei-bis-viele Systeme Chemnitzer Linux-Tage 2015 Dipl.-Ing. Thomas Liske mailto:liske@ibh.de IBH IT-Service GmbH Gostritzer Straße 67a 01217 Dresden https://www.ibh.de/ www.ibh.de

Einleitung

`whoami` Thomas Liske > 15 Jahre Erfahrung mit GNU/Linux OSS-Projekte: apt-dater, imvirt, needrestart, seit 2008 bei IBH IT-Service GmbH in Dresden IBH IT-Service GmbH ISP, Hosting-Anbieter und Systemhaus: erster sächsischer ISP seit August 2014 (AS15372) 5 Rechenzentren und mehrere Netzknoten in Dresden

GNU/Linux @ IBH Betrieb von mehr als 100 GNU/Linux-Systemen: ISP-Betrieb interne Systeme Hosting-Dienste Kunden-Systeme typische Herausforderungen: Hosts mit ausstehenden Updates? Protokollierung & Zeiterfassung mehrere gleichzeitige Nutzer Suche nach: Distri / Release Virtualisierung installierten Paketen / Versionen Debian wheezy Debian squeeze Debian jessie andere

Entwicklung 2008: Freigabe auf SF.NET und Debian Upload Entwickler: Andre Ellguth (a.d.) Thomas Liske zahlreiche Mitwirkende: Bug Reports, Feature Requests, Lokalisierung [de, it, pt] Debian Version ITP 0.6 lenny 0.7 squeeze wheezy 0.5 0.8 0.9 2008 2010 2012 2014

Architektur

Management Host zentrale Verwaltungskonsole Verwendung eines Nutzer-Logins durch verschiedene Benutzer ncurses-basierendes Frontend screen(1) zur Sessionverwaltung

Managed Hosts Kommunikation via SSH unterstützte Paketverwaltungen: <dpkg> + <apt aptitude> <rpm> + [rug yum zypper] <wua>* *) Windows Update Agent: FOR DEMONSTRATION PURPOSE ONLY!

apt-dater

als root: # apt-get install apt-dater Installation als Nutzer: $ apt-dater ** Message: Creating file /home/liske/.config/apt-dater/hosts.conf ** Message: Creating file /home/liske/.config/apt-dater/screenrc ** Message: Creating file /home/liske/.config/apt-dater/apt-dater.conf TODO: SSH-Schlüssel generieren (ssh-keygen) SSH-Schlüssel verteilen (ssh-copy-id) hosts.conf anpassen und apt-dater-host verteilen

UI

Sessions

Host Details

apt-dater.conf glib's Key File Format Grundeinstellungen Konfiguration [Paths] # Default: $XDG_CONFIG_HOME/apt-dater/hosts.conf #HostsFile=path-to/hosts.conf # Default: $XDG_DATA_HOME/apt-dater #StatsDir=path-to/stats [SSH] # SSH binary Cmd=/usr/bin/ssh OptionalCmdFlags=-t # SFTP binary SFTPCmd=/usr/bin/sftp #[Screen] ## Default: $XDG_CONFIG_HOME/apt-dater/screenrc #RCFile=path-to/screenrc # ## Default: %m # %u@%h:%p #Title=%m # %U%H #

hosts.conf Konfiguration glib's Key File Format Definition von Gruppen mit Hosts # Syntax: # # [Group] # Hosts=([OptionalUser@]host.domain[:OptionalPort];)* # [Localdomain] Hosts=localhost; [IBH] Hosts=example1.ibh.net;example2.ibh.net;test@example3.ibh.net:62222; [Customer] Hosts=foo@bar.com; IdentityFile=/path/to/id_rsa

screenrc Konfiguration angepasste Konfiguration für screen(1) startup_message off # define a bigger scrollback, default is 100 lines defscrollback 2048 # Remove some stupid / dangerous key bindings bind ^k #bind L bind ^\ # Make them better bind \\ quit bind K kill bind I login on bind O login off bind } history # Sessions should stay until destroyed by pressing q zombie 'q' # Add caption line with clock, window title and window flags. caption always "%{b bg}%c%=%t%=%f"

apt-dater-host

als root: # apt-get install apt-dater-host Installation Konfiguration anpassen: /etc/sudoers.d/apt-dater-host ~/.ssh/authorized_keys /etc/apt-dater-host.conf (optional) Test als Nutzer: $ apt-dater-host refresh

apt-dater-host Perl-Skript: für Paketverwaltung spezifisches Skript in $PATH /etc/apt-dater-host.conf # front-end for dpkg to use (apt-get, aptitude) $DPKGTOOL="apt-get"; # Method to do upgrades, possible values (depends on $DPKGTOOL): $APTUPGRADE='dist-upgrade'; # enable use of --assume-yes on safe-upgrade $ASSUMEYES=1; # use this command to become root $GETROOT="sudo"; # the installation UUID $UUIDFILE = '/etc/apt-dater-host.uuid'; # Check if needrestart is available. $NEEDRESTART = (-x'/usr/sbin/needrestart'?'/usr/sbin/needrestart':undef); # prevent apt-dater-host from upgrading packages #$FORBID_UPGRADE=1;

Aufruf als normaler Nutzer apt-dater-host # apt-dater-host sudoers.d config file # ------------------------------------ # Keep apt-dater's MAINTAINER environment variable #Defaults env_keep += MAINTAINER # Allow members of group adm to execute the apt-get command %adm ALL=NOPASSWD: /usr/bin/apt-get,/usr/sbin/needrestart genutzte Kommandos: $ apt-dater-host refresh $ apt-dater-host upgrade # apt-get update # apt-get dist-upgrade -y $ apt-dater-host install $PKG # apt-get install $PKG

apt-dater-host $ apt-dater-host refresh ADPROTO: 0.7 Get:19 http://ftp.de.debian.org jessie/main 2015-03-14-1445.37.pdiff Get:20 http://ftp.de.debian.org jessie/main i386 2015-03-14-1445.37.pdiff Get:21 http://ftp.de.debian.org jessie/main 2015-03-14-1445.37.pdiff Fetched 403 kb in 3s (119 kb/s) Reading package lists... Done LSBREL: Debian 8.0 jessie VIRT: Physical UNAME: Linux x86_64 FORBID: 0 UUID: 40a437f0-9f1e-11de-a398-001a4d577e31 NEEDRESTART-VER: 1.2 NEEDRESTART-KCUR: 3.19.0-tl1 NEEDRESTART-KEXP: 3.19.2-tl1+ NEEDRESTART-KSTA: 3 NEEDRESTART-SVC: bind9.service NEEDRESTART-SVC: cron.service STATUS: hostname 3.15 i STATUS: libc6 2.19-15 i STATUS: libc6:i386 2.19-15 i STATUS: patch 2.7.1-6 u=2.7.5-1 STATUS: linux-headers-3.16.0-4-amd64 3.16.7-ckt4-3 u=3.16.7-ckt7-1 STATUS: emacs24 24.4+1-4.1 u=24.4+1-5 STATUS: libasound2:i386 1.0.28-1 i KERNELINFO: 2 3.19.0-tl1

Features

XML Report $ apt-dater -[n]r <?xml version="1.0"?> <report> <timestamp>1426007924</timestamp> <group name="ibh"> <host hostname="foo.ibh-dialin.net"> <status status="1">up to date</status> <ssh/> <kernel reboot="1">2.6.32-5-686-bigmem</kernel> <lsb> <distri>debian</distri> <release>6.0.10</release> <codename>squeeze</codename> </lsb> <uname> <kernel>linux</kernel> <machine>i686</machine> </uname> <virt>xen</virt> <uuid>7271e348-b280-11de-b52e-00200f79a0c</uuid> <history> </history> <packages> <pkg name="adduser" version="3.112+nmu2"/> </packages> </host> 0.6.0

TCL Filter 0.6.0

History Aufzeichnung interaktiver Sitzungen Hinweis auf Fehler bei Upgrades apt-dater.conf: [History] ErrPattern 0.8.0

Clusters Serialisierung von Updates gedacht für Cluster, Load Balancer o.ä. Konfiguration auf Hosts (apt-dater-host.conf): # If this host is part of (multiple) cluster(s), you might set a # symbolic name. Hosts with the same cluster name won't be upgraded # simultaneously by apt-dater (requires apt-dater 0.9 or above). @CLUSTERS = qw(my-db-cluster); 0.9.0

Backstage

Hooks Ausführen vor und nach Aktionen: Aktion Pfad connect install refresh /etc/apt-dater/pre-con.d/ /etc/apt-dater/post-con.d/ /etc/apt-dater/pre-ins.d/ /etc/apt-dater/post-ins.d/ /etc/apt-dater/pre-ref.d/ /etc/apt-dater/post-ref.d/ update /etc/apt-dater/pre-upd.d/ /etc/apt-dater/post-upd.d/ Host-Informationen via Umgebungsvariablen (AD_*): AD_HOSTNAME AD_GROUP AD_KERNEL AD_LSB_RELEASE 0.8.1

Plugins Unterstützung von alternativen Verbindungen statt ssh(1) apt-dater.conf [Hooks] PluginDir = /etc/apt-dater/plugins hosts.conf # # [Group] # Hosts=([OptionalUser@]host.domain[:OptionalPort];)* # 0.8.1 [IBH] Hosts=foo.ibh-dialin.net; Type=my-bar-plugin

Plugins /etc/apt-dater/plugins/my-bar-plugin #!/bin/sh case "$AD_ACTION" in connect) ;; refresh) ;; esac *) echo 'Oops!' 1>&2 exit 1; ;;

Hooks & Plugins

apt-dater protocol (ADP) Schnittstelle zwischen apt-dater und apt-dater-host: möglichst rückwärtskompatibel zeilenorientiert unbekannte Schlüsselwörter werden ignoriert Plugins können direkte ADP-Schnittstelle implementieren ADP version ADPROTO: 0.7 lsb_release LSBREL: Debian 7.8 wheezy clusters CLUSTER: my-pgsql-cluster virtualization VIRT: Xen PV uname -s uname -m UNAME: Linux x86_64 package lines STATUS: libsasl2-modules:i386 2.1.26.dfsg1-12 u=2.1.26.dfsg1-13

Vorschau

apt-dater 1.x XML-basiertes Konfigurationsformat Einbinden weiterer Konfigdateien via Xinclude Vererbung von Parametern <hosts xmlns:xi="http://www.w3.org/2001/xinclude" ssh-user="ibh-support"> <!-- Include global config file if available. --> <xi:include href="file:///etc/apt-dater/hosts.xml" xpointer="xpointer(/hosts/*)"> <xi:fallback /> </xi:include> <group name="ibh Web Services" ssh-id="/etc/apt-dater/ssh/id_www"> <host name="worker-01" ssh-host="2a01:7700:0:2059::8001"/> <host name="worker-02" ssh-host="2a01:7700:0:2059::8002"/> <host name="worker-03" ssh-host="2a01:7700:0:2059::8003"/> </group> </hosts>

apt-dater apt-dater 1.x Ausbau Filterfunktionen Unterstützung geteilter Sitzungen zwischen Nutzern Klassifizierung von Updates (Security, Upstream, 3rd Party) apt-dater-host Unterstützung verschiedener Paketverwaltungen in einem Skript Hooks

End-Of-Talk

imvirt Verwandte Projekte Homepage http://micky.ibh.net/~liske/imvirt.html Debian Pakete https://packages.debian.org/imvirt VCS https://github.com/de-ibh/imvirt needrestart Homepage https://fiasko-nw.net/~thomas/tag/needrestart.html Debian Pakete https://packages.debian.org/needrestart VCS https://github.com/liske/needrestart https://github.com/liske/needrestart-session

apt-dater Projektseite: https://www.ibh.de/apt-dater/ Quellen: https://github.com/de-ibh/apt-dater offizielle Debian-Pakete: https://packages.debian.org/apt-dater squeeze: 0.8.4 squeeze-backports: 0.9.0 wheezy: 0.9.0 jessy: 0.9.0 sid: 1.0.1+ Slide powered by Chart.js highlight.js impress.js impress.js-progress impress-console vis.js