Compare commits
2 Commits
70f77c883b
...
9a806c1c13
Author | SHA1 | Date |
---|---|---|
Benjamin Bohard | 9a806c1c13 | |
Benjamin Bohard | a2db5cca70 |
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
|
@ -16,14 +16,31 @@
|
|||
\newcommand{\pdftitle}{Formation tronc commun niveau 1}
|
||||
\newcommand{\pdfkeywords}{EOLE}
|
||||
|
||||
\logo{
|
||||
\skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{10pt}
|
||||
\skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{10pt}
|
||||
\skbfigure[width=2cm]{cadoles/logo_01.png}~
|
||||
}
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}}
|
||||
%\institute[MENJ]{\skbfigure[width=2cm]{en/logo_MENJ.jpg}}
|
||||
|
||||
\skbinput[from=sli]{style/preambule}
|
||||
|
||||
\newlength{\logospacing}
|
||||
\setlength{\logospacing}{(\textwidth - 2cm*2)/1}
|
||||
|
||||
\logo{
|
||||
\skbfigure[width=2cm]{logos/MENJ.jpg}~ \hspace{\logospacing}
|
||||
\skbfigure[width=2cm]{logos/Cadoles.png}~
|
||||
}
|
||||
|
||||
\title[]{Formation tronc commun niveau 1}
|
||||
\subtitle{XXX CLIENT XXX}
|
||||
|
||||
\author[Equipe Auteur]{Cadoles}
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}}
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}}
|
||||
|
||||
\date{{\small \today}}
|
||||
|
||||
|
|
|
@ -16,14 +16,28 @@
|
|||
\newcommand{\pdftitle}{Formation tronc commun niveau 2}
|
||||
\newcommand{\pdfkeywords}{EOLE}
|
||||
|
||||
\logo{
|
||||
\skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{71pt}
|
||||
\skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{71pt}
|
||||
\skbfigure[width=2cm]{cadoles/logo_01.png}~
|
||||
}
|
||||
|
||||
\skbinput[from=sli]{style/preambule}
|
||||
|
||||
\newlength{\logospacing}
|
||||
\setlength{\logospacing}{(\textwidth - 2cm*2)/1}
|
||||
|
||||
\logo{
|
||||
\skbfigure[width=2cm]{logos/MENJ.jpg}~ \hspace{\logospacing}
|
||||
\skbfigure[width=2cm]{logos/Cadoles.png}~
|
||||
}
|
||||
|
||||
\title[]{Formation tronc commun niveau 2}
|
||||
\subtitle{XXX CLIENT XXX}
|
||||
|
||||
\author[Equipe Auteur]{Cadoles}
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}}
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}}
|
||||
|
||||
\date{{\small \today}}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import argparse
|
|||
import re
|
||||
import random
|
||||
import time
|
||||
from os import path, makedirs
|
||||
from os import path, makedirs, listdir
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
LICENSES = {'CC-by-sa-2.0': 'license-cc-by-sa-2.0',
|
||||
|
@ -49,6 +49,20 @@ def main():
|
|||
"""
|
||||
init function
|
||||
"""
|
||||
def get_institutes_logos(institutes_list=None):
|
||||
if not institutes_list:
|
||||
return []
|
||||
institutes_logos = []
|
||||
known_logos = {path.splitext(path.basename(l))[0]:l for l in listdir('./figures/logos')}
|
||||
for institute in institutes_list:
|
||||
if institute in known_logos:
|
||||
institutes_logos.append(known_logos[institute])
|
||||
else:
|
||||
print(f'Unknown institute {institute}')
|
||||
print(f'Replacing with missing.png')
|
||||
institutes_logos.append('missing.png')
|
||||
return institutes_logos
|
||||
|
||||
root = '../'
|
||||
if args.directory:
|
||||
root = root + re.sub(r'[\w-]+/?', '../', args.directory)
|
||||
|
@ -80,6 +94,9 @@ def main():
|
|||
else:
|
||||
client = client
|
||||
|
||||
institutes = get_institutes_logos(args.institutes)
|
||||
logos_count = len(institutes) + 1
|
||||
|
||||
directory = args.directory
|
||||
if not directory:
|
||||
directory = ''
|
||||
|
@ -95,7 +112,9 @@ def main():
|
|||
'title': title,
|
||||
'author': author,
|
||||
'client': client,
|
||||
'license': license}
|
||||
'license': license,
|
||||
'institutes': institutes,
|
||||
'logos_count': logos_count}
|
||||
master = TEMPLATES[document_class]['master']
|
||||
master_dir = path.join('presentations', directory)
|
||||
programme_dir = path.join(master_dir, 'programme')
|
||||
|
@ -189,6 +208,7 @@ def main():
|
|||
parser_init.add_argument('-t', '--title', help="Titre de la formation")
|
||||
parser_init.add_argument('-l', '--license', help="Termes de mise à disposition de la formation")
|
||||
parser_init.add_argument('-d', '--directory', help="Sous-répertoires où créer le fichier", required=True)
|
||||
parser_init.add_argument('-i', '--institutes', nargs='*', help="Instituts dont les logos sont requis")
|
||||
parser_init.set_defaults(func=init)
|
||||
parser_update = subparsers.add_parser('update', help='Mise à jour des fichiers inclus')
|
||||
parser_update.add_argument('-m', '--master', help="Emplacement du fichier maître", required=True)
|
||||
|
|
|
@ -12,5 +12,4 @@
|
|||
ou écrivez à Creative Commons, 444 Castro Street, Suite 900,
|
||||
Mountain View, California, 94041, USA.
|
||||
\end{block}
|
||||
\pnote{test des notes standard}
|
||||
\end{frame}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
\frametitle{Gestion des services}
|
||||
\begin{itemize}
|
||||
\item from pyeole.service import *
|
||||
\item manage\_service :
|
||||
\item manage\_services :
|
||||
\begin{itemize}
|
||||
\item action : start|stop|restart|status,
|
||||
\item service : nom du service,
|
||||
|
@ -46,15 +46,6 @@
|
|||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item a=service\_out('ntp', 'stop')
|
||||
\item a=service\_code('smbd', 'stop', 'fichier')
|
||||
\item a=service\_code\_no\_container('apache2', 'restart')
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Execution de commande}
|
||||
\begin{itemize}
|
||||
|
@ -72,6 +63,15 @@
|
|||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item a=service\_out('ntp', 'stop')
|
||||
\item a=service\_code('smbd', 'stop', 'fichier')
|
||||
\item a=service\_code\_no\_container('apache2', 'restart')
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
%\begin{frame}
|
||||
% \frametitle{Execution de commande}
|
||||
% \begin{itemize}
|
||||
|
|
|
@ -80,54 +80,3 @@
|
|||
\item test service : tcpcheck 2 192.0.2.52:80
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Gestion des locks}
|
||||
\begin{itemize}
|
||||
%FIXME
|
||||
\item CreoleLock acquire "nom\_du\_lock"
|
||||
\item CreoleLock release "nom\_du\_lock"
|
||||
\item CreoleLock is\_locked "nom\_du\_lock"
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Créé un lock "test" ;
|
||||
\item Supprimé le lock "test".
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Valeur d'une variable}
|
||||
\begin{itemize}
|
||||
\item CreoleGet nom\_variable
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Récupérer la valeur de la variable adresse\_ip\_eth0
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Modifier la valeur}
|
||||
\begin{itemize}
|
||||
\item CreoleSet nom\_variable valeur ;
|
||||
\item Pour une liste : CreoleSet nom\_variable """valeur1
|
||||
\item valeur2""" ;
|
||||
\item attention, ne peut changer la longueur de esclave.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Modifier la valeur de la variable de vm\_swappiness à 10 ;
|
||||
\item modifier ubuntu\_update\_mirrors à "eole.ac-dijon.fr inconnu.lan"
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Modifié dans le template de configure sshd\_config : "LoginGraceTime" de "30" à "60"
|
||||
\item créé le patch.
|
||||
\item Modifier dans le template de configure sshd\_config : "LoginGraceTime" de "30" à "60"
|
||||
\item créer le patch.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
{\setbeamercolor{background canvas}{bg=TravauxPratiques}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Récupérer la valeur de la variable adresse\_ip\_eth0
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\begin{itemize}
|
||||
\item Modifier la valeur de la variable de vm\_swappiness à 10 ;
|
||||
\item modifier ubuntu\_update\_mirrors à "eole.ac-dijon.fr inconnu.lan"
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Pratique}
|
||||
\framesubtitle{Gérer le service vnstat}
|
||||
|
|
|
@ -26,6 +26,28 @@
|
|||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{CreoleGet}
|
||||
\framesubtitle{Récupérer la valeur d’une variable}
|
||||
\begin{itemize}
|
||||
\item \commande{CreoleGet nom\_variable}
|
||||
\item \commande{CreoleGet --list}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{CreoleSet}
|
||||
\framesubtitle{Assigner une valeur à une variable}
|
||||
\begin{itemize}
|
||||
\item \commande{CreoleSet <nom\_variable> <valeur>} ;
|
||||
\item Pour une liste : \commande{CreoleSet nom\_variable """valeur1}
|
||||
\item \commande{> valeur2"""} ;
|
||||
\end{itemize}
|
||||
\begin{alertblock}{Manipulation des listes esclaves}
|
||||
\commande{CreoleSet} ne permet pas de changer la longueur de esclave. Une assignation de valeur pour une liste doit respecter la longueur initiale.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Dictionnaires Creole}
|
||||
\frametitle{Les paquets}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
\usepackage{xcolor}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{hyperxmp}
|
||||
\usepackage{calc}
|
||||
%\usepackage{pdfpcnotes} % Indisponible dans les paquets, installation manuelle requise
|
||||
|
||||
\hypersetup{%
|
||||
|
@ -47,8 +48,6 @@
|
|||
{\skbinput[from=fig]{cadoles/simple_dash}}
|
||||
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo-01.png}}
|
||||
\institute[MENJ]{\skbfigure[width=2cm]{en/logo_MENJ.jpg}}
|
||||
|
||||
\date{{\small \today}}
|
||||
|
||||
|
@ -84,11 +83,6 @@
|
|||
\end{frame}
|
||||
}
|
||||
|
||||
\logo{
|
||||
\skbfigure[width=2cm]{en/logo_MENJ.jpg}~ \hspace{220pt}
|
||||
\skbfigure[width=2cm]{cadoles/logo_01.png}~
|
||||
}
|
||||
|
||||
\addtobeamertemplate{frametitle}{%
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\node[anchor=north west,yshift=2pt,text opacity=0.5, scale=0.8] at (current page.north west) {\insertsubsection};
|
||||
|
|
|
@ -16,15 +16,25 @@
|
|||
\newcommand{\pdftitle}{(((title)))}
|
||||
\newcommand{\pdfkeywords}{EOLE}
|
||||
|
||||
|
||||
\skbinput[from=(((content)))]{style/preambule}
|
||||
|
||||
\newlength{\logospacing}
|
||||
\setlength{\logospacing}{(\textwidth - 2cm*(((logos_count))))/(((logos_count - 1)))}
|
||||
|
||||
\logo{
|
||||
((* for institute in institutes *))
|
||||
\skbfigure[width=2cm]{logos/(((institute)))}~ \hspace{\logospacing}
|
||||
((* endfor *))
|
||||
\skbfigure[width=2cm]{logos/Cadoles.png}~
|
||||
}
|
||||
|
||||
\title[]{(((title)))}
|
||||
\subtitle{(((client)))}
|
||||
|
||||
\author[Equipe Auteur]{(((author)))}
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{cadoles/logo_01.png}}
|
||||
|
||||
\institute[Cadoles]{\skbfigure[width=2cm]{logos/Cadoles.png}}
|
||||
|
||||
\date{{\small \today}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue