SlideShare ist ein Scribd-Unternehmen logo
1 von 69
Downloaden Sie, um offline zu lesen
DEVOPS
L’approche packaging natif
PACKAGING NATIF

• Coeur     de la pile applicative des OS

• Gestion    des dépendances

• Mise   à jour automatique ou sélective

• Utilisé   par les Ops
PACKAGING SOUS UNIX


• RPM (Redhat Package Manager) sous RHEL/CentOS/ Fedora,
 SLES/OpenSuse, Mandriva

• DEB   sous Debian/Ubuntu

• PKG   sous Solaris
QU’EST-CE QU’UN PACKAGE ?

• Un    fichier (.rpm, .deb)

• Des    données (fichiers et programmes)

• Ducode exécuté lors de l’installation, la mise à jour ou la
 suppression du package

• Lié
    à une architecture (Intel, ARM, PowerPC en 32 ou 64bits)
 ou neutre (exemple: une application Java)
POINTS COMMUNS AVEC
            MAVEN
• Construction   par DSL simple

• Quelques    commandes pour les manipuler (rpm, apt-get)

• Gestion des dépendances pour la construction mais aussi
 pour l’exécution

• Dépôts    de packages, accessible en local ou via HTTP

• Nexus    et Artifactory peuvent servir de dépôts RPM

• Mises   à jour automatiques ou contrôlées
UN DSL POUR LES OPS


• Simple

• Quelques   macros

• SH   powered
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
                                Nom
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
                              Version
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
                                              Release (corrective)
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
                                              Résumé du package
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
                                          URL du fournisseur (ex: www.mysql.com)
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch
                                Licence
%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch                  Architecture (processeur, model ou neutre)
%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0              Pré-requis à l’exécution (zero à plusieurs)
Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz   Source (un à plusieurs)
%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat                Description complète du package
%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c                    Préparation de construction (décompression des sources généralement)
%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build                        Construction (depuis sources mais pas seulement)
%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install                 Organisation dans le système de fichiers
%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre                            Opérations pré installation
%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post                         Opérations post installation
%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun                        Opérations pre désinstallation
%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun                       Opérations post désinstallation
%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files                     Listes des fichiers
SOURCE D’UN RPM
Name: myapp
Version: 1.0.0
Release: 1
Summary: MyApp powered by Apache Tomcat
Group: Applications/Communications
URL: http://www.mycorp.org/
Vendor: MyCorp
Packager: MyPackager
License: AGPLv1
BuildArch: noarch

%define tomcat_rel      7.0.22

Requires:      java = 1.6.0

Source0: apache-tomcat-%{tomcat_rel}.tar.gz

%description
MyApp powered by Apache Tomcat

%prep
%setup -q -c

%build

%install

%clean

%pre

%post

%preun

%postun

%files
AUTO-SUFFISANT

• Un   package est auto-suffisant

 • Programmes     principaux et annexes (ex: logrotate)

 • Données

 • Comptes     utilisateurs

 • Contrôle   total sur le cycle de vie ‘en situation’
CYCLE DE VIE IN SITU

• Contrôle   total sur le cycle de vie ‘en situation’

 • Hooks     pre/post installation

 • Hook   lors de la mise à jour

 • Hooks     pre/post désintallation

 • Hooks     sur opération sur autres packages
ET ENCORE

• Un   processus déterministe et donc réplicable

• Peut   être utilisé par Puppet ou Chef

• Des    artifacts centralisables comme pour Maven

• Une    approche composant runtime
TYPES DE RPMS
TYPES DE RPMS

RPMs OS
RPMs OS
 RPMs OS
TYPES DE RPMS

        RPMs OS
        RPMs OS
         RPMs OS
Fournis par votre distribution Linux
TYPES DE RPMS

        RPMs OS
        RPMs OS
         RPMs OS
Fournis par votre distribution Linux

                                       RPMs Applicatif
                                       RPMs Applicatif
                                        RPMs Applicatif
TYPES DE RPMS

        RPMs OS
        RPMs OS
         RPMs OS
Fournis par votre distribution Linux

                                       RPMs Applicatif
                                       RPMs Applicatif
                                        RPMs Applicatif
                                       Produits par les Devs & Ops
