SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Project Lifecycle
The
Project Lifecycle
Project Setup, Deplyoment and Maintenance of FLOW3 projects.
About me


  Christopher Hlubek
              CTO networkteam GmbH
    FLOW3 & TYPO3 Phoenix Core Team
Requirements



             Support                       Architecture



            Deploy                             Design



                     Test             Implementation

Software
Development
Lifecycle
Code is not everything

 Architecture      Test        Deploy    Support




Software
Development
Lifecycle
Non-Functional

        Project Risks

Framework updates and changes
       Bugs in application code
               Bugs in framework code
           Bugs in 3rd party code
                Erroneous deployment    ...
Architecture
Composition
           of a FLOW3 application


   Build                         Application Packages


Configuration
                                 Community Packages


   Data
                                 Framework Packages

    Web
                  Distribution
Project   Setup
Create a distribution


git clone --recursive -o typo3 
 git://git.typo3.org/FLOW3/Distributions/Base.git MyDistribution

git remote add origin ssh://myrepo.local/path/to/distribution.git
Versioning with                   Git
        simple
                             Distribution



                         Application Packages
   Your Git Server



 TYPO3 / Community Git   Community Packages
         Server
 TYPO3 Git Server

                         Framework Packages
Emergency Hotfix
      - or -
  Core Hacks
Versioning with                   Git
        more flexible
                             Distribution



                         Application Packages
   Your Git Server



 TYPO3 / Community Git   Community Packages
         Server
 TYPO3 Git Server

                         Framework Packages
Git Vendor Branching

Submodule
  Pointer
             origin/master           [TASK] Latest ...
                             vendor/master

            [FEATURE] Some feature ...
            [BUGFIX] Some bugfix ...
            [TASK] Lorem ipsum ...



                        Package Repository
Create a hotfix
git checkout master

git commit ...

git push origin master
Git Vendor Branching
Submodule
  Pointer    origin/master   [HOTFIX] Custom patch
             vendor/master[TASK] Latest ...
            [FEATURE] Some feature ...
            [BUGFIX] Some bugfix ...
            [TASK] Lorem ipsum ...


                     Package Repository
Update the Package
git fetch vendor

git merge vendor/master master

git push origin master
Git Vendor Branching
Submodule
  Pointer
            origin/master   Merge remote-tracking ...
                vendor/master   [TASK] New change ...
              [HOTFIX] Custom patch
              [TASK] Latest ...
              [FEATURE] Some feature ...
              [BUGFIX] Some bugfix ...
              [TASK] Lorem ipsum ...

                      Package Repository
Test
Unit Tests vs.
         Functional Tests
Application Class / Unit
                           }   Unit Test

 Application Package

                           Functional Test
  FLOW3 Framework




       Database
Unit Tests

Test complex logic in isolation

Find the source of a problem

Should test a restricted set of classes
Functional Tests

Test code with the framework and database

Check that a feature works

Isolation is difficult

Use mocks or fixtures for data or external services
Where to test?
                    High risk of failure
                 High complexity
               Hard to test manually

  Less Tests                   More Tests
Test strategies
    101
Don‘t test everything
Test the important stuff
Test every feature with
  one functional test
        (at least)
Reproduce bugs
  with tests
(they won‘t come back)
oyment   Deployment    Deploy

   Deployment   Deployment

         Deployment
Environments

                 Integration           Load-Testing

Live   Staging

                               Development
                                 Development
Manual deployment
# ssh testuser@my-staging-server.example.com
user123 $ cd /var/www/project
user123 $ git pull --rebase
user123 $ git submodule init
user123 $ git submodule update
user123 $ rm -rf Data/Temporary/Production
user123 $ ./flow3 doctrine:migrate
user123 $ ./flow3 cache:warmup

# ssh user123@my-live-server1.example.com
user123 $ cd /home/myproject/public_html
user123 $ git pull --rebase
user123 $ git submodule init
user123 $ git submodule update
user123 $ rm -rf Data/Temporary/Production
user123 $ ./flow3 doctrine:migrate
user123 $ ./flow3 cache:warmup

# ssh user123@my-live-server2.example.com
user123 $ cd /home/myproject/public_html
user123 $ git pull --rebase
                                               Lot of work
user123 $ git submodule init


                                               Erroneous
user123 $ git submodule update
user123 $ rm -rf Data/Temporary/Production
user123 $ ./flow3 doctrine:migrate
user123 $ ./flow3 cache:warmup
Automated
deployment


A custom script?
Rollback on errors?
Distributed deployment?
Meet Surf
Deployment with Surf

                      SSH   Node
        Surf


     CI Server /            Node
      Dev Host




   Git Repositories   Git
The Surf Model
              Deployment               Environments
Workflow

                Deployment




                  Application          Code / Artifacts


           Node                 Node   Server
Deployment process
            initialize   Create release structure
             update      Git update
             migrate     Migration (e.g. Doctrine)
Stages       finalize     Finalize release
              test       Test release (smoke test)
             switch      Publish release to live state
             cleanup     Cleanup old releases
INFO     Deploying vagrant
INFO     Using workflow "Simple workflow"
DEBUG ====== Stage initialize ======
DEBUG **** Node vagrant ****
DEBUG * Application FLOW3 *
DEBUG Executing stage "initialize" on "vagrant" for application FLOW3
DEBUG Execute task "typo3.surf:createdirectories" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "test -d /home/planetflow3/deploy"
DEBUG        $vagrant: "mkdir -p /home/planetflow3/deploy/releases;mkdir -p /home/planetflow3/deploy/shared;mkdir -p /home/planetflow3/deploy/releases/20120331105449;cd /home/planetflow3/deploy/
releases;ln -snf ./20120331105449 next"
DEBUG Execute task "typo3.surf:flow3:createdirectories" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "mkdir -p /home/planetflow3/deploy/shared/Data/Logs;mkdir -p /home/planetflow3/deploy/shared/Data/Persistent;mkdir -p /home/planetflow3/deploy/shared/Configuration"
DEBUG ====== Stage update ======
DEBUG **** Node vagrant ****
DEBUG * Application FLOW3 *
DEBUG Executing stage "update" on "vagrant" for application FLOW3
DEBUG Execute task "typo3.surf:gitcheckout" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "git ls-remote git://github.com/chlu/Planetflow3-Distribution.git refs/heads/master | awk '{print $1 }'"
INFO        > 7662553d5e666261a3a5bc2d6122096e7e21e40a
DEBUG        $vagrant: "if [ -d /home/planetflow3/deploy/cache/localgitclone ]; then        cd /home/planetflow3/deploy/cache/localgitclone           && git fetch -q origin && git reset -q --hard
7662553d5e666261a3a5bc2d6122096e7e21e40a             && git submodule -q init    && for mod in `git submodule status | awk '{ print $2 }'`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules
--get submodule.${mod}.url` && echo synced $mod; done          && git submodule -q sync     && git submodule -q update      && git clean -q -d -x -ff; else git clone -q git://github.com/chlu/Planetflow3-
Distribution.git /home/planetflow3/deploy/cache/localgitclone        && cd /home/planetflow3/deploy/cache/localgitclone       && git checkout -q -b deploy 7662553d5e666261a3a5bc2d6122096e7e21e40a              && git
submodule -q init      && git submodule -q sync      && git submodule -q update; fi"
INFO        > synced Build/Common
INFO        > synced Packages/Application/Libtextcat
INFO        > synced Packages/Application/Planetflow3
INFO        > synced Packages/Framework/Doctrine.Common
INFO        > synced Packages/Framework/Doctrine.DBAL
INFO        > synced Packages/Framework/Doctrine.ORM
INFO        > synced Packages/Framework/Symfony.Component.Yaml
INFO        > synced Packages/Framework/TYPO3.FLOW3
INFO        > synced Packages/Framework/TYPO3.Fluid
INFO        > synced Packages/Framework/TYPO3.Party
DEBUG        $vagrant: "cp -RPp /home/planetflow3/deploy/cache/localgitclone/. /home/planetflow3/deploy/releases/20120331105449 && (echo 7662553d5e666261a3a5bc2d6122096e7e21e40a > /home/
planetflow3/deploy/releases/20120331105449REVISION)"
DEBUG Task "typo3.surf:flow3:symlinkdata" after "typo3.surf:gitcheckout" for application FLOW3
DEBUG Execute task "typo3.surf:flow3:symlinkdata" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "mkdir -p /home/planetflow3/deploy/releases/20120331105449/Data;cd /home/planetflow3/deploy/releases/20120331105449;ln -sf ../../../shared/Data/Logs ./Data/Logs;ln -sf ../../../shared/
Data/Persistent ./Data/Persistent"
DEBUG Task "typo3.surf:flow3:symlinkconfiguration" after "typo3.surf:gitcheckout" for application FLOW3
DEBUG Execute task "typo3.surf:flow3:symlinkconfiguration" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "cd /home/planetflow3/deploy/releases/20120331105449/Configuration;rm -f Production/*;rmdir Production;mkdir -p ../../../shared/Configuration/Production;ln -snf ../../../shared/
Configuration/Production Production"
INFO        > rmdir: failed to remove `Production': No such file or directory
DEBUG ====== Stage migrate ======
DEBUG **** Node vagrant ****
DEBUG * Application FLOW3 *
DEBUG Executing stage "migrate" on "vagrant" for application FLOW3
DEBUG Execute task "typo3.surf:flow3:migrate" on "vagrant" for application "FLOW3"
DEBUG        $vagrant: "cd /home/planetflow3/deploy/releases/20120331105449 && FLOW3_CONTEXT=Production ./flow3 typo3.flow3:doctrine:migrate"
Deployment   structure


                 < Document Root
Deployment Features
Clustered deployment
Configuration overrides
Smoke tests
Custom tasks
Flexible workflows
?
Questions?

Contenu connexe

Tendances

T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
Tobias Liebig
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
Joshua Thijssen
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp
 
Eat my data
Eat my dataEat my data
Eat my data
Peng Zuo
 

Tendances (20)

The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
aptly: Debian repository management tool
aptly: Debian repository management toolaptly: Debian repository management tool
aptly: Debian repository management tool
 
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
 
Puppet evolutions
Puppet evolutionsPuppet evolutions
Puppet evolutions
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Intro to-venv-py3
Intro to-venv-py3Intro to-venv-py3
Intro to-venv-py3
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Hyperledger composer
Hyperledger composerHyperledger composer
Hyperledger composer
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
 
Tp install anything
Tp install anythingTp install anything
Tp install anything
 
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 FlowT3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
 
Eat my data
Eat my dataEat my data
Eat my data
 

Similaire à F3X12 FLOW3 Project Lifecycle

Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
timyates
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Weaveworks
 

Similaire à F3X12 FLOW3 Project Lifecycle (20)

Deploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using SurfDeploying TYPO3 Neos websites using Surf
Deploying TYPO3 Neos websites using Surf
 
Git
GitGit
Git
 
Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Github
 
Collaboration With Git and GitHub
Collaboration With Git and GitHubCollaboration With Git and GitHub
Collaboration With Git and GitHub
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
GitLab on OpenShift
GitLab on OpenShiftGitLab on OpenShift
GitLab on OpenShift
 
VCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT WorkshopVCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT Workshop
 
Core Android
Core AndroidCore Android
Core Android
 
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?Whoops! Where did my architecture go?
Whoops! Where did my architecture go?
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

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...
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

F3X12 FLOW3 Project Lifecycle

  • 2. The Project Lifecycle Project Setup, Deplyoment and Maintenance of FLOW3 projects.
  • 3. About me Christopher Hlubek CTO networkteam GmbH FLOW3 & TYPO3 Phoenix Core Team
  • 4. Requirements Support Architecture Deploy Design Test Implementation Software Development Lifecycle
  • 5. Code is not everything Architecture Test Deploy Support Software Development Lifecycle
  • 6. Non-Functional Project Risks Framework updates and changes Bugs in application code Bugs in framework code Bugs in 3rd party code Erroneous deployment ...
  • 8. Composition of a FLOW3 application Build Application Packages Configuration Community Packages Data Framework Packages Web Distribution
  • 9. Project Setup
  • 10. Create a distribution git clone --recursive -o typo3 git://git.typo3.org/FLOW3/Distributions/Base.git MyDistribution git remote add origin ssh://myrepo.local/path/to/distribution.git
  • 11. Versioning with Git simple Distribution Application Packages Your Git Server TYPO3 / Community Git Community Packages Server TYPO3 Git Server Framework Packages
  • 12. Emergency Hotfix - or - Core Hacks
  • 13. Versioning with Git more flexible Distribution Application Packages Your Git Server TYPO3 / Community Git Community Packages Server TYPO3 Git Server Framework Packages
  • 14. Git Vendor Branching Submodule Pointer origin/master [TASK] Latest ... vendor/master [FEATURE] Some feature ... [BUGFIX] Some bugfix ... [TASK] Lorem ipsum ... Package Repository
  • 15. Create a hotfix git checkout master git commit ... git push origin master
  • 16. Git Vendor Branching Submodule Pointer origin/master [HOTFIX] Custom patch vendor/master[TASK] Latest ... [FEATURE] Some feature ... [BUGFIX] Some bugfix ... [TASK] Lorem ipsum ... Package Repository
  • 17. Update the Package git fetch vendor git merge vendor/master master git push origin master
  • 18. Git Vendor Branching Submodule Pointer origin/master Merge remote-tracking ... vendor/master [TASK] New change ... [HOTFIX] Custom patch [TASK] Latest ... [FEATURE] Some feature ... [BUGFIX] Some bugfix ... [TASK] Lorem ipsum ... Package Repository
  • 19. Test
  • 20. Unit Tests vs. Functional Tests Application Class / Unit } Unit Test Application Package Functional Test FLOW3 Framework Database
  • 21. Unit Tests Test complex logic in isolation Find the source of a problem Should test a restricted set of classes
  • 22. Functional Tests Test code with the framework and database Check that a feature works Isolation is difficult Use mocks or fixtures for data or external services
  • 23. Where to test? High risk of failure High complexity Hard to test manually Less Tests More Tests
  • 25. Don‘t test everything Test the important stuff
  • 26. Test every feature with one functional test (at least)
  • 27. Reproduce bugs with tests (they won‘t come back)
  • 28. oyment Deployment Deploy Deployment Deployment Deployment
  • 29. Environments Integration Load-Testing Live Staging Development Development
  • 30. Manual deployment # ssh testuser@my-staging-server.example.com user123 $ cd /var/www/project user123 $ git pull --rebase user123 $ git submodule init user123 $ git submodule update user123 $ rm -rf Data/Temporary/Production user123 $ ./flow3 doctrine:migrate user123 $ ./flow3 cache:warmup # ssh user123@my-live-server1.example.com user123 $ cd /home/myproject/public_html user123 $ git pull --rebase user123 $ git submodule init user123 $ git submodule update user123 $ rm -rf Data/Temporary/Production user123 $ ./flow3 doctrine:migrate user123 $ ./flow3 cache:warmup # ssh user123@my-live-server2.example.com user123 $ cd /home/myproject/public_html user123 $ git pull --rebase Lot of work user123 $ git submodule init Erroneous user123 $ git submodule update user123 $ rm -rf Data/Temporary/Production user123 $ ./flow3 doctrine:migrate user123 $ ./flow3 cache:warmup
  • 31. Automated deployment A custom script? Rollback on errors? Distributed deployment?
  • 33. Deployment with Surf SSH Node Surf CI Server / Node Dev Host Git Repositories Git
  • 34. The Surf Model Deployment Environments Workflow Deployment Application Code / Artifacts Node Node Server
  • 35. Deployment process initialize Create release structure update Git update migrate Migration (e.g. Doctrine) Stages finalize Finalize release test Test release (smoke test) switch Publish release to live state cleanup Cleanup old releases
  • 36. INFO Deploying vagrant INFO Using workflow "Simple workflow" DEBUG ====== Stage initialize ====== DEBUG **** Node vagrant **** DEBUG * Application FLOW3 * DEBUG Executing stage "initialize" on "vagrant" for application FLOW3 DEBUG Execute task "typo3.surf:createdirectories" on "vagrant" for application "FLOW3" DEBUG $vagrant: "test -d /home/planetflow3/deploy" DEBUG $vagrant: "mkdir -p /home/planetflow3/deploy/releases;mkdir -p /home/planetflow3/deploy/shared;mkdir -p /home/planetflow3/deploy/releases/20120331105449;cd /home/planetflow3/deploy/ releases;ln -snf ./20120331105449 next" DEBUG Execute task "typo3.surf:flow3:createdirectories" on "vagrant" for application "FLOW3" DEBUG $vagrant: "mkdir -p /home/planetflow3/deploy/shared/Data/Logs;mkdir -p /home/planetflow3/deploy/shared/Data/Persistent;mkdir -p /home/planetflow3/deploy/shared/Configuration" DEBUG ====== Stage update ====== DEBUG **** Node vagrant **** DEBUG * Application FLOW3 * DEBUG Executing stage "update" on "vagrant" for application FLOW3 DEBUG Execute task "typo3.surf:gitcheckout" on "vagrant" for application "FLOW3" DEBUG $vagrant: "git ls-remote git://github.com/chlu/Planetflow3-Distribution.git refs/heads/master | awk '{print $1 }'" INFO > 7662553d5e666261a3a5bc2d6122096e7e21e40a DEBUG $vagrant: "if [ -d /home/planetflow3/deploy/cache/localgitclone ]; then cd /home/planetflow3/deploy/cache/localgitclone && git fetch -q origin && git reset -q --hard 7662553d5e666261a3a5bc2d6122096e7e21e40a && git submodule -q init && for mod in `git submodule status | awk '{ print $2 }'`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules --get submodule.${mod}.url` && echo synced $mod; done && git submodule -q sync && git submodule -q update && git clean -q -d -x -ff; else git clone -q git://github.com/chlu/Planetflow3- Distribution.git /home/planetflow3/deploy/cache/localgitclone && cd /home/planetflow3/deploy/cache/localgitclone && git checkout -q -b deploy 7662553d5e666261a3a5bc2d6122096e7e21e40a && git submodule -q init && git submodule -q sync && git submodule -q update; fi" INFO > synced Build/Common INFO > synced Packages/Application/Libtextcat INFO > synced Packages/Application/Planetflow3 INFO > synced Packages/Framework/Doctrine.Common INFO > synced Packages/Framework/Doctrine.DBAL INFO > synced Packages/Framework/Doctrine.ORM INFO > synced Packages/Framework/Symfony.Component.Yaml INFO > synced Packages/Framework/TYPO3.FLOW3 INFO > synced Packages/Framework/TYPO3.Fluid INFO > synced Packages/Framework/TYPO3.Party DEBUG $vagrant: "cp -RPp /home/planetflow3/deploy/cache/localgitclone/. /home/planetflow3/deploy/releases/20120331105449 && (echo 7662553d5e666261a3a5bc2d6122096e7e21e40a > /home/ planetflow3/deploy/releases/20120331105449REVISION)" DEBUG Task "typo3.surf:flow3:symlinkdata" after "typo3.surf:gitcheckout" for application FLOW3 DEBUG Execute task "typo3.surf:flow3:symlinkdata" on "vagrant" for application "FLOW3" DEBUG $vagrant: "mkdir -p /home/planetflow3/deploy/releases/20120331105449/Data;cd /home/planetflow3/deploy/releases/20120331105449;ln -sf ../../../shared/Data/Logs ./Data/Logs;ln -sf ../../../shared/ Data/Persistent ./Data/Persistent" DEBUG Task "typo3.surf:flow3:symlinkconfiguration" after "typo3.surf:gitcheckout" for application FLOW3 DEBUG Execute task "typo3.surf:flow3:symlinkconfiguration" on "vagrant" for application "FLOW3" DEBUG $vagrant: "cd /home/planetflow3/deploy/releases/20120331105449/Configuration;rm -f Production/*;rmdir Production;mkdir -p ../../../shared/Configuration/Production;ln -snf ../../../shared/ Configuration/Production Production" INFO > rmdir: failed to remove `Production': No such file or directory DEBUG ====== Stage migrate ====== DEBUG **** Node vagrant **** DEBUG * Application FLOW3 * DEBUG Executing stage "migrate" on "vagrant" for application FLOW3 DEBUG Execute task "typo3.surf:flow3:migrate" on "vagrant" for application "FLOW3" DEBUG $vagrant: "cd /home/planetflow3/deploy/releases/20120331105449 && FLOW3_CONTEXT=Production ./flow3 typo3.flow3:doctrine:migrate"
  • 37. Deployment structure < Document Root
  • 38. Deployment Features Clustered deployment Configuration overrides Smoke tests Custom tasks Flexible workflows