SlideShare a Scribd company logo
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

More Related Content

PDF
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
KEY
OPS4J Pax Tools - Kickstart your OSGi Adventure
PPTX
Que nos espera a los ALM Dudes para el 2013?
PDF
Teaching Open Source In The University
PPSX
ngo profile12
PDF
Aihu structured solutions presentation 0214
PDF
Erp competence book_20141017
PDF
Carta fedegan 131
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
OPS4J Pax Tools - Kickstart your OSGi Adventure
Que nos espera a los ALM Dudes para el 2013?
Teaching Open Source In The University
ngo profile12
Aihu structured solutions presentation 0214
Erp competence book_20141017
Carta fedegan 131

Viewers also liked (20)

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

Similar to Phingified ci and deployment strategies ipc 2012 (20)

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

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Unlocking AI with Model Context Protocol (MCP)
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf

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