presentation: vorletzter Schliff

This commit is contained in:
Jörg Thalheim 2014-03-03 00:00:40 +01:00
parent fcc6678dfa
commit dc9f7a022f
15 changed files with 570 additions and 50 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "modules/network"]
path = modules/network
url = https://github.com/puppetmodules/puppet-module-network.git

23
Vagrantfile vendored
View File

@ -12,8 +12,8 @@ end
boxes = [
#{ name: "puppet0.lctp", provision: :puppet, mac: "5CA1AB1E0F01"}, # uncomment to enable puppet
{ name: "node0.lctp", provision: :chef, role: :head_node, mac: "5CA1AB1E0001", json: load_json("node0.json") },
{ name: "node1.lctp", provision: :chef, role: :compute_node, mac: "5CA1AB1E0002", json: load_json("node1.json") }
#{ name: "node2.lctp", provision: chef, role: :compute_node, mac: "5CA1AB1E0003", json: load_json("node2.json") }
{ name: "node1.lctp", provision: :chef, role: :compute_node, mac: "5CA1AB1E0002", json: load_json("node1.json") },
#{ name: "node2.lctp", provision: :chef, role: :compute_node, mac: "5CA1AB1E0003", json: load_json("node2.json") }
]
["vbguest", "berkshelf"].each do |plugin|
@ -21,7 +21,7 @@ boxes = [
require "vagrant-#{plugin}"
rescue LoadError
puts "#{plugin} plugin not installed!"
puts "run:"
puts "run:"
puts "\tvagrant plugin install vagrant-#{plugin}"
exit(1)
end
@ -32,12 +32,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vbguest.auto_reboot = true
config.vm.provision(:shell){ |shell| shell.path = "script/fix_stdin_error.sh" }
ssh_port = 2222
#ssh_port = 2222
boxes.each do |box|
config.vm.define box[:name] do |node|
node.vm.provider :virtualbox do |vb|
# access via tty => user: vagrant, password: vagrant
#vb.gui = true
#vb.gui = false
# 1. adapter: NAT to allow vagrant setup the machine
# 2. adapter: for internal network between nodes
@ -50,12 +50,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"--macaddress2", box[:mac]]
end
node.vm.network :forwarded_port,
guest: 22,
host: ssh_port,
id: "ssh",
auto_correct: true
ssh_port += 1
#node.vm.network :forwarded_port,
# guest: 22,
# host: ssh_port,
# id: "ssh",
# auto_correct: true
#ssh_port += 1
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
node.vm.hostname = box[:name]
if box[:provision] == :chef

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -22,6 +22,17 @@
<style type="text/css" media="screen">
.reveal pre code { max-height: 500px; }
@font-face {
font-family: "DINBold";
src: url(/fonts/DINBda.ttf) format("truetype");
}
@font-face {
font-family: "Univers";
src: url(/fonts/Univers.ttf) format("truetype");
}
.reveal {
font-family: "Univers", "Lato", sans-serif !important;
}
html body {
background:url("/img/bg_white.png") no-repeat center center fixed;
background-size: auto 100%;
@ -54,6 +65,11 @@
}
.reveal h1, .reveal h2, .reveal h3 {
color: #001d4b;
font-family: "DINBold", "News Cycle", Impact, sans-serif !important;
}
.reveal h2 { font-size: 1.5em; }
.reveal .slide-number {
font-size: 0.8em;
}
</style>
@ -98,6 +114,7 @@
center: true,
transitionSpeed: 'fast',
backgroundTransition: 'fade',
slideNumber: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'none', // default/cube/page/concave/zoom/linear/fade/none

View File

