diff options
| -rw-r--r-- | 2019-opencampbr/Makefile | 10 | ||||
| -rw-r--r-- | 2019-opencampbr/csnog.png | bin | 0 -> 3816 bytes | |||
| -rw-r--r-- | 2019-opencampbr/mox-board-a.jpg | bin | 0 -> 554574 bytes | |||
| -rw-r--r-- | 2019-opencampbr/pres.pdf | bin | 0 -> 804718 bytes | |||
| -rw-r--r-- | 2019-opencampbr/pres.tex | 221 | ||||
| -rw-r--r-- | 2019-opencampbr/theme/cznic-cz.pdf | bin | 0 -> 6109 bytes | |||
| -rw-r--r-- | 2019-opencampbr/theme/cznic-en.pdf | bin | 0 -> 6060 bytes | |||
| -rw-r--r-- | 2019-opencampbr/theme/nicbottom.pdf | bin | 0 -> 7132 bytes | |||
| -rw-r--r-- | 2019-opencampbr/theme/nictop.pdf | bin | 0 -> 12767 bytes | |||
| -rw-r--r-- | 2019-opencampbr/theme/theme.tex | 42 | ||||
| -rw-r--r-- | 2019-opencampbr/theme/title.tex | 14 | 
11 files changed, 287 insertions, 0 deletions
| diff --git a/2019-opencampbr/Makefile b/2019-opencampbr/Makefile new file mode 100644 index 0000000..4285339 --- /dev/null +++ b/2019-opencampbr/Makefile @@ -0,0 +1,10 @@ +FILE=pres + +$(FILE).pdf: $(FILE).tex $(patsubst %.svg,%.pdf,$(wildcard *.svg)) +	pdflatex -shell-escape $< + +%.pdf: %.svg +	inkscape -D -z --file=$< --export-pdf=$@ --export-latex + +clean: +	ls | grep -v -E "($(FILE).tex|Makefile|theme|svg|jpg|png|eps)$$" | xargs rm -rf diff --git a/2019-opencampbr/csnog.png b/2019-opencampbr/csnog.pngBinary files differ new file mode 100644 index 0000000..8e6fa7b --- /dev/null +++ b/2019-opencampbr/csnog.png diff --git a/2019-opencampbr/mox-board-a.jpg b/2019-opencampbr/mox-board-a.jpgBinary files differ new file mode 100644 index 0000000..b04a326 --- /dev/null +++ b/2019-opencampbr/mox-board-a.jpg diff --git a/2019-opencampbr/pres.pdf b/2019-opencampbr/pres.pdfBinary files differ new file mode 100644 index 0000000..e038aee --- /dev/null +++ b/2019-opencampbr/pres.pdf diff --git a/2019-opencampbr/pres.tex b/2019-opencampbr/pres.tex new file mode 100644 index 0000000..1018672 --- /dev/null +++ b/2019-opencampbr/pres.tex @@ -0,0 +1,221 @@ +\documentclass{beamer} +\usepackage{lmodern} +\usepackage[czech]{babel} +\usepackage[utf8x]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{textpos} +\usepackage{tikz,calc} +\usepackage{graphicx} +\usepackage{wrapfig} +\usepackage{color} +\usepackage{mathtools} +\usepackage{hyperref} +\usepackage{epstopdf} +\usepackage{amsmath} +\usepackage{minted} +\hypersetup{ +	colorlinks, +	citecolor=black, +	filecolor=black, +	linkcolor=black, +	urlcolor=black +} +\usepackage{pdflscape} + +\input{theme/theme.tex} + +\title{Automatické aktualizace\\ A proč Turris Updater není APT} +\author{Karel Kočí} +\date{13.4.2019} + +\begin{document} + +\input{theme/title.tex} + +\begin{frame}{Turris router ve zkratce} +	\begin{columns}[T] +	\begin{column}[T]{5cm} +		\begin{center} +		\includegraphics[width=1cm]{../2018-opencampbr/turris-logo.png}\\ +		\end{center} +		\begin{itemize} +			\item Již tři routery\\ (1.x, Omnia, Mox) +			\item Výkonný hardware +			\item Založené na OpenWRT +			\item Sběr dat, dynamický firewall, rozhraní Foris +			\item \bf Automatické aktualizace +		\end{itemize} +	\end{column} +	\begin{column}[T]{5cm} +		\center +		\includegraphics[width=5cm]{../2018-opencampbr/turris_omnia.png}\\ +		\includegraphics[width=3cm]{mox-board-a.jpg} +	\end{column} +	\end{columns} +\end{frame} + +\begin{frame}{Proč neaktualizovat?} +	\center \huge Protože se to rozbije! +\end{frame} + +\begin{frame}{Proč aktualizovat? A proč automaticky?} +	\begin{itemize} +		\item Záplaty a bezpečnostní opravy +		\item Oprava chyb +		\item Nové funkce +	\end{itemize} +	\vspace{1cm} +	\begin{itemize} +		\item Včasná aplikace bezpečnostních oprav +		\item Nižší nároky na administraci +	\end{itemize} +\end{frame} + +\begin{frame}{Různé implementace aktualizací} +	\begin{itemize} +		\item System reflash (OpenWRT, většina embedded světa) +		\item Offline update (MS Windows) +		\item Runtime update (Většina Linux distribucí) +		\item Automatic runtime update +	\end{itemize} +\end{frame} + +\begin{frame}{Výzvy automatických aktualizací} +	\begin{itemize} +		\item Není admin kterého by jste oslovili +		\item Update nesmí neprojít na problému který nezanesl uživatel +		\item Update nesmí svým konáním poškodit systém +	\end{itemize} +\end{frame} + +\begin{frame}{Naše řešení} +	\begin{itemize} +		\item Používáme OPKG balíčky +		\item Máme předpis toho co má být v systému na našem serveru +		\item Uživatel může do předpisu přidávat pravidla +		\item V průběhu updatu je nutné občas provést reboot +		\item Update se může provádět na několikrát (update updateru a zbytku +			systému) +		\item Je možné označit balíčky které mění ABI a způsobit reinstalaci +			dalších balíčků +		\item Nutná podpora obnovy update procesu po rebootu nebo pádu (journal) +	\end{itemize} +\end{frame} + + +\begin{frame}{Balíčky a jejich meta informace} +	\begin{itemize} +		\item Soubory k nainstalování +		\item Meta-informace +			\begin{itemize} +				\item Verze +				\item Závislosti (depends, conflicts, provides) +				\item \{post,pre\}-\{install,rm\} skripty +				\item a další.. +			\end{itemize} +	\end{itemize} +\end{frame} + +\begin{frame}{OPKG pro automatické aktualizace} +	\begin{itemize} +		\item Nekontroluje kolize mezi soubory mezi balíčky +		\item Má problém s případy jako náhrada složky souborem a obráceně +		\item Sebevražedný (odstraní si svoji závislost a spadne, není transakční) +		\item Nechává po sobě systém v nekonzistentním stavu po pádu +	\end{itemize} +	Prostě naprosto nevyhovující +\end{frame} + +\begin{frame}{APT pro automatické aktualizace} +	\begin{itemize} +		\item Ask first -- do later +		\item Pracuje výhradně lokálně +		\item Neumí řešit stavy kdy je nutný reboot +		\item Není jednoduše možné oddělit preference distribuce od preferencí +			uživatele +	\end{itemize} +	Dalo by se, ale možná stejně práce jako napsat vše od znovu +\end{frame} + +\begin{frame}{Introducing: Updater(-ng)} +	\begin{itemize} +		\item Lua předpis/konfigurace z více zdrojů +		\item update ve formě transakce (instalace souborů naráz a pak až +			spouštění skriptů) +		\item Konfigurace může určovat další závislosti, reboot, replan +		\item Schopnost přeinstalovat rekurzivně balíčky +		\item Dynamická konfigurace rozhodující se podle stavu systému +		\item Silná kontrola konfliktů +		\item Až otravná kontrola minimálních závislostí +	\end{itemize} +\end{frame} + +\begin{frame}[fragile]{Updater-ng konfigurace} +	\begin{minted}[frame=lines]{lua} +Install('updater-ng', 'updater-supervisor', +	{ critical = true }) +Package('updater-ng', { replan = 'finished' }) +Package('l10n_supported', { replan = 'finished' }) +\end{minted} + +	\begin{minted}[frame=lines]{lua} +if board == "mox" then +	Install("mox-otp") +elseif board == "omnia" then +	Install("rainbow-omnia") +	Install("libatsha204") +elseif board == "turris1x" then +	Install("rainbow") +	Install("libatsha204", "update_mac") +end +\end{minted} +\end{frame} + +\begin{frame}[fragile]{Jak updater-ng funguje?} +	\begin{enumerate} +		\item Spustí konfigurační skripty (Lua program) +		\item Stáhne indexy repositářů +	\begin{minted}[frame=lines]{lua} +Repository("turris-core", "../packages/omnia/core") +\end{minted} +		\item Z požadavků z konfigurace a balíků z repositářů sestaví požadovaný +			stav systému +	\begin{minted}[frame=lines]{lua} +Install("base-files", "busybox") +Unistall("htop") +\end{minted} +		\item Sestaví seznam změn pro dosažení cílového stavu +		\item Stáhne potřebné balíky +		\item Provede změny v systému +	\end{enumerate} +\end{frame} + +\begin{frame}[fragile]{Je tedy vše růžové?} +	Ne, uživatel si vždy najde cestu.. + +	\begin{itemize} +		\item Uživatelé mají plný přístup +		\item Ne všichni "konfiguruní" jak se má +	\end{itemize} +\end{frame} + +\begin{frame}[fragile]{Kam dál?} +	\begin{itemize} +		\item Vyšší kontrola uživatele a kam sahá (healthcheck) +		\item Updater může být dokonalý, ale pokud selže programátor softwaru tak +			nic nenadělá (testování a testování) +		\item Plná náhrada OPKG? +	\end{itemize} +\end{frame} + +\begin{frame} +	\includegraphics[height=0.4cm]{csnog.png}\\ +	CSNOG 2019: 28.–29. května 2019, Brno +	\vspace{2cm} + +	\Large Děkuji za pozornost. Otázky?\\ +	\vspace{0.5cm} +	\small \url{git.cynerd.cz/presentations/about/} +\end{frame} + +\end{document} diff --git a/2019-opencampbr/theme/cznic-cz.pdf b/2019-opencampbr/theme/cznic-cz.pdfBinary files differ new file mode 100644 index 0000000..8434d23 --- /dev/null +++ b/2019-opencampbr/theme/cznic-cz.pdf diff --git a/2019-opencampbr/theme/cznic-en.pdf b/2019-opencampbr/theme/cznic-en.pdfBinary files differ new file mode 100644 index 0000000..6208787 --- /dev/null +++ b/2019-opencampbr/theme/cznic-en.pdf diff --git a/2019-opencampbr/theme/nicbottom.pdf b/2019-opencampbr/theme/nicbottom.pdfBinary files differ new file mode 100644 index 0000000..2bc41c7 --- /dev/null +++ b/2019-opencampbr/theme/nicbottom.pdf diff --git a/2019-opencampbr/theme/nictop.pdf b/2019-opencampbr/theme/nictop.pdfBinary files differ new file mode 100644 index 0000000..153c065 --- /dev/null +++ b/2019-opencampbr/theme/nictop.pdf diff --git a/2019-opencampbr/theme/theme.tex b/2019-opencampbr/theme/theme.tex new file mode 100644 index 0000000..12bb169 --- /dev/null +++ b/2019-opencampbr/theme/theme.tex @@ -0,0 +1,42 @@ +% vim: ft=tex + +\definecolor{cznicblue}{RGB}{0,56,145} +\definecolor{cznicred}{RGB}{204,18,38} + +\setbeamertemplate{frametitle}{ +	\begin{textblock}{100}[0,0](0.0,1.1) +		\insertframetitle +	\end{textblock} +} + +\defbeamertemplate*{footline}{CZ.NIC}{ +	\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex, +		leftskip=.3cm,rightskip=.3cm plus1fil]{bottom} + +	\parbox{\linewidth}{\vspace*{-8pt}\hfill\insertpagenumber/\inserttotalframenumber} + +	\includegraphics[width=8cm,keepaspectratio]{theme/nicbottom.pdf} +	\hspace{0.5cm} +	\includegraphics[width=3.5cm,keepaspectratio]{theme/cznic-cz.pdf} +	\end{beamercolorbox} +} + +\defbeamertemplate*{title page}{CZ.NIC}[1][]{ +	\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par +	\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par +	\bigskip +	\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par +	\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par +	% Commenting out following lines hides date from first slide +	\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par +	\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic +} + +\setbeamercolor{structure}{fg=cznicred} +\setbeamercolor{title}{fg=cznicblue} +\setbeamercolor{subtitle}{fg=cznicred} +\setbeamercolor{frametitle}{fg=cznicblue} +\setbeamercolor{author}{fg=cznicblue} +\setbeamercolor{date}{fg=cznicblue} + +\beamertemplatenavigationsymbolsempty diff --git a/2019-opencampbr/theme/title.tex b/2019-opencampbr/theme/title.tex new file mode 100644 index 0000000..d4de9f5 --- /dev/null +++ b/2019-opencampbr/theme/title.tex @@ -0,0 +1,14 @@ +% vim: ft=tex + +\begingroup +\setbeamertemplate{headline} +{ +	\begin{beamercolorbox}[wd=\paperwidth,ht=1.5cm,dp=1.125ex, +		leftskip=.3cm,rightskip=.3cm plus1fil]{top} +		\includegraphics[width=12cm,keepaspectratio]{theme/nictop.pdf} +	\end{beamercolorbox} +} + +\frame{\titlepage} + +\endgroup | 
