SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Oliver Mueller | TEQneers


                Phingified CI and
                Deployment Strategies
Montag, 15. Oktober 12
About Me
                     •   Founder of and CEO at TEQneers [tɛknɪrz]

                     •   Veteran PHP developer

                     •   PHP since 1996 (v2.0)

                     •   Living in Stuttgart, Germany

                     •   like Flying, Photography, NYC




Montag, 15. Oktober 12
TEQneers




Montag, 15. Oktober 12
Agenda
                     •   Introduction to Phing

                     •   Continues Integration

                     •   Deployment Strategy Examples

                     •   Q&A




Montag, 15. Oktober 12
Hands Up!
                     •   Who knows or uses build tools?

                     •   Who is using Continues Integration?




Montag, 15. Oktober 12
Agenda
                     •   Introduction to Phing

                     •   Continues Integration

                     •   Deployment Strategy Examples

                     •   Q&A




Montag, 15. Oktober 12
Phing is not GNU make
                     •   PHP build tool

                     •   based on Apache Ant

                     •   Originally developed by Binarycloud

                     •   Ported to PHP5 by Hans Lellelid

                     •   Lead is Michiel Rook




Montag, 15. Oktober 12
Why use build tools?
                     •   We all hate repetition

                     •   We forget things

                     •   We make mistakes

                     •   We have other things
                         todo

                     •   Be independent of key
                         staff




Montag, 15. Oktober 12
Automate it!
                     •   Helps developers,         •   Improve quality
                         testers, administrators
                                                   •   Reduce errors
                     •   Great for new team
                         members                   •   Save time

                     •   Consolidate scripts

                     •   Standardize tasks

                     •   Define task
                         dependencies


Montag, 15. Oktober 12
Installation
                • Use PEAR
                         # pear channel-discover pear.phing.info
                         # pear install [--alldeps] phing/phing
                • Download package
                         # http://www.phing.info/trac/wiki/Users/Download
                • GIT
                         # git clone git://github.com/phingofficial/phing.git

Montag, 15. Oktober 12
Phing Features
                • Syntax Checks (PhpLint/JsLint)
                • Testing (PHPUnit/SimpleTest)
                • Static code analysis (pdepend)
                • Version Control (SVN/GIT)
                • Documentation (ApiGen/phpDox)
                • File manipulation (mv/rm/chmod)
                • Compression (Zip/Gzip)

Montag, 15. Oktober 12
Montag, 15. Oktober 12
XML Build File
            <?xml version="1.0" encoding="UTF-8" ?>
            <project name="php-git-wrapper" default="test">

                    <!-- PROPERTIES -->
                    <property name="src" value="${project.basedir}/php-git-wrapper" />
                    <property file="build.properties" />

                    <!-- FILESETS -->
                    <fileset dir="${src}/tests" id="tests">
                        <include name="**/*Test.php" />
                        <exclude name="**/Abstracts*.php" />
                    </fileset>

                    <!-- TARGETS -->
                    <target name="prepare" description="Prepare environment" />
                    <target name="test" depends="prepare" description="Start PHPUnit" />
                    <target name="document" description="Generate HTML documentation" />

            </project>



Montag, 15. Oktober 12
Target List
               # phing -l

               Buildfile: /build.xml
                [property] Loading /build.properties
               Default target:
               ------------------------------------------------------
                test      Start PHPUnit Tests

               Main targets:
               ------------------------------------------------------
                document Generate HTML documentation
                prepare   Prepare environment
                test      Start PHPUnit Tests




Montag, 15. Oktober 12
A Closer Look
Montag, 15. Oktober 12
Extending Phing
                     •   Tasks (copy, mkdir, camouflage, ...)

                     •   Types (strings, integer, boolean, DSN, ...)

                     •   Selectors (contain, date, ...)

                     •   Filters (replace, stripwhitespace, ...)

                     •   Mappers (glob, regexp, ...)

                     •   Loggers (xml, html, ...)




Montag, 15. Oktober 12
Agenda
                     •   Introduction to Phing

                     •   Continues Integration

                     •   Deployment Strategy Examples

                     •   Q&A




Montag, 15. Oktober 12
Continues Integration
                     •   Automated build tools

                     •   Short integration phase

                     •   High frequency

                     •   Focus on testing

                     •   Source is XP




Montag, 15. Oktober 12
Standard CI Flow
                         Developer   SVN          CI    Job




                             Ouch!     Failure?        Results
Montag, 15. Oktober 12
Phingify CI




Montag, 15. Oktober 12
Agenda
                     •   Introduction to Phing

                     •   Continues Integration

                     •   Deployment Strategy Examples

                     •   Q&A




Montag, 15. Oktober 12
Deployment
                            All of the activities that make a
                            software system available for use.




                Packaging           Distribution                 Installation


Montag, 15. Oktober 12
What matters
                     •   Product            •   Dependencies

                     •   Project            •   Code size

                     •   Library            •   Configuration
                                                complexity
                     •   Framework

                     •   Open-Source

                     •   Proprietary code




Montag, 15. Oktober 12
Where matters
                     •   Self managed server       •   Cluster

                     •   Local server (intranet)   •   Cloud

                     •   Customer server           •   Appliance

                     •   Multi platform

                     •   Single host

                     •   Server farm




Montag, 15. Oktober 12
Who matters
                     •   Internal administrators

                     •   DevOps

                     •   Customers with IT
                         department

                     •   Some developers

                     •   Trained staff

                     •   Anti geek


Montag, 15. Oktober 12
Deployment Strategies
     Packaging                     Distribution               Installation
   • zip                 • version • ftp          • zookeeper • shell scripts
                           control
   • phar                          • scp          • doozer • composer
   • composer                      • rsync        • noah      • dep / apt-get
   • pear                          • ssh          • accord • rpm / yum
                                   • web page                 • MS WPI
                                                              • chef /
                                                                puppet / juju
Montag, 15. Oktober 12
PEAR
                         <pearpkg2 name="phing" dir="${path.src}">
                            <option name="outputdirectory" value="./build"/>
                            <option name="packagefile" value="package2.xml"/>
                            <option name="packagedirectory" value="./${path.dist}"/>
                            <option name="channel" value="my.pear.channel.com"/>
                            <option name="description" value="${pkg.description}"/>
                            <option name="apiversion" value="${version}"/>
                            <option name="releaseversion" value="${version}"/>
                            <option name="phpdep" value="5.4.0"/>
                            <option name="pearinstallerdep" value="1.4.6"/>
                            <option name="packagetype" value="php"/>
                            <option name="notes" value="${pkg.relnotes}"/>
                            <mapping name="maintainers">
                             <element>
                              <element key="handle" value="foobar"/>
                              <element key="email" value="foobar@teqneers.de"/>
                             </element>
                            </mapping>
                         </pearpkg2>


Montag, 15. Oktober 12
PHAR
                         <pharpackage
                           destfile="${path.build}/package.phar"
                           basedir="./"
                           compression="bzip2">
                           <fileset dir="./classes">
                             <include name="**" />
                           </fileset>
                           <metadata>
                             <element name="version" value="${version}" />
                             <element name="authors">
                               <element name="Foo Bar">
                                 <element name="e-mail" value="foobar@teqneers.de" />
                               </element>
                             </element>
                           </metadata>
                         </pharpackage>




Montag, 15. Oktober 12
MS Web Platform Installer
                         MyApp.zip

                         MyApp root folder           MyApp-includes sub folder

                         Manifest.xml (required)     readme.txt

                         Parameters.xml (required)   license.text

                         Install.sql                 web.config

                         MyApp-admin sub folder      various other files

                         MyApp-content sub folder

Montag, 15. Oktober 12
Composer
                         {
                             "name": "teqneers/PHP-Stream-Wrapper-for-Git",
                             "description": "Git Streamwrapper for PHP",
                             "autoload": { "psr-0": { "TQGit": "src/TQ" } },
                             "type": "library",
                             "license": "MIT",
                             "require": {
                                 "php": ">=5.3.0",
                                 "doctrine/orm": ">=2.2.3,<2.4-dev"
                             },
                             "scripts": {
                                 "post-install-cmd": [
                                     "TQGitSetup::phingInstall"
                                 ],
                                 "post-update-cmd": [
                                     "TQGitSetup::phingUpdate"
                                 ]
                             }
                         }


Montag, 15. Oktober 12
Shell Script
                         #!/bin/sh

                         cd /path/php-git-wrapper
                         unzip php-git-wrapper_1.2.3.zip

                         # copy configuration file to new version
                         copy php-git-wrapper/config.php php-git-wrapper_1.2.3/

                         # remove symlink and set new one
                         rm app
                         ln -s app_1.2.3 app

                         # clean up
                         rm -rf app_1.2.2

                         ...




Montag, 15. Oktober 12
Juju Charm
                         name: php-git-wrapper
                         summary: "PHP-Stream-Wrapper-for-Git"
                         maintainer: "Foo Bar <foobar@teqneers.de>"
                         description: |
                               Install the PHP Stream Wrapper for git,
                               relates to the mysql charm.
                               Can be scaled to multiple server
                         requires:
                           db:
                             interface: mysql
                         provides:
                           proxy: git




Montag, 15. Oktober 12
RPM Build
                         Summary: A PHP stream wrapper made for GIT
                         Name: php-git-wrapper
                         Version: 1.2
                         Release: 3
                         Copyright: GPL
                         Group: Development/Libraries
                         Source: https://github.com/PHP-Stream-Wrapper-for-Git.git
                         URL: https://github.com/teqneers/PHP-Stream-Wrapper-for-Git
                         Distribution: Some Linux
                         Vendor: TEQneers GmbH & Co. KG
                         Packager: Oliver Mueller <oliver@teqneers.de>

                         %description
                         Use it with your projects...
                         %build
                         phing rpm
                         %install
                         phing install
                         %files
                         ...

Montag, 15. Oktober 12
FTP / SCP
                         <ftpdeploy
                           host="your-server-001"
                           username="very"
                           password="secret"
                           dir="/var/www/your-app">
                           <fileset refid="all-files">
                         </ftpdeploy>



                         <scp
                           username="very"
                           password="secret"
                           host="your-server-001"
                           todir="/var/www/your-app">
                           <fileset refid="all-files">
                         </scp>




Montag, 15. Oktober 12
SSH
                         # ask which environment to use
                         <input
                           propertyname="env"
                           validargs="dev,test,prod" />

                         # include file depending on environmnet
                         <property file="properties.${env}"

                         # start update on remote server
                         <ssh
                           username="${login}"
                           password="${password}"
                           host="${server}"
                           command="phing -f /var/www/app/build.xml update" />




Montag, 15. Oktober 12
Q&A
Montag, 15. Oktober 12
Thanks for listening
                            contact me if you have any questions

                                 email: oliver@teqneers.de

                                     twitter: @ogm66

                                  web: www.teqneers.de


                               Have Fun!
Montag, 15. Oktober 12

Contenu connexe

En vedette

Carmen Ramos Corrales_Actividad3_curso.doc”
Carmen  Ramos  Corrales_Actividad3_curso.doc”Carmen  Ramos  Corrales_Actividad3_curso.doc”
Carmen Ramos Corrales_Actividad3_curso.doc”Krmen Crc
 
Numbers not Napkins: Simple Startup Metrics
Numbers not Napkins: Simple Startup MetricsNumbers not Napkins: Simple Startup Metrics
Numbers not Napkins: Simple Startup MetricsDave McClure
 
Social Media Bootcamp by Wendy Maynard
Social Media Bootcamp by Wendy MaynardSocial Media Bootcamp by Wendy Maynard
Social Media Bootcamp by Wendy MaynardWendy Maynard
 
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...jackdowning
 
La confiance des Français dans le numérique - Baromètre ACSEL / CDC
La confiance des Français dans le numérique - Baromètre ACSEL / CDCLa confiance des Français dans le numérique - Baromètre ACSEL / CDC
La confiance des Français dans le numérique - Baromètre ACSEL / CDCLuc Mandret
 
Cum pierd timpul angajatii tai
Cum pierd timpul angajatii taiCum pierd timpul angajatii tai
Cum pierd timpul angajatii taiRadu Popa
 
Proyecto Academia Supera-T
Proyecto Academia Supera-TProyecto Academia Supera-T
Proyecto Academia Supera-TMaria Belen Pm
 
Presentacion villalba sostenible
Presentacion villalba sosteniblePresentacion villalba sostenible
Presentacion villalba sostenibleFernandoArribas
 
Instructivo para la presentacion de informe final del proyecto
Instructivo para la presentacion de informe final del proyectoInstructivo para la presentacion de informe final del proyecto
Instructivo para la presentacion de informe final del proyectokattybe
 
Papel actual del fonoaudiologo en educacion y familia
Papel actual del fonoaudiologo en educacion y familiaPapel actual del fonoaudiologo en educacion y familia
Papel actual del fonoaudiologo en educacion y familiaNestor Pardo
 
Guia de trabajos practicos
Guia de trabajos practicosGuia de trabajos practicos
Guia de trabajos practicosruthemartina
 
Red de Business Angels InnoBAN
Red de Business Angels InnoBANRed de Business Angels InnoBAN
Red de Business Angels InnoBANTokApp School
 
Revista
RevistaRevista
Revistaampa
 
Centenario De La Gran Via, Madrid
Centenario De La Gran Via, MadridCentenario De La Gran Via, Madrid
Centenario De La Gran Via, MadridJ. Lorea
 
Problem Solving with Critical Thinking
Problem Solving with Critical ThinkingProblem Solving with Critical Thinking
Problem Solving with Critical ThinkingSARCTutor
 
Ecosense new linear slim cove INT CAD Drawing
Ecosense new linear slim cove INT CAD DrawingEcosense new linear slim cove INT CAD Drawing
Ecosense new linear slim cove INT CAD Drawingvalorlighting
 
The Art of Self-Coaching
The Art of Self-CoachingThe Art of Self-Coaching
The Art of Self-CoachingEd Batista
 

En vedette (20)

VENTA DE CABINA DE AUDIOMETRIA
VENTA DE CABINA DE AUDIOMETRIAVENTA DE CABINA DE AUDIOMETRIA
VENTA DE CABINA DE AUDIOMETRIA
 
Carmen Ramos Corrales_Actividad3_curso.doc”
Carmen  Ramos  Corrales_Actividad3_curso.doc”Carmen  Ramos  Corrales_Actividad3_curso.doc”
Carmen Ramos Corrales_Actividad3_curso.doc”
 
BCI & Plan B DR best practice presentation 110914
BCI &  Plan B DR best practice presentation 110914BCI &  Plan B DR best practice presentation 110914
BCI & Plan B DR best practice presentation 110914
 
Numbers not Napkins: Simple Startup Metrics
Numbers not Napkins: Simple Startup MetricsNumbers not Napkins: Simple Startup Metrics
Numbers not Napkins: Simple Startup Metrics
 
Social Media Bootcamp by Wendy Maynard
Social Media Bootcamp by Wendy MaynardSocial Media Bootcamp by Wendy Maynard
Social Media Bootcamp by Wendy Maynard
 
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...
Installation and Setup of Lotus Sametime 8.5 ”From Zero to Hero” in Just Two ...
 
La confiance des Français dans le numérique - Baromètre ACSEL / CDC
La confiance des Français dans le numérique - Baromètre ACSEL / CDCLa confiance des Français dans le numérique - Baromètre ACSEL / CDC
La confiance des Français dans le numérique - Baromètre ACSEL / CDC
 
Cum pierd timpul angajatii tai
Cum pierd timpul angajatii taiCum pierd timpul angajatii tai
Cum pierd timpul angajatii tai
 
Proyecto Academia Supera-T
Proyecto Academia Supera-TProyecto Academia Supera-T
Proyecto Academia Supera-T
 
Presentacion villalba sostenible
Presentacion villalba sosteniblePresentacion villalba sostenible
Presentacion villalba sostenible
 
Instructivo para la presentacion de informe final del proyecto
Instructivo para la presentacion de informe final del proyectoInstructivo para la presentacion de informe final del proyecto
Instructivo para la presentacion de informe final del proyecto
 
Papel actual del fonoaudiologo en educacion y familia
Papel actual del fonoaudiologo en educacion y familiaPapel actual del fonoaudiologo en educacion y familia
Papel actual del fonoaudiologo en educacion y familia
 
Guia de trabajos practicos
Guia de trabajos practicosGuia de trabajos practicos
Guia de trabajos practicos
 
Red de Business Angels InnoBAN
Red de Business Angels InnoBANRed de Business Angels InnoBAN
Red de Business Angels InnoBAN
 
Revista
RevistaRevista
Revista
 
Centenario De La Gran Via, Madrid
Centenario De La Gran Via, MadridCentenario De La Gran Via, Madrid
Centenario De La Gran Via, Madrid
 
