SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
(R)?ex
        Vereinfachtes Deployment mit Rex




Vortrag auf dem Linuxtag 2012

Daniel Bäurer
inovex GmbH
Systems Engineer




              Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
(R)?ex
        Vereinfachtes Deployment mit Rex




Was ist (R)?ex

Wie funktioniert (R)?ex

Welche Funktionen bietet (R)?ex

Was will (R)?ex erreichen

Praktische Beispiele und Deployment einer Entwicklungsplatform mit (R)?ex
             Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
(R)?ex
       Vereinfachtes Deployment mit Rex




Was ist (R)?ex




             Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Was ist (R)?ex




            HW Bestellung           Einbau            OS-Deploy




                                  Setup Server        App-Deploy




       Ziel: Neue Server sollen so schnell wie möglich einsatzbereit sein!




26.07.12
Was ist (R)?ex




                                  Setup Server        App-Deploy




       Ziel: Neue Server sollen so schnell wie möglich einsatzbereit sein!




26.07.12
Was ist (R)?ex




           Mit (R)?ex können alle Server von einem zentralen Punkt
                     aus, über den kompletten Prozess des
           Konfigurationsmanagement und Applikations-Deployment,
                              verwaltet werden.




           A simple framework to simplify systemadministration


26.07.12
(R)?ex
        Vereinfachtes Deployment mit Rex




Wie funktioniert (R)?ex




             Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Wie funktioniert (R)?ex




           ●   Es gibt ein Rexfile

           ●   Ähnlich wie ein Makefile

           ●   Ein normales Perlscript

           ●   Kann auch als Library in eigenen Perlscripts verwendet werden




26.07.12
Wie funktioniert (R)?ex




    for s in $(grep ^backend ${HOME}/server.lst); do

           ssh root@${s} “useradd -u 1500 -d /var/www/app -g appuser -m appuser“

           ssh root@${s} “apt-get update && apt-get install apache2“

           sed 's/@keepalive@/On/' templates/apache2.conf | 

               ssh root@${s} “cat > /etc/apache2/apache2.conf“

    done




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
Wie funktioniert (R)?ex


           set user => "root";
           set group => www => "www[01..15]";

           task "prepare", group => "www", sub {

                create_user "appuser",
                    home => "/var/www/app",
                    uid => 1500,
                    groups => [qw/appuser/];

                update_package_db;
                install "apache2";

                file "/etc/apache2/apache2.conf",
                      content => template("templates/apache2.conf",
                           keepalive => "On", ),
                      on_change => sub { service apache2 => "restart"; };

           };




26.07.12
(R)?ex
       Vereinfachtes Deployment mit Rex




Welche Funktionen bietet (R)?ex




            Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Welche Funktionen bietet (R)?ex


             Filesystem Operationen

             if( is_file("/etc/motd") ) {
                   rm "/etc/motd";
             }

             chown "root", "/etc"
                recursive => 1;

             chgrp "root", "/etc",
                 recursive => 1;

             chmod 644, "/etc/passwd";

             if( !is_dir("/var/www/app") ) {
                    mkdir "/var/www/app",
                    owner => "appuser",
                    mode => 755;
             }




26.07.12
Welche Funktionen bietet (R)?ex




             Datei Operationen

             file "/path/on/the/remote/machine",
                   source => "/path/on/local/machine",
                   owner => "root",
                   group => "root",
                   mode => 400,
                   on_change => sub { say "File was changed."; };

             delete_lines_matching "/var/log/auth.log",
                 matching => qr{Failed};




26.07.12
Welche Funktionen bietet (R)?ex



             User/Gruppen-Management

             create_group „appuser“, {
                 gid => 1500,
                 system => 1,
             };

             create_user "appuser",
                 uid => 1500,
                 home => '/var/www/app',
                 comment => 'App-User',
                 expire => '2012-05-23',
                 groups => ['appuser', 'www', '[…]' ],
                 password => 'foobar',
                 system => 1,
                 ssh_key => "ssh-rsa AAAAB3NzaC1yc2EAADABAAABAQCh..";
              };




26.07.12
Welche Funktionen bietet (R)?ex




             Paket-Management

             update_package_db;

             install package => [
                  "perl",
                  "apache2",
                  "tomcat6",
                  "vim“,
                  "sudo“,
                  "openjdk-7-jre“
             ];

             remove package => "vim-tiny";




26.07.12
Welche Funktionen bietet (R)?ex




             Process/Service-Management

             killall "apache2";

             service apache2 => "ensure", "started";

             service apache2 => "restart";

             if( service apache2 => "status" ) {
                   say "Apache2 is running";
             }
             else {
                   say "Apache2 is not running";
             }




26.07.12
Welche Funktionen bietet (R)?ex




             Inject

             template_file "inject.conf";
             template_search_for "*.properties";

             inject "myapp.tar.gz",
                  pre_pack_hook => sub {
                      run "BUNDLE_PATH=vendor/bundle bundle install";
                  },
                  post_pack_hook => {
                      say "Post Pack Hook";
                  };

             inject "myapp.war";




26.07.12
Welche Funktionen bietet (R)?ex




             Deploy

             deploy_to "/var/deploy";
             document_root "/var/www";

             deploy "myapp.tar.gz"

             context_path "/myapp";

             deploy "myapp.war",
                 username => "admin",
                 password => "admin-password",
                 port => 8080,
                 manager_url => "/manager";




26.07.12
Welche Funktionen bietet (R)?ex




             Templating – bereits integrierete Variablen

             <%= hostname %>
             <%= domain %>
             <%= eth0_ip %>
             <%= eth0_mac %>
             <%= … %>

             Templating – eigene Variablen

             <%= myvariable1 %>

             template("templates/apache2.conf",
                          myvariable1 => "defined",)




26.07.12
Welche Funktionen bietet (R)?ex




             ●   Cron

             ●   Iptables

             ●   Sysctl

             ●   Partitionierung (Parted)

             ●   LVM

             ●   Virtualisierung

             ●   und vieles mehr!




26.07.12
(R)?ex
       Vereinfachtes Deployment mit Rex




Was will (R)?ex erreichen



             Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Was will (R)?ex erreichen?




             OPS             DEV




26.07.12
Was will (R)?ex erreichen?




                      OPS    DEV




26.07.12
(R)?ex
       Vereinfachtes Deployment mit Rex




Praktische Beispiele und Deployment einer Entwicklungsplatform mit (R)?ex
            Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Praktische Beispiele und Deployment einer
Entwicklungsumgebung mit (R)?ex




               ●   Beispiele aus dem Admin-Alltag

               ●   Beispiel eines Server-Setup

               ●   Bereitstellen einer Entwicklungsumgebung

               ●   App-Deployment mit (R)?ex




26.07.12
(R)?ex
       Vereinfachtes Deployment mit Rex




●
    Mehr Infos unter http://rexify.org
●
    Für CentOS, Fedora, Debian, Ubuntu, Gentoo, Mageia, OpenSuSE, CPAN




             Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
Vielen Dank für Ihre Aufmerksamkeit!




inovex GmbH

Pforzheim                München                    Köln
Karlsruher Straße 71     Valentin-Linhof-Straße 2   Schanzenstraße 6-20
D-75179 Pforzheim        D-81829 München            D-51063 Köln




    26.07.12

Weitere ähnliche Inhalte

Andere mochten auch

Slides privitera 2
Slides privitera 2Slides privitera 2
Slides privitera 2imartini
 
Acuerdo Colaboracion Futur de Castello y Academia ETTEP
Acuerdo Colaboracion Futur de Castello y Academia ETTEPAcuerdo Colaboracion Futur de Castello y Academia ETTEP
Acuerdo Colaboracion Futur de Castello y Academia ETTEPFuturdeCastello
 
Quinta encuesta nacional a estudiantes de enseñanza media 2011
Quinta encuesta nacional a estudiantes de enseñanza media 2011Quinta encuesta nacional a estudiantes de enseñanza media 2011
Quinta encuesta nacional a estudiantes de enseñanza media 2011Mendoza Post
 
El otoño, de 2º3
El otoño, de 2º3El otoño, de 2º3
El otoño, de 2º3marllorente
 
Bao mat ma_nguon_tren_mysql
Bao mat ma_nguon_tren_mysqlBao mat ma_nguon_tren_mysql
Bao mat ma_nguon_tren_mysqlViet Nam
 
Hpht direct new: Improving safety in HPHT
Hpht direct new: Improving safety in HPHTHpht direct new: Improving safety in HPHT
Hpht direct new: Improving safety in HPHTHPHT Wells Summit
 
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...Jerzy Opar
 
Indice SLA: Ética y Cumplimiento
Indice SLA: Ética y CumplimientoIndice SLA: Ética y Cumplimiento
Indice SLA: Ética y CumplimientoIndiceSLA
 
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTE
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTEPORTFOLIO NACHO NAVA. DIRECTOR DE ARTE
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTENacho Nava
 
3 radio. anatomy.&amp;interpert i
3 radio. anatomy.&amp;interpert i3 radio. anatomy.&amp;interpert i
3 radio. anatomy.&amp;interpert iAbanoub Malki
 
IDC Big Data & Analytics Conference 2014
IDC Big Data & Analytics Conference 2014IDC Big Data & Analytics Conference 2014
IDC Big Data & Analytics Conference 2014IDC Italy
 
Iglesia Cristo Viene - la oración
Iglesia Cristo Viene - la oraciónIglesia Cristo Viene - la oración
Iglesia Cristo Viene - la oracióncristovienecr
 
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...Guillermo Rodríguez Borges
 
Cultura bantu parte 1 esp[1]
Cultura bantu parte 1   esp[1]Cultura bantu parte 1   esp[1]
Cultura bantu parte 1 esp[1]iyaladde98
 
Practica 4 Experimento de Reynolds
Practica 4 Experimento de ReynoldsPractica 4 Experimento de Reynolds
Practica 4 Experimento de ReynoldsJasminSeufert
 

Andere mochten auch (20)

La primavera dadada
La primavera dadadaLa primavera dadada
La primavera dadada
 
Slides privitera 2
Slides privitera 2Slides privitera 2
Slides privitera 2
 
Acuerdo Colaboracion Futur de Castello y Academia ETTEP
Acuerdo Colaboracion Futur de Castello y Academia ETTEPAcuerdo Colaboracion Futur de Castello y Academia ETTEP
Acuerdo Colaboracion Futur de Castello y Academia ETTEP
 
Quinta encuesta nacional a estudiantes de enseñanza media 2011
Quinta encuesta nacional a estudiantes de enseñanza media 2011Quinta encuesta nacional a estudiantes de enseñanza media 2011
Quinta encuesta nacional a estudiantes de enseñanza media 2011
 
Manual educadores
Manual educadoresManual educadores
Manual educadores
 
El otoño, de 2º3
El otoño, de 2º3El otoño, de 2º3
El otoño, de 2º3
 
Bao mat ma_nguon_tren_mysql
Bao mat ma_nguon_tren_mysqlBao mat ma_nguon_tren_mysql
Bao mat ma_nguon_tren_mysql
 
Hpht direct new: Improving safety in HPHT
Hpht direct new: Improving safety in HPHTHpht direct new: Improving safety in HPHT
Hpht direct new: Improving safety in HPHT
 
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...
Jak badać satysfakcję klientów zgodnie z rekomendacjami KNF dla zakładów ubez...
 
Indice SLA: Ética y Cumplimiento
Indice SLA: Ética y CumplimientoIndice SLA: Ética y Cumplimiento
Indice SLA: Ética y Cumplimiento
 
Harley Davidson - Marketing Radical
Harley Davidson - Marketing RadicalHarley Davidson - Marketing Radical
Harley Davidson - Marketing Radical
 
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTE
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTEPORTFOLIO NACHO NAVA. DIRECTOR DE ARTE
PORTFOLIO NACHO NAVA. DIRECTOR DE ARTE
 
Los 8 secretos del éxito
Los 8 secretos del éxitoLos 8 secretos del éxito
Los 8 secretos del éxito
 
3 radio. anatomy.&amp;interpert i
3 radio. anatomy.&amp;interpert i3 radio. anatomy.&amp;interpert i
3 radio. anatomy.&amp;interpert i
 
IDC Big Data & Analytics Conference 2014
IDC Big Data & Analytics Conference 2014IDC Big Data & Analytics Conference 2014
IDC Big Data & Analytics Conference 2014
 
Iglesia Cristo Viene - la oración
Iglesia Cristo Viene - la oraciónIglesia Cristo Viene - la oración
Iglesia Cristo Viene - la oración
 
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...
Presentación ii jornadas aprovechando las redes sociales en la oficina de fa...
 
Cadena epidemiologica
Cadena epidemiologica Cadena epidemiologica
Cadena epidemiologica
 
Cultura bantu parte 1 esp[1]
Cultura bantu parte 1   esp[1]Cultura bantu parte 1   esp[1]
Cultura bantu parte 1 esp[1]
 
Practica 4 Experimento de Reynolds
Practica 4 Experimento de ReynoldsPractica 4 Experimento de Reynolds
Practica 4 Experimento de Reynolds
 

Ähnlich wie Rex Linuxtag 2012

Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Jan Gehring
 
Microservices mit Rust
Microservices mit RustMicroservices mit Rust
Microservices mit RustJens Siebert
 
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...NETWAYS
 
Drush – Das Sackmesser für die Kommandozeile
Drush – Das Sackmesser für die KommandozeileDrush – Das Sackmesser für die Kommandozeile
Drush – Das Sackmesser für die KommandozeileFlorian Latzel
 
Backend-Services mit Rust
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit RustJens Siebert
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Torsten Kleiber
 
Echtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisierenEchtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisierenMT AG
 
Production-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenProduction-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenAndré Goliath
 
Einführung React Native
Einführung React NativeEinführung React Native
Einführung React NativeMarkus Günther
 
Microprofile-Anwendungen mit Quarkus
Microprofile-Anwendungen mit Quarkus Microprofile-Anwendungen mit Quarkus
Microprofile-Anwendungen mit Quarkus gedoplan
 
MT AG: Sesam oeffne Dich
MT AG: Sesam oeffne DichMT AG: Sesam oeffne Dich
MT AG: Sesam oeffne DichMT AG
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenWalter Ebert
 
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...LeanIX GmbH
 
JBoss AS / EAP Clustering
JBoss AS / EAP  ClusteringJBoss AS / EAP  Clustering
JBoss AS / EAP Clusteringhwilming
 

Ähnlich wie Rex Linuxtag 2012 (20)

Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex
 
Microservices mit Rust
Microservices mit RustMicroservices mit Rust
Microservices mit Rust
 
Automatisierung mit grunt
Automatisierung mit gruntAutomatisierung mit grunt
Automatisierung mit grunt
 
Einführung in Puppet
Einführung in PuppetEinführung in Puppet
Einführung in Puppet
 
Einführung in Docker
Einführung in DockerEinführung in Docker
Einführung in Docker
 
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
 
Drush – Das Sackmesser für die Kommandozeile
Drush – Das Sackmesser für die KommandozeileDrush – Das Sackmesser für die Kommandozeile
Drush – Das Sackmesser für die Kommandozeile
 
Backend-Services mit Rust
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit Rust
 
Testing tools
Testing toolsTesting tools
Testing tools
 
Rack-Middleware
Rack-MiddlewareRack-Middleware
Rack-Middleware
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
 
Echtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisierenEchtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisieren
 
Production-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenProduction-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 Wochen
 
Einführung React Native
Einführung React NativeEinführung React Native
Einführung React Native
 
Microprofile-Anwendungen mit Quarkus
Microprofile-Anwendungen mit Quarkus Microprofile-Anwendungen mit Quarkus
Microprofile-Anwendungen mit Quarkus
 
Webapplikationen mit Node.js
Webapplikationen mit Node.jsWebapplikationen mit Node.js
Webapplikationen mit Node.js
 
MT AG: Sesam oeffne Dich
MT AG: Sesam oeffne DichMT AG: Sesam oeffne Dich
MT AG: Sesam oeffne Dich
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrieren
 
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
 
JBoss AS / EAP Clustering
JBoss AS / EAP  ClusteringJBoss AS / EAP  Clustering
JBoss AS / EAP Clustering
 

Mehr von inovex GmbH

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegeninovex GmbH
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIinovex GmbH
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolutioninovex GmbH
 
Network Policies
Network PoliciesNetwork Policies
Network Policiesinovex GmbH
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learninginovex GmbH
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungeninovex GmbH
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeteninovex GmbH
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetesinovex GmbH
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systemsinovex GmbH
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreiheninovex GmbH
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenteninovex GmbH
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?inovex GmbH
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Projectinovex GmbH
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretabilityinovex GmbH
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use caseinovex GmbH
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessinovex GmbH
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumiinovex GmbH
 

Mehr von inovex GmbH (20)

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AI
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolution
 
WWDC 2019 Recap
WWDC 2019 RecapWWDC 2019 Recap
WWDC 2019 Recap
 
Network Policies
Network PoliciesNetwork Policies
Network Policies
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungen
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
 

Rex Linuxtag 2012

  • 1. (R)?ex Vereinfachtes Deployment mit Rex Vortrag auf dem Linuxtag 2012 Daniel Bäurer inovex GmbH Systems Engineer Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 2. (R)?ex Vereinfachtes Deployment mit Rex Was ist (R)?ex Wie funktioniert (R)?ex Welche Funktionen bietet (R)?ex Was will (R)?ex erreichen Praktische Beispiele und Deployment einer Entwicklungsplatform mit (R)?ex Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 3. (R)?ex Vereinfachtes Deployment mit Rex Was ist (R)?ex Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 4. Was ist (R)?ex HW Bestellung Einbau OS-Deploy Setup Server App-Deploy Ziel: Neue Server sollen so schnell wie möglich einsatzbereit sein! 26.07.12
  • 5. Was ist (R)?ex Setup Server App-Deploy Ziel: Neue Server sollen so schnell wie möglich einsatzbereit sein! 26.07.12
  • 6. Was ist (R)?ex Mit (R)?ex können alle Server von einem zentralen Punkt aus, über den kompletten Prozess des Konfigurationsmanagement und Applikations-Deployment, verwaltet werden. A simple framework to simplify systemadministration 26.07.12
  • 7. (R)?ex Vereinfachtes Deployment mit Rex Wie funktioniert (R)?ex Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 8. Wie funktioniert (R)?ex ● Es gibt ein Rexfile ● Ähnlich wie ein Makefile ● Ein normales Perlscript ● Kann auch als Library in eigenen Perlscripts verwendet werden 26.07.12
  • 9. Wie funktioniert (R)?ex for s in $(grep ^backend ${HOME}/server.lst); do ssh root@${s} “useradd -u 1500 -d /var/www/app -g appuser -m appuser“ ssh root@${s} “apt-get update && apt-get install apache2“ sed 's/@keepalive@/On/' templates/apache2.conf | ssh root@${s} “cat > /etc/apache2/apache2.conf“ done 26.07.12
  • 10. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 11. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 12. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 13. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 14. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 15. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 16. Wie funktioniert (R)?ex set user => "root"; set group => www => "www[01..15]"; task "prepare", group => "www", sub { create_user "appuser", home => "/var/www/app", uid => 1500, groups => [qw/appuser/]; update_package_db; install "apache2"; file "/etc/apache2/apache2.conf", content => template("templates/apache2.conf", keepalive => "On", ), on_change => sub { service apache2 => "restart"; }; }; 26.07.12
  • 17. (R)?ex Vereinfachtes Deployment mit Rex Welche Funktionen bietet (R)?ex Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 18. Welche Funktionen bietet (R)?ex Filesystem Operationen if( is_file("/etc/motd") ) { rm "/etc/motd"; } chown "root", "/etc" recursive => 1; chgrp "root", "/etc", recursive => 1; chmod 644, "/etc/passwd"; if( !is_dir("/var/www/app") ) { mkdir "/var/www/app", owner => "appuser", mode => 755; } 26.07.12
  • 19. Welche Funktionen bietet (R)?ex Datei Operationen file "/path/on/the/remote/machine", source => "/path/on/local/machine", owner => "root", group => "root", mode => 400, on_change => sub { say "File was changed."; }; delete_lines_matching "/var/log/auth.log", matching => qr{Failed}; 26.07.12
  • 20. Welche Funktionen bietet (R)?ex User/Gruppen-Management create_group „appuser“, { gid => 1500, system => 1, }; create_user "appuser", uid => 1500, home => '/var/www/app', comment => 'App-User', expire => '2012-05-23', groups => ['appuser', 'www', '[…]' ], password => 'foobar', system => 1, ssh_key => "ssh-rsa AAAAB3NzaC1yc2EAADABAAABAQCh.."; }; 26.07.12
  • 21. Welche Funktionen bietet (R)?ex Paket-Management update_package_db; install package => [ "perl", "apache2", "tomcat6", "vim“, "sudo“, "openjdk-7-jre“ ]; remove package => "vim-tiny"; 26.07.12
  • 22. Welche Funktionen bietet (R)?ex Process/Service-Management killall "apache2"; service apache2 => "ensure", "started"; service apache2 => "restart"; if( service apache2 => "status" ) { say "Apache2 is running"; } else { say "Apache2 is not running"; } 26.07.12
  • 23. Welche Funktionen bietet (R)?ex Inject template_file "inject.conf"; template_search_for "*.properties"; inject "myapp.tar.gz", pre_pack_hook => sub { run "BUNDLE_PATH=vendor/bundle bundle install"; }, post_pack_hook => { say "Post Pack Hook"; }; inject "myapp.war"; 26.07.12
  • 24. Welche Funktionen bietet (R)?ex Deploy deploy_to "/var/deploy"; document_root "/var/www"; deploy "myapp.tar.gz" context_path "/myapp"; deploy "myapp.war", username => "admin", password => "admin-password", port => 8080, manager_url => "/manager"; 26.07.12
  • 25. Welche Funktionen bietet (R)?ex Templating – bereits integrierete Variablen <%= hostname %> <%= domain %> <%= eth0_ip %> <%= eth0_mac %> <%= … %> Templating – eigene Variablen <%= myvariable1 %> template("templates/apache2.conf", myvariable1 => "defined",) 26.07.12
  • 26. Welche Funktionen bietet (R)?ex ● Cron ● Iptables ● Sysctl ● Partitionierung (Parted) ● LVM ● Virtualisierung ● und vieles mehr! 26.07.12
  • 27. (R)?ex Vereinfachtes Deployment mit Rex Was will (R)?ex erreichen Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 28. Was will (R)?ex erreichen? OPS DEV 26.07.12
  • 29. Was will (R)?ex erreichen? OPS DEV 26.07.12
  • 30. (R)?ex Vereinfachtes Deployment mit Rex Praktische Beispiele und Deployment einer Entwicklungsplatform mit (R)?ex Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 31. Praktische Beispiele und Deployment einer Entwicklungsumgebung mit (R)?ex ● Beispiele aus dem Admin-Alltag ● Beispiel eines Server-Setup ● Bereitstellen einer Entwicklungsumgebung ● App-Deployment mit (R)?ex 26.07.12
  • 32. (R)?ex Vereinfachtes Deployment mit Rex ● Mehr Infos unter http://rexify.org ● Für CentOS, Fedora, Debian, Ubuntu, Gentoo, Mageia, OpenSuSE, CPAN Wir nutzen Technologien, um unsere Kunden glücklich zu machen. Und uns selbst.
  • 33. Vielen Dank für Ihre Aufmerksamkeit! inovex GmbH Pforzheim München Köln Karlsruher Straße 71 Valentin-Linhof-Straße 2 Schanzenstraße 6-20 D-75179 Pforzheim D-81829 München D-51063 Köln 26.07.12