TYPES DE RPMS

        RPMs OS
        RPMs OS
         RPMs OS
Fournis par votre distribution Linux

                                       RPMs Applicatif
                                       RPMs Applicatif
                                        RPMs Applicatif
                                       Produits par les Devs & Ops
  RPMs Configuration
  RPMs Configuration
   RPMs Configuration
    RPMs Configuration
TYPES DE RPMS

        RPMs OS
        RPMs OS
         RPMs OS
Fournis par votre distribution Linux

                                       RPMs Applicatif
                                       RPMs Applicatif
                                        RPMs Applicatif
                                       Produits par les Devs & Ops
  RPMs Configuration
  RPMs Configuration
   RPMs Configuration
    RPMs Configuration
           Produits par les Ops
L’ASSEMBLAGE

• Installer   une usine à packages (Jenkins)

• Créer   un dépôt de packages

  • Apache      HTTPd

  • Nexus/Artifactory

• Préparer     des images Linux (JeOS)
USINE A PACKAGES

• Jenkins   (what else ?)

• Un   agent Jenkins par distribution cible

• Déployer    les outils de construction packages sur l’agent

  • rpm-build, make, autoconf    (RPM)

  • build-essential, devscripts, ubuntu-dev-tools   (DEB)
DÉPÔT DE PACKAGES

• Serveur Apache     HTTPd

 • Installer   createrepo (RPM), dpkg-dev (DEB)

 • Upload      via web-dav ou ssh (plus simple)

• Nexus/Artifactory

 • Installer   createrepo (RPM), dpkg-dev (DEB)

 • Upload      via web-dav (par Maven par exemple)
JEOS

• Juste   les composants essentiels de l’OS

• Moins    de packages installés

• Taux    de mise à jour plus faible

• Réduction    des risques de failles de sécurité

• Une     empreinte mémoire et disque réduite
DE JEOS À INSTANCE


• Inventaire   des besoins

• Pré-requis   et dépendances

• Spécificités   applicatives
LES COMMUNS


• Serveur    SSH

• Comptes     administrateur

• Monitoring    (SNMP)

• Firewall   (port 22 et SNMP autorisés)
MA PETITE FORGE

• Subversion

• Git

• Jenkins

• Nexus

• Sonar
SUBVERSION


• Apache   HTTPd server

• Subversion

• Viewvc

• Comptes   utilisateurs
GIT


• Environnement   Java (OpenJDK, Sun/Oracle ou IBM)

• GitBlit

  • Compte   utilisateur spécifique

  • Tomcat   7 powered & single webapp
JENKINS


• Environnement   Java (OpenJDK, Sun/Oracle ou IBM)

• Jenkins

  • Compte   utilisateur spécifique

  • Tomcat   7 powered & single webapp
NEXUS


• Environnement   Java (OpenJDK, Sun/Oracle ou IBM)

• Nexus

 • Compte   utilisateur spécifique

 • Tomcat   7 powered & single webapp
SONAR

• Environnement   Java (OpenJDK, Sun/Oracle ou IBM)

• Sonar

 • Compte    utilisateur spécifique

 • Tomcat   7 powered & single webapp

 • SQL    backend (Derby ou MySQL)
MYSQL BACKEND


• MySQL

 • Comptes   utilisateurs

 • Configuration   InnoDB
GLOBAL FRONT-END

• Apache   HTTPd VHosts

 • Subversion

 • Jenkins

 • Nexus

 • Sonar
RPM DEVOPS


• http://code.google.com/p/devops-incubator/

 • RPMs   pour Subversion, GitBlit, Jenkins, Nexus, Sonar

 • Pour   OpenSuse 12.1
LIRE

• http://www.rpm.org/max-rpm/

• http://fedoraproject.org/wiki/Packaging/Guidelines

• http://en.opensuse.org/openSUSE:Specfile_guidelines

• Nexus   : http://code.google.com/p/nexus-yum-plugin/

• Artifactory   : http://wiki.jfrog.org/confluence/display/RTF/YUM

Weitere ähnliche Inhalte

Andere mochten auch (7)

20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natif20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natif
 
20111220 lyon jug-devops-culture
20111220 lyon jug-devops-culture20111220 lyon jug-devops-culture
20111220 lyon jug-devops-culture
 
From ci to cd
From ci to cdFrom ci to cd
From ci to cd
 
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
 
From ci to cd - LavaJug 2012
From ci to cd  - LavaJug 2012From ci to cd  - LavaJug 2012
From ci to cd - LavaJug 2012
 
20111205 breizh jug-devops
20111205 breizh jug-devops20111205 breizh jug-devops
20111205 breizh jug-devops
 
20120110 paris jug-packaging-natif
20120110 paris jug-packaging-natif20120110 paris jug-packaging-natif
20120110 paris jug-packaging-natif
 

Ähnlich wie 20111205 breizh jug-packaging-natif

Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011
tobiascrawley
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Simon Boulet
 
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivity
webhostingguy
 

Ähnlich wie 20111205 breizh jug-packaging-natif (20)

Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With Rpm
 
Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011
 
Dataservices - Data Processing mit Microservices
Dataservices - Data Processing mit MicroservicesDataservices - Data Processing mit Microservices
Dataservices - Data Processing mit Microservices
 
Torquebox Asheville.rb April 2011
Torquebox Asheville.rb April 2011Torquebox Asheville.rb April 2011
Torquebox Asheville.rb April 2011
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and PluginsDockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
 
Docker for Ops: Extending Docker with APIs, Drivers and Plugins by Arnaud Por...
Docker for Ops: Extending Docker with APIs, Drivers and Plugins by Arnaud Por...Docker for Ops: Extending Docker with APIs, Drivers and Plugins by Arnaud Por...
Docker for Ops: Extending Docker with APIs, Drivers and Plugins by Arnaud Por...
 
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
 
New Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 betaNew Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 beta
 
HTTP/2 - How it's changing web performance
HTTP/2 - How it's changing web performanceHTTP/2 - How it's changing web performance
HTTP/2 - How it's changing web performance
 
HTTP2
HTTP2HTTP2
HTTP2
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptx
 
Architecting the Future: Abstractions and Metadata - KCDC
Architecting the Future: Abstractions and Metadata - KCDCArchitecting the Future: Abstractions and Metadata - KCDC
Architecting the Future: Abstractions and Metadata - KCDC
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivity
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
Dependency Management With Pinto
Dependency Management With PintoDependency Management With Pinto
Dependency Management With Pinto
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applications
 

Mehr von Henri Gomez

Mehr von Henri Gomez (9)

SRE - Mythes et Réalités - Volcamp 2023.pdf
SRE - Mythes et Réalités - Volcamp 2023.pdfSRE - Mythes et Réalités - Volcamp 2023.pdf
SRE - Mythes et Réalités - Volcamp 2023.pdf
 
20200225 bbl-docker-packaging-natif
20200225 bbl-docker-packaging-natif20200225 bbl-docker-packaging-natif
20200225 bbl-docker-packaging-natif
 
Je s'appelle Glowroot - LyonJUG Oct 2018
Je s'appelle Glowroot - LyonJUG Oct 2018Je s'appelle Glowroot - LyonJUG Oct 2018
Je s'appelle Glowroot - LyonJUG Oct 2018
 
Glowroot, le petit APM qui vous veut du bien
Glowroot, le petit APM qui vous veut du bienGlowroot, le petit APM qui vous veut du bien
Glowroot, le petit APM qui vous veut du bien
 
Glowroot, le petit APM qui vous veut du bien
Glowroot, le petit APM qui vous veut du bienGlowroot, le petit APM qui vous veut du bien
Glowroot, le petit APM qui vous veut du bien
 
DevOps - Retour d’expérience - RivieraDev du 20 Octobre 2011
DevOps - Retour d’expérience - RivieraDev du 20 Octobre 2011DevOps - Retour d’expérience - RivieraDev du 20 Octobre 2011
DevOps - Retour d’expérience - RivieraDev du 20 Octobre 2011
 
DevOps - Retour d’expérience - AlpesJug du 20 Septembre 2011
DevOps - Retour d’expérience - AlpesJug du 20 Septembre 2011DevOps - Retour d’expérience - AlpesJug du 20 Septembre 2011
DevOps - Retour d’expérience - AlpesJug du 20 Septembre 2011
 
DevOps - Retour d'expérience - GenevaJug du 30 Aout 2011
DevOps - Retour d'expérience - GenevaJug du 30 Aout 2011DevOps - Retour d'expérience - GenevaJug du 30 Aout 2011
DevOps - Retour d'expérience - GenevaJug du 30 Aout 2011
 
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

20111205 breizh jug-packaging-natif

  • 2. PACKAGING NATIF • Coeur de la pile applicative des OS • Gestion des dépendances • Mise à jour automatique ou sélective • Utilisé par les Ops
  • 3. PACKAGING SOUS UNIX • RPM (Redhat Package Manager) sous RHEL/CentOS/ Fedora, SLES/OpenSuse, Mandriva • DEB sous Debian/Ubuntu • PKG sous Solaris
  • 4. QU’EST-CE QU’UN PACKAGE ? • Un fichier (.rpm, .deb) • Des données (fichiers et programmes) • Ducode exécuté lors de l’installation, la mise à jour ou la suppression du package • Lié à une architecture (Intel, ARM, PowerPC en 32 ou 64bits) ou neutre (exemple: une application Java)
  • 5. POINTS COMMUNS AVEC MAVEN • Construction par DSL simple • Quelques commandes pour les manipuler (rpm, apt-get) • Gestion des dépendances pour la construction mais aussi pour l’exécution • Dépôts de packages, accessible en local ou via HTTP • Nexus et Artifactory peuvent servir de dépôts RPM • Mises à jour automatiques ou contrôlées
  • 6. UN DSL POUR LES OPS • Simple • Quelques macros • SH powered
  • 7. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 8. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Nom Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 9. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 10. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Version Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 11. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 12. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Release (corrective) Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 13. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 14. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications Résumé du package URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 15. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 16. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp URL du fournisseur (ex: www.mysql.com) Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 17. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 18. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch Licence %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 19. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 20. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch Architecture (processeur, model ou neutre) %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 21. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 22. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Pré-requis à l’exécution (zero à plusieurs) Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 23. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 24. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz Source (un à plusieurs) %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 25. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 26. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat Description complète du package %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 27. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 28. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c Préparation de construction (décompression des sources généralement) %build %install %clean %pre %post %preun %postun %files
  • 29. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 30. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build Construction (depuis sources mais pas seulement) %install %clean %pre %post %preun %postun %files
  • 31. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 32. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install Organisation dans le système de fichiers %clean %pre %post %preun %postun %files
  • 33. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 34. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre Opérations pré installation %post %preun %postun %files
  • 35. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 36. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post Opérations post installation %preun %postun %files
  • 37. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 38. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun Opérations pre désinstallation %postun %files
  • 39. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 40. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun Opérations post désinstallation %files
  • 41. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 42. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files Listes des fichiers
  • 43. SOURCE D’UN RPM Name: myapp Version: 1.0.0 Release: 1 Summary: MyApp powered by Apache Tomcat Group: Applications/Communications URL: http://www.mycorp.org/ Vendor: MyCorp Packager: MyPackager License: AGPLv1 BuildArch: noarch %define tomcat_rel 7.0.22 Requires: java = 1.6.0 Source0: apache-tomcat-%{tomcat_rel}.tar.gz %description MyApp powered by Apache Tomcat %prep %setup -q -c %build %install %clean %pre %post %preun %postun %files
  • 44. AUTO-SUFFISANT • Un package est auto-suffisant • Programmes principaux et annexes (ex: logrotate) • Données • Comptes utilisateurs • Contrôle total sur le cycle de vie ‘en situation’
  • 45. CYCLE DE VIE IN SITU • Contrôle total sur le cycle de vie ‘en situation’ • Hooks pre/post installation • Hook lors de la mise à jour • Hooks pre/post désintallation • Hooks sur opération sur autres packages
  • 46. ET ENCORE • Un processus déterministe et donc réplicable • Peut être utilisé par Puppet ou Chef • Des artifacts centralisables comme pour Maven • Une approche composant runtime
  • 48. TYPES DE RPMS RPMs OS RPMs OS RPMs OS
  • 49. TYPES DE RPMS RPMs OS RPMs OS RPMs OS Fournis par votre distribution Linux
  • 50. TYPES DE RPMS RPMs OS RPMs OS RPMs OS Fournis par votre distribution Linux RPMs Applicatif RPMs Applicatif RPMs Applicatif
  • 51. TYPES DE RPMS RPMs OS RPMs OS RPMs OS Fournis par votre distribution Linux RPMs Applicatif RPMs Applicatif RPMs Applicatif Produits par les Devs & Ops
  • 52. TYPES DE RPMS RPMs OS RPMs OS RPMs OS Fournis par votre distribution Linux RPMs Applicatif RPMs Applicatif RPMs Applicatif Produits par les Devs & Ops RPMs Configuration RPMs Configuration RPMs Configuration RPMs Configuration
  • 53. TYPES DE RPMS RPMs OS RPMs OS RPMs OS Fournis par votre distribution Linux RPMs Applicatif RPMs Applicatif RPMs Applicatif Produits par les Devs & Ops RPMs Configuration RPMs Configuration RPMs Configuration RPMs Configuration Produits par les Ops
  • 54. L’ASSEMBLAGE • Installer une usine à packages (Jenkins) • Créer un dépôt de packages • Apache HTTPd • Nexus/Artifactory • Préparer des images Linux (JeOS)
  • 55. USINE A PACKAGES • Jenkins (what else ?) • Un agent Jenkins par distribution cible • Déployer les outils de construction packages sur l’agent • rpm-build, make, autoconf (RPM) • build-essential, devscripts, ubuntu-dev-tools (DEB)
  • 56. DÉPÔT DE PACKAGES • Serveur Apache HTTPd • Installer createrepo (RPM), dpkg-dev (DEB) • Upload via web-dav ou ssh (plus simple) • Nexus/Artifactory • Installer createrepo (RPM), dpkg-dev (DEB) • Upload via web-dav (par Maven par exemple)
  • 57. JEOS • Juste les composants essentiels de l’OS • Moins de packages installés • Taux de mise à jour plus faible • Réduction des risques de failles de sécurité • Une empreinte mémoire et disque réduite
  • 58. DE JEOS À INSTANCE • Inventaire des besoins • Pré-requis et dépendances • Spécificités applicatives
  • 59. LES COMMUNS • Serveur SSH • Comptes administrateur • Monitoring (SNMP) • Firewall (port 22 et SNMP autorisés)
  • 60. MA PETITE FORGE • Subversion • Git • Jenkins • Nexus • Sonar
  • 61. SUBVERSION • Apache HTTPd server • Subversion • Viewvc • Comptes utilisateurs
  • 62. GIT • Environnement Java (OpenJDK, Sun/Oracle ou IBM) • GitBlit • Compte utilisateur spécifique • Tomcat 7 powered & single webapp
  • 63. JENKINS • Environnement Java (OpenJDK, Sun/Oracle ou IBM) • Jenkins • Compte utilisateur spécifique • Tomcat 7 powered & single webapp
  • 64. NEXUS • Environnement Java (OpenJDK, Sun/Oracle ou IBM) • Nexus • Compte utilisateur spécifique • Tomcat 7 powered & single webapp
  • 65. SONAR • Environnement Java (OpenJDK, Sun/Oracle ou IBM) • Sonar • Compte utilisateur spécifique • Tomcat 7 powered & single webapp • SQL backend (Derby ou MySQL)
  • 66. MYSQL BACKEND • MySQL • Comptes utilisateurs • Configuration InnoDB
  • 67. GLOBAL FRONT-END • Apache HTTPd VHosts • Subversion • Jenkins • Nexus • Sonar
  • 68. RPM DEVOPS • http://code.google.com/p/devops-incubator/ • RPMs pour Subversion, GitBlit, Jenkins, Nexus, Sonar • Pour OpenSuse 12.1
  • 69. LIRE • http://www.rpm.org/max-rpm/ • http://fedoraproject.org/wiki/Packaging/Guidelines • http://en.opensuse.org/openSUSE:Specfile_guidelines • Nexus : http://code.google.com/p/nexus-yum-plugin/ • Artifactory : http://wiki.jfrog.org/confluence/display/RTF/YUM