Problem Solving with Critical Thinking
Problem Solving with Critical ThinkingProblem Solving with Critical Thinking
Problem Solving with Critical Thinking
 
Ecosense new linear slim cove INT CAD Drawing
Ecosense new linear slim cove INT CAD DrawingEcosense new linear slim cove INT CAD Drawing
Ecosense new linear slim cove INT CAD Drawing
 
The Art of Self-Coaching
The Art of Self-CoachingThe Art of Self-Coaching
The Art of Self-Coaching
 
Microfilamentos de Actina
Microfilamentos de ActinaMicrofilamentos de Actina
Microfilamentos de Actina
 

Similaire à Phingified ci and deployment strategies ipc 2012

Confgetti - Put A Leash On Your Configuration!
Confgetti - Put A Leash On Your Configuration!Confgetti - Put A Leash On Your Configuration!
Confgetti - Put A Leash On Your Configuration!Nikola Tuckovic
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremKris Buytaert
 
Parallel Programming in Python: Speeding up your analysis
Parallel Programming in Python: Speeding up your analysisParallel Programming in Python: Speeding up your analysis
Parallel Programming in Python: Speeding up your analysisManojit Nandi
 
meetup version of Paving the road to production
  meetup version of Paving the road to production    meetup version of Paving the road to production
meetup version of Paving the road to production Matthew Reynolds
 
Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSJames Huston
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
C4ainaction-Introduction to the Pyramid Web Framework
C4ainaction-Introduction to the Pyramid Web FrameworkC4ainaction-Introduction to the Pyramid Web Framework
C4ainaction-Introduction to the Pyramid Web FrameworkFrancis Addai
 
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...Demi Ben-Ari
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Bert Jan Schrijver
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Manage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG WebinarManage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG WebinarJérôme Françoisse
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael CollinsDevopsdays
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupalarithmetric
 
What Industry and Research can learn from Open Source
What Industry and Research can learn from Open SourceWhat Industry and Research can learn from Open Source
What Industry and Research can learn from Open SourceRalph Mueller
 

Similaire à Phingified ci and deployment strategies ipc 2012 (20)

Confgetti - Put A Leash On Your Configuration!
Confgetti - Put A Leash On Your Configuration!Confgetti - Put A Leash On Your Configuration!
Confgetti - Put A Leash On Your Configuration!
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPrem
 
Parallel Programming in Python: Speeding up your analysis
Parallel Programming in Python: Speeding up your analysisParallel Programming in Python: Speeding up your analysis
Parallel Programming in Python: Speeding up your analysis
 
meetup version of Paving the road to production
  meetup version of Paving the road to production    meetup version of Paving the road to production
meetup version of Paving the road to production
 
Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWS
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
 
C4ainaction-Introduction to the Pyramid Web Framework
C4ainaction-Introduction to the Pyramid Web FrameworkC4ainaction-Introduction to the Pyramid Web Framework
C4ainaction-Introduction to the Pyramid Web Framework
 
SKS in git ops mode
SKS in git ops modeSKS in git ops mode
SKS in git ops mode
 
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
 
GitOps , done Right
GitOps , done RightGitOps , done Right
GitOps , done Right
 
Manage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG WebinarManage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG Webinar
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael Collins
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
What Industry and Research can learn from Open Source
What Industry and Research can learn from Open SourceWhat Industry and Research can learn from Open Source
What Industry and Research can learn from Open Source
 
Stackato
StackatoStackato
Stackato
 

Dernier

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
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?Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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 educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
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 DevelopmentsTrustArc
 
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, Adobeapidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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 DiscoveryTrustArc
 
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 RobisonAnna Loughnan Colquhoun
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Phingified ci and deployment strategies ipc 2012

  • 1. Oliver Mueller | TEQneers Phingified CI and Deployment Strategies Montag, 15. Oktober 12
  • 2. About Me • Founder of and CEO at TEQneers [tɛknɪrz] • Veteran PHP developer • PHP since 1996 (v2.0) • Living in Stuttgart, Germany • like Flying, Photography, NYC Montag, 15. Oktober 12
  • 4. Agenda • Introduction to Phing • Continues Integration • Deployment Strategy Examples • Q&A Montag, 15. Oktober 12
  • 5. Hands Up! • Who knows or uses build tools? • Who is using Continues Integration? Montag, 15. Oktober 12
  • 6. Agenda • Introduction to Phing • Continues Integration • Deployment Strategy Examples • Q&A Montag, 15. Oktober 12
  • 7. Phing is not GNU make • PHP build tool • based on Apache Ant • Originally developed by Binarycloud • Ported to PHP5 by Hans Lellelid • Lead is Michiel Rook Montag, 15. Oktober 12
  • 8. Why use build tools? • We all hate repetition • We forget things • We make mistakes • We have other things todo • Be independent of key staff Montag, 15. Oktober 12
  • 9. Automate it! • Helps developers, • Improve quality testers, administrators • Reduce errors • Great for new team members • Save time • Consolidate scripts • Standardize tasks • Define task dependencies Montag, 15. Oktober 12
  • 10. Installation • Use PEAR # pear channel-discover pear.phing.info # pear install [--alldeps] phing/phing • Download package # http://www.phing.info/trac/wiki/Users/Download • GIT # git clone git://github.com/phingofficial/phing.git Montag, 15. Oktober 12
  • 11. Phing Features • Syntax Checks (PhpLint/JsLint) • Testing (PHPUnit/SimpleTest) • Static code analysis (pdepend) • Version Control (SVN/GIT) • Documentation (ApiGen/phpDox) • File manipulation (mv/rm/chmod) • Compression (Zip/Gzip) Montag, 15. Oktober 12
  • 13. XML Build File <?xml version="1.0" encoding="UTF-8" ?> <project name="php-git-wrapper" default="test"> <!-- PROPERTIES --> <property name="src" value="${project.basedir}/php-git-wrapper" /> <property file="build.properties" /> <!-- FILESETS --> <fileset dir="${src}/tests" id="tests"> <include name="**/*Test.php" /> <exclude name="**/Abstracts*.php" /> </fileset> <!-- TARGETS --> <target name="prepare" description="Prepare environment" /> <target name="test" depends="prepare" description="Start PHPUnit" /> <target name="document" description="Generate HTML documentation" /> </project> Montag, 15. Oktober 12
  • 14. Target List # phing -l Buildfile: /build.xml [property] Loading /build.properties Default target: ------------------------------------------------------ test Start PHPUnit Tests Main targets: ------------------------------------------------------ document Generate HTML documentation prepare Prepare environment test Start PHPUnit Tests Montag, 15. Oktober 12
  • 15. A Closer Look Montag, 15. Oktober 12
  • 16. Extending Phing • Tasks (copy, mkdir, camouflage, ...) • Types (strings, integer, boolean, DSN, ...) • Selectors (contain, date, ...) • Filters (replace, stripwhitespace, ...) • Mappers (glob, regexp, ...) • Loggers (xml, html, ...) Montag, 15. Oktober 12
  • 17. Agenda • Introduction to Phing • Continues Integration • Deployment Strategy Examples • Q&A Montag, 15. Oktober 12
  • 18. Continues Integration • Automated build tools • Short integration phase • High frequency • Focus on testing • Source is XP Montag, 15. Oktober 12
  • 19. Standard CI Flow Developer SVN CI Job Ouch! Failure? Results Montag, 15. Oktober 12
  • 21. Agenda • Introduction to Phing • Continues Integration • Deployment Strategy Examples • Q&A Montag, 15. Oktober 12
  • 22. Deployment All of the activities that make a software system available for use. Packaging Distribution Installation Montag, 15. Oktober 12
  • 23. What matters • Product • Dependencies • Project • Code size • Library • Configuration complexity • Framework • Open-Source • Proprietary code Montag, 15. Oktober 12
  • 24. Where matters • Self managed server • Cluster • Local server (intranet) • Cloud • Customer server • Appliance • Multi platform • Single host • Server farm Montag, 15. Oktober 12
  • 25. Who matters • Internal administrators • DevOps • Customers with IT department • Some developers • Trained staff • Anti geek Montag, 15. Oktober 12
  • 26. Deployment Strategies Packaging Distribution Installation • zip • version • ftp • zookeeper • shell scripts control • phar • scp • doozer • composer • composer • rsync • noah • dep / apt-get • pear • ssh • accord • rpm / yum • web page • MS WPI • chef / puppet / juju Montag, 15. Oktober 12
  • 27. PEAR <pearpkg2 name="phing" dir="${path.src}"> <option name="outputdirectory" value="./build"/> <option name="packagefile" value="package2.xml"/> <option name="packagedirectory" value="./${path.dist}"/> <option name="channel" value="my.pear.channel.com"/> <option name="description" value="${pkg.description}"/> <option name="apiversion" value="${version}"/> <option name="releaseversion" value="${version}"/> <option name="phpdep" value="5.4.0"/> <option name="pearinstallerdep" value="1.4.6"/> <option name="packagetype" value="php"/> <option name="notes" value="${pkg.relnotes}"/> <mapping name="maintainers"> <element> <element key="handle" value="foobar"/> <element key="email" value="foobar@teqneers.de"/> </element> </mapping> </pearpkg2> Montag, 15. Oktober 12
  • 28. PHAR <pharpackage destfile="${path.build}/package.phar" basedir="./" compression="bzip2"> <fileset dir="./classes"> <include name="**" /> </fileset> <metadata> <element name="version" value="${version}" /> <element name="authors"> <element name="Foo Bar"> <element name="e-mail" value="foobar@teqneers.de" /> </element> </element> </metadata> </pharpackage> Montag, 15. Oktober 12
  • 29. MS Web Platform Installer MyApp.zip MyApp root folder MyApp-includes sub folder Manifest.xml (required) readme.txt Parameters.xml (required) license.text Install.sql web.config MyApp-admin sub folder various other files MyApp-content sub folder Montag, 15. Oktober 12
  • 30. Composer {     "name": "teqneers/PHP-Stream-Wrapper-for-Git",     "description": "Git Streamwrapper for PHP",     "autoload": { "psr-0": { "TQGit": "src/TQ" } }, "type": "library",     "license": "MIT",     "require": {         "php": ">=5.3.0",         "doctrine/orm": ">=2.2.3,<2.4-dev"     },     "scripts": {         "post-install-cmd": [             "TQGitSetup::phingInstall"         ],         "post-update-cmd": [             "TQGitSetup::phingUpdate"         ]     } } Montag, 15. Oktober 12
  • 31. Shell Script #!/bin/sh cd /path/php-git-wrapper unzip php-git-wrapper_1.2.3.zip # copy configuration file to new version copy php-git-wrapper/config.php php-git-wrapper_1.2.3/ # remove symlink and set new one rm app ln -s app_1.2.3 app # clean up rm -rf app_1.2.2 ... Montag, 15. Oktober 12
  • 32. Juju Charm name: php-git-wrapper summary: "PHP-Stream-Wrapper-for-Git" maintainer: "Foo Bar <foobar@teqneers.de>" description: | Install the PHP Stream Wrapper for git, relates to the mysql charm. Can be scaled to multiple server requires: db: interface: mysql provides: proxy: git Montag, 15. Oktober 12
  • 33. RPM Build Summary: A PHP stream wrapper made for GIT Name: php-git-wrapper Version: 1.2 Release: 3 Copyright: GPL Group: Development/Libraries Source: https://github.com/PHP-Stream-Wrapper-for-Git.git URL: https://github.com/teqneers/PHP-Stream-Wrapper-for-Git Distribution: Some Linux Vendor: TEQneers GmbH & Co. KG Packager: Oliver Mueller <oliver@teqneers.de> %description Use it with your projects... %build phing rpm %install phing install %files ... Montag, 15. Oktober 12
  • 34. FTP / SCP <ftpdeploy host="your-server-001" username="very" password="secret" dir="/var/www/your-app"> <fileset refid="all-files"> </ftpdeploy> <scp username="very" password="secret" host="your-server-001" todir="/var/www/your-app"> <fileset refid="all-files"> </scp> Montag, 15. Oktober 12
  • 35. SSH # ask which environment to use <input propertyname="env" validargs="dev,test,prod" /> # include file depending on environmnet <property file="properties.${env}" # start update on remote server <ssh username="${login}" password="${password}" host="${server}" command="phing -f /var/www/app/build.xml update" /> Montag, 15. Oktober 12
  • 37. Thanks for listening contact me if you have any questions email: oliver@teqneers.de twitter: @ogm66 web: www.teqneers.de Have Fun! Montag, 15. Oktober 12