@ -9,6 +9,16 @@ Mit wachsender Infrastruktur steigt der Bedarf nach Automatisierung. Dies soll d
[2] http://puppetlabs.com/
-->
<!--
Multi-Monitor-Shortcuts:
Ctrl-O: Move Window to next screen
Mod4 + Control + j/k: Focus next/previous screen
reveal.js-Shortcuts:
o: Öffne Übersicht
s: Öffne Vortragsmonitor
-->
<!-- .slide: data-state="intro" -->
# Linux Cluster in Theorie und Praxis
@ -22,6 +32,10 @@ von Jörg Thalheim
<a class="email" href="s5245332@mail.zih.tu-dresden.de">s5245332@mail.zih.tu-dresden.de</a>
Note:
- Vorstellen
- Thema
## Inhaltsübersicht
@ -32,6 +46,15 @@ von Jörg Thalheim
- Tests
- Demo
Note:
- Vortrag hier mal die wichtigsten Punkte kurz im Überblick
- Wozu brauche ich Chef und andere Konfigurationsmanagements
- Danach Vergleich der 2 Rivalen Chef/Puppet
- Zeige wie Chef funktioniert
- Wie sieht der Arbeitsablauf beim Entwickeln mit Hilfe von Tests aus
- Zum Schluss: Ergebnis meiner Abschlussaufgabe - Einrichtung von
Netzwerkdiensten mit Chef
## Was ist Konfigurationsmanagement?
@ -47,17 +70,19 @@ von Jörg Thalheim
Note:
- in der Praxis mehr Knoten
- wechselnde Admins
- Teams mit wechselnde Mitarbeiter, geografisch verteilt
- Dokumentation veraltet schnell
- sowohl bestehende Knoten müssen aktuell gehalten werden,
als auch neue eingerichtet
- Komplexe Shell-Skripte sind schlecht maintainbar,
häufig nicht portable und langsam
- Häufig Shell-Skripte für Automatisierung:
-> schnell komplex und schlecht maintainbar,
-> häufig nicht portable und langsam
- Problem wird durch Konfigurationsmanagements gelöst.
- Grundidee: Infrastruktur wird durch eine Konfigurationsdatei oder Sprache beschrieben
und das Konfigurationsmanagement, versucht diesen Zustand herzustellen.
- Hier ein paar Beispiele, Im folgenden werde ich näher auf chef und Puppet
eingehen.
- Hier ein paar Beispiele gelistet: -> Puppet/Chef
- Grundidee:
- Zustand durch Konfigurationsdatei/Sprache beschrieben
- Konfigurationsmanagement: Herstellung des Zustands.
@ -112,13 +137,11 @@ Note:
Note:
- Beide Projekte sind in Ruby geschrieben.
- Chef: Die Konfigurations wird in Ruby geschrieben.
- Puppet: Benutzt eine auf Puppet optimierte, vereinfachte Sprache
-> Wird von Anfängern und Nicht-Programmieren als einfacher empfunden
-> Grund warum es von manchen Firmen bevorzugt wird um Umschulung zu sparen (mittlerweile nicht
mehr komplett wahr, da Teile jetzt auch in Ruby geschrieben werden können)
-> aber weniger flexible als Ruby (Grund bei Facebook, 10000 Nodes mit Chef
provisionier)
- Chef: Konfigurations in Ruby
- Puppet: eine auf Puppet optimierte, vereinfachte Sprache
-> einfacher für Einsteiger und Nicht-Programmieren
-> Grund für manche Firmen -> wird um Umschulung zu sparen
-> weniger flexible als Ruby (Grund bei Facebook, mehre Cluster mit mehr als 10.000 Nodes mit Chef provisionier)
- Während die Regeln und Beschreibung in Chef standartmäßig in der Reihenfolge abgearbeitet
wird in der sie geladen werden, sortiert Puppet diese um. In beiden kann die
Reihenfolge durch Spezifikation von Abhängigkeiten umsortiert werden (Später
@ -126,9 +149,9 @@ Note:
- Puppet: eigene Sprache -> komplexere Codebasis
- Um die Größe der Community abzuschätzen (schwierig): Suchtreffer für Repositories bei Github
- Alter(Puppet) > Alter(Chef)
- Hinter beiden Projekten stehen Firmen, welche das Produkt weiterpflegen,
Support anbieten und Hosting anbieten
- Hinter beiden Projekten stehen Firmen, Weiterentwicklung des Produkt, bieten Support und Hosting an
- Resume: Ähnliche Projekte, lösen das gleiche Problem auf unterschiedliche
Weise
## Einführung in Chef
@ -144,7 +167,8 @@ Note:
Note:
- Zunächst ein paar wichtige Begriffe:
- In chef sind viele Begriffe vom Kochen abgeleitet (daher auch chef - Koch)
- chef: engl. für Koch
- viele Begriffe vom Kochen abgeleitet
- Jede Maschine wird in chef Node genannt.
- Nodes können Rollen zugewiesen werden, um welche bestimmte Aufgaben und
Attribute zusammenfassen.
@ -169,7 +193,7 @@ Note:
### Chef-Einführung: Aufbau eines Cookbook
```bash
▾ modules-0.2.0/
▾ modules/
▾ attributes/
default.rb
▾ files/
@ -248,19 +272,27 @@ Note:
- Hier ein Beispiel, welches ich für die Abschlussaufgabe geschrieben habe
- attribute: In der Attribute-Datei - Standwerte für ntp: upstream server,
subnets auf dem ntp lauscht
- recipe:
- package: Packet per apt installieren
- template: Konfiguration aus template generieren - hier Abhängigkeiten
zwischen Resourcen, wenn Template sich ändert -> NTP neustarten
- zum Schluss den Dienst aktivieren und starten
- template:
- Beispiel für ERB-Template
- Tags -> Ruby-Code, wird interpoliert
- Verzweigungen und Schleifen möglich
### Chef-Einführung: Code-Beispiel
```ruby
# recipies/default.rb
package 'ntp'
template "/etc/ntp.conf" do
owner "root"
group "root"
source "ntp.conf.erb"
notifies :restart, "service[ntp]"
end
service "ntp" do
action [:enable, :start]
end
```
```ruby
# templates/default/ntp.conf.erb
# Crontab for <%= @node.name %> managed by Chef. Changes will be overwritten.
@ -274,6 +306,30 @@ restrict default noquery nopeer
driftfile /var/lib/ntp/ntp.drift
```
Note:
- recipe:
- package: Packet per apt installieren
- template: Konfiguration aus template generieren
- zum Schluss: Dienst aktivieren und starten
- hier Abhängigkeiten zwischen Resourcen, wenn Template sich ändert -> NTP neustarten
- template:
- Beispiel für ERB-Template
- Tags -> Ruby-Code, wird interpoliert
- Verzweigungen und Schleifen möglich
## Tests
<img src="/img/dont_always.jpg" alt="I don't always test my code">
Note:
- Infrastruktur: schwierig zu testen, viele externe Abhängigkeiten, langsam
- Ruby: dynamische Programmiersprache -> Tippfehler, keine Compilerwarnung beim
Refactoring
- 2 Testframeworks angeschaut
## Tests: Chef Spec
```ruby
@ -297,9 +353,6 @@ end
```
Note:
- Infrastruktur: schwierig zu testen, viele externe Abhängigkeiten, langsam
- Ruby: dynamische Programmiersprache -> Tippfehler, keine Compilerwarnung beim
Refactoring
- Chef: 2 Phasen der Ausführung: Converging und eigentliche Ausführungsphase
- Converging: Einlesen aller Resourcen -> Abhängigkeitsbaum
- Chefspec: Nur Convergingphase
@ -309,6 +362,8 @@ Note:
Module, einfache Logik testen, Tippfehler
- chef\_run: Attribute des Nodes
- it-block: Eigentliche Assertions
Chefspec Geschwindigkeit zeigen:
- bundle exec rspec spec
@ -330,9 +385,9 @@ end
Note:
- Minitest: werden nach jedem Deployment gestartet
-> Integrationstests
-> Integrationstests
- Ähnliche Healtschecks wie bei Monitoringsystemen oder unserem Test während des Praktikum
-> Benachrichtung via Chefhandler möglich z.B. per Email, Jabber, ...
-> Benachrichtung via Chefhandler möglich z.B. per Email, Jabber, ...
@ -344,10 +399,44 @@ Note:
- Vagrant: Starten einer Headnode: mehre Computenodes bekommen über das interne
Netzwerk per DHCP eine IP, nutzen das DNS und NTP des Headnode, Headnode als
Router
Vorbereitung
- ssh-add -d # SSH-Schlüssel löschen
- vagrant up node0.lctp
- vagrant up node1.lctp
- vagrant up node2.lctp --no-provision
- vagrant provision node2.lctp --provision-with shell
Ablauf:
- Headnode: Schon provisioniert
node0:
- vagrant ssh node0.lctp
- ip a
- service isc-dhcp-server status
- ntpq -p
- dig node0.lctp @localhost
- 1. Computenode: provisioniert
node0:
- vagrant ssh node1.lctp
- ip a
- ip route
- ntpq -p
- 2. Computenode: neu provisionieren
- auskommentieren
- vagrant up node2.lctp
- vagrant: Entwicklungsumgebung mit der gleichen Konfiguration wie Production
einrichten
- besonderheiten chef-solo/chef-server
- minitests zeigen
- Fehlermeldung -> vagrant
- ntpq -p
- mtr 8.8.8.8
- Headnode verkonfigurieren -> erneutes Provisioning
node0:
- sudo iptables -L -t na
- sudo iptables -F -t na
- sudo iptables -L -t na
node2: ping 8.8.8.8 # laufen lassen
node0:
- sudo vi /etc/ntp.conf # server de -> us
- sudo service bind9 stop
- vagrant provision node0.lctp # wechseln zu node2
- Fragen?

View File

@ -0,0 +1,15 @@
\beamer@endinputifotherversion {3.27pt}
\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}
\headcommand {\beamer@framepages {1}{1}}
\headcommand {\slideentry {0}{0}{2}{2/2}{}{0}}
\headcommand {\beamer@framepages {2}{2}}
\headcommand {\sectionentry {1}{Einf\"uhrung}{3}{Einf\"uhrung}{0}}
\headcommand {\beamer@sectionpages {1}{2}}
\headcommand {\beamer@subsectionpages {1}{2}}
\headcommand {\slideentry {1}{0}{3}{3/3}{}{0}}
\headcommand {\beamer@framepages {3}{3}}
\headcommand {\beamer@partpages {1}{3}}
\headcommand {\beamer@subsectionpages {3}{3}}
\headcommand {\beamer@sectionpages {3}{3}}
\headcommand {\beamer@documentpages {3}}
\headcommand {\def \inserttotalframenumber {3}}

View File

@ -0,0 +1,58 @@
\documentclass[10pt]{beamer}
%\usepackage[utf8x]{inputenc}
\usepackage{ngerman}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage{bbm}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{url}
%\usepackage{hyperref}
\usepackage{eurosym}
\usepackage{listings}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{setspace}
\input{theme/theme}
\title{Linux Cluster in Theorie und Praxis}
\subtitle{Insert your title here}
\author{Insert your name here}
\date{10. Februar 2012}
\institute[ZIH TUD]{Zentrum f\"ur Informationsdienste und Hochleistungsrechnen -- TU Dresden}
%\room{INF 1046}
\address{N\"othnitzer Stra{\ss}e 46}
\city{01189 Dresden}
%\phone{+49 0351 - 463 38783}
\email{Insert your E-Mail address}
\setbeamercovered{transparent}
\begin{document}
\zihmaketitle
\begin{frame}
\frametitle{Inhalt}
\tableofcontents
\end{frame}
\section{Einf\"uhrung}
\begin{frame}
\frametitle{Einf\"uhrung}
\begin{itemize}
\item Insert your content
\end{itemize}
\end{frame}
\end{document}

View File

@ -0,0 +1,74 @@
\DeclareOptionBeamer{shadow}[true]{\def\beamer@themerounded@shadow{#1}}
\ExecuteOptionsBeamer{shadow=false}
\ProcessOptionsBeamer
\mode<presentation>
\newlength{\dings}\setlength{\dings}{7.2mm}
%%% set variales for author details
\newcommand{\room}[1]{\def\ROOM{#1}}
\newcommand{\address}[1]{\def\ADR{#1}}
\newcommand{\city}[1]{\def\CITY{#1}}
\newcommand{\phone}[1]{\def\PHONE{#1}}
\newcommand{\email}[1]{\def\EMAIL{#1}}
%%% command to insert author details
\newcommand{\insertauthordetails}{\ADR\\\CITY}
\newcommand{\insertemail}{\usebeamercolor[fg]{titlepage}E-Mail:
\href{mailto:\EMAIL}{\EMAIL}}
%\newcommand{\insertphone}{\usebeamercolor[fg]{titlepage}Telefon: \PHONE}
\setbeamertemplate{blocks}[rounded][shadow=\beamer@themerounded@shadow]
\setbeamertemplate{items}[ball]
\setbeamertemplate{sections/subsections in toc}[ball]
\setbeamertemplate{part page}[default][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]
%\definecolor{darkblue}{rgb}{0.04, 0.16, 0.32}
\defbeamertemplate*{title page}{zih}[1][]
{
\definecolor{zihorange}{rgb}{0.898, 0.420, 0.125}
\setbeamercolor{title}{fg=zihorange}
\setbeamercolor{subtitle}{fg=zihorange}
\setbeamercolor{titlepage}{fg=white}
\vbox{}
\vfill
\begin{centering}
\vspace{22mm}%
\parbox{\textwidth}{%for positioning title,subtitle and date
\begin{centering}
{\LARGE\usebeamercolor[fg]{title}\inserttitle\par}%
\ifx\insertsubtitle\@empty%
\else%
\vspace{5mm}%
{\itshape\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\vspace{3mm}%
\usebeamercolor[fg]{titlepage}\insertauthor\\
\vspace{2mm}%
\scriptsize\usebeamercolor[fg]{titlepage}\insertdate\\
\end{centering}
}%
\vspace{3mm}
\includegraphics[height=0.2\textheight]{theme/logo/LCTP-logo}%
\end{centering}%
\vspace{13mm}
\parbox{0.7\textwidth}{%positioning author information
\footnotesize\usebeamercolor[fg]{titlepage}
%\insertauthordetails \\
%\vspace{-1mm}\\
%\insertphone\\
\insertemail
}
}
\setbeamertemplate{title page}[zih][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]
\mode<all>

View File

@ -0,0 +1,139 @@
%
% A Beamer Theme Which Looks A Bit Like ZIH Presentation Template
%
% Matthias.Lieber@tu-dresden.de
%
%
% Setup stuff:
%
\definecolor{darkblue}{rgb}{0.04, 0.16, 0.32}
% color for footer and navigation header (if activated, see below)
\setbeamercolor*{palette primary}{fg=black,bg=white}
% color for subsection navigation (if activated, see below)
\setbeamercolor*{palette secondary}{fg=white,bg=darkblue}
% Add the typical beamer navigation stuff in the head?
\newif\ifbeamer@theme@navigation
\beamer@theme@navigationfalse
%\beamer@theme@navigationtrue
% Include subsection names in the head navigation?
\newif\ifbeamer@theme@subsection
\beamer@theme@subsectionfalse
%\beamer@theme@subsectiontrue
% define left and right logo
\pgfdeclareimage[width=5.2em,interpolate=true]{logo-l}{theme/logo/tu_logo}
\pgfdeclareimage[width=5.2em,interpolate=true]{logo-r}{theme/logo/zih_logo_ml}
% we use tikz for the color gradient
\usepackage{tikz}
\setbeamercolor{subsection in head/foot}{parent=palette secondary}
\setbeamercolor{section in head/foot}{parent=palette primary}
\setbeamercolor{author in head/foot}{parent=palette primary}
\definecolor{zihorange}{rgb}{0.898, 0.420, 0.125}
\defbeamertemplate*{footline}{zih01 theme}
{%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\hfill\rule{0cm}{0.7cm}
\end{beamercolorbox}
% fancy color gradient, see
% /usr/share/texmf/doc/generic/pgf/version-for-pdftex/en/pgfmanual.pdf
\begin{tikzpicture}[x=\paperwidth,y=0.5pt]
\shade[left color=white,right color=white] (0.0,0) rectangle (0.2,1);
\shade[left color=darkblue,right color=zihorange] (0.2,0) rectangle (0.8,1);
% \shade[left color=zihorange,right color=zihorange] (0.819,0) rectangle
% (0.978,1);
\end{tikzpicture}
% logo, page number, yet anoter logo
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
\pgfuseimage{logo-l}
\hfill%
%\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
\leavevmode{\usebeamerfont{author in head/foot}\insertframenumber/\inserttotalframenumber}%
\hfill%
\pgfuseimage{logo-r}
\end{beamercolorbox}%
}
\DeclareOptionBeamer{footline}{\csname beamer@theme@footline@#1\endcsname}
\DeclareOptionBeamer{subsection}[true]{\csname beamer@theme@subsection#1\endcsname}
\ProcessOptionsBeamer
\mode<presentation>
% Head
\defbeamertemplate*{headline}{zih01 theme}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
% Navigation
\ifbeamer@theme@navigation
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip2pt
\end{beamercolorbox}%
\fi%
% Section > Subsection
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\insertsectionhead\ \hfill \insertsubsectionhead
\end{beamercolorbox}%
\else%
\begin{beamercolorbox}{subsection in head/foot}
\rule{0cm}{0.7pt}
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
% Frametitle
\defbeamertemplate*{frametitle}{zih01 theme}[1][left]
{%
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\strut\hspace{3mm}\insertframetitle\strut\par%
\vspace{-3.8mm}%
\begin{tikzpicture}[x=\paperwidth,y=0.65pt]
\shade[left color=white,right color=white] (0.0,0) rectangle (0.001,1);
\shade[left color=zihorange,right color=darkblue] (0.02,0) rectangle (0.938,1);
\shade[left color=darkblue,right color=zihorange] (0.01,3) rectangle (0.928,4);
\end{tikzpicture}
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\hspace{3mm}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
}
\mode
<all>

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 KiB

View File

@ -0,0 +1,126 @@
\newif\ifzihbackground
\zihbackgroundtrue
%\zihbackgroundfalse
% Yes, this is dirty
\newcommand\zihmaketitle{
\definecolor{white}{gray}{1.00}%
\setbeamercolor{normaltext}{bg=darkblue}%
\setbeamertemplate{headline}{%
\vskip6.15mm\color{white}\setlength{\arrayrulewidth}{0.3pt}%
\begin{tabular*}{\paperwidth}[b]{l@{\extracolsep\fill}}%
\hspace*{3.0mm}\color{white}%
\includegraphics[height=7.81mm]{theme/logo/tu_logo_black}\\[1.2mm]%
\hline\hspace*{11.76mm}\rule[-0.8mm]{0pt}{2.47mm}%
\def\@@dummyComma{}\rule{0pt}{5.8pt}%
\insertinstitute \\%
\hline%
\end{tabular*}%
\hspace{-\paperwidth}%
}%
\ifzihbackground
\setbeamertemplate{footline}{}
\setbeamertemplate{background}{\includegraphics[height=\paperheight,width=\paperwidth]{theme/logo/bg}}
\else
\setbeamertemplate{footline}{
\parbox[t][22mm]{\paperwidth}{
\vspace*{-8.18mm}
\rule
{98.6mm}{0pt}\includegraphics[height=15mm]{theme/logo/zih_logo_white}
}
}
\fi%
\frame{\titlepage}
% Kopf-/Fusszeilen fuer restliche Folien
\setbeamercolor{normal text}{bg=white}
\setbeamertemplate{background}{}
\setbeamertemplate{headline}[zih01 theme]
\setbeamertemplate{footline}[zih01 theme]
}
\usetheme{Dresden}
%\useoutertheme{theme/zih01}
%\useinnertheme{theme/zih01}
\usepackage{theme/beamerouterthemezih01}
\usepackage{theme/beamerinnerthemezih01}
%\useinnertheme{rounded}
\definecolor{darkblue}{rgb}{0.04, 0.16, 0.32}
% font color for headlines etc.
\setbeamercolor*{structure}{fg=darkblue,bg=white}
% disable navigation symbols
\setbeamertemplate{navigation symbols}{}
% can't remember what this is good for
\setbeamercovered{transparent}
% reduce margin size
\setbeamersize{text margin left=0.7cm}
\setbeamersize{text margin right=0.7cm}
%
% Outer Color Theme "whale" sorgt f?r strenge farbliche Trennen zwischen Zierrat
% und dem eigentlichen Inhalt. Ein dunkler Hintergrund f?r den Folientitel wirkt
% aber zu aufdringlich.
%
\usecolortheme{orchid}
%\setbeamercolor{titlelike}{parent=structure}
%
% Inner Color Theme "orchid" sorgt f?r farblich abgesetzt Bl?cke (Definitionen,
% S?tze, Beispiele, Beweise, ...).
%
%\usecolortheme{orchid}
%zum drucken
%\usepackage{pgfpages}
%\pgfpagesuselayout{resize to}[a4paper,border shrink=5mm,port]
%\pgfpagesuselayout{4 on 1}[a4paper,border shrink=3mm, landscape]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{LightGray} {gray}{0.9}
\definecolor{Gray} {gray}{0.5}
\definecolor{DarkGray} {gray}{0.2}
\definecolor{listinggray} {gray}{0.96}
\definecolor{DarkGreen} {rgb}{0.0,0.6,0.0}
\definecolor{DarkRed} {rgb}{0.6,0.0,0.0}
\definecolor{DarkBlue} {rgb}{0.0,0.0,0.6}
\definecolor{DarkCyan} {rgb}{0.7,0.7,0.2}
\definecolor{DarkDarkGreen} {rgb}{0.0,0.4,0.0}
\lstset{language=C}
\lstset{linewidth=0.99\textwidth}
%\lstset{boxpos=c}
\lstset{xleftmargin=0.03\textwidth}
%\lstset{breaklines=true}
\lstset{framexleftmargin=0.03\textwidth}
\lstset{abovecaptionskip=\smallskipamount}
\lstset{belowcaptionskip=\smallskipamount}
\lstset{basicstyle=\ttfamily\tiny}
\lstset{backgroundcolor=\color{listinggray}}
%\lstset{frameround=ffff}
%\lstset{frame=shadowbox}
%\lstset{rulesepcolor=\color{Gray}}
\lstset{numbers=left}
\lstset{numberstyle=\tiny \color{DarkGray}}
\lstset{numbersep=0.01\textwidth}
\lstset{showstringspaces=false}
%\lstset{showspaces=false}
\lstset{tabsize=4}
%% all words in the following list are printed in bold letters in a listing
\lstset{emph={__asm__, __volatile__, return, main,},emphstyle={\bfseries\color{DarkGray}}}
\lstset{captionpos=b}
% Style für C Sourcecode
\lstdefinestyle{CA}{
language=C,
basicstyle=\ttfamily\scriptsize,
keywordstyle=\ttfamily\bfseries\color{DarkBlue},
stringstyle=\ttfamily\color{DarkRed},
commentstyle=\ttfamily\color{DarkGreen},
identifierstyle=\ttfamily\color{DarkCyan},
backgroundcolor=\color{listinggray},
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -1,8 +1,3 @@
execute "iptables-load" do
action :nothing
command "/etc/network/if-pre-up.d/iptables-load"
end
template "/etc/iptables.rules" do
source "iptables.rules.erb"
mode 0644
@ -27,7 +22,6 @@ cookbook_file "/etc/network/if-pre-up.d/iptables-load" do
mode 0755
owner "root"
group "root"
notifies :run, "execute[iptables-load]"
end
cookbook_file "/etc/network/if-post-down.d/iptables-save" do
@ -36,3 +30,7 @@ cookbook_file "/etc/network/if-post-down.d/iptables-save" do
owner "root"
group "root"
end
execute "iptables-load" do
command "/etc/network/if-pre-up.d/iptables-load"
end