Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InspiringFlow13: Scalable Deployment Architectu...

InspiringFlow13: Scalable Deployment Architectures with TYPO3 Surf, Git and Jenkins

License: CC BY-SA

When developing and administrating large-scale distributed applications, deployment and change management becomes a new challenge. Modern version control systems like Git and Continuous Integration platforms like Jenkins or Hudson help automating this process, thus making it more efficient and less error-prone.

This talk aims at presenting how these tools can be used to coordinate deployment processes among large teams in distributed, mission-critical infrastructure systems, and how this process can be supported using build tools (like Apache Ant) and test automation. A special focus of the talk will be on possibilities to integrate the deployment software TYPO3 Surf into Git/Jenkins architectures.

Martin Helmich

April 20, 2013
Tweet

More Decks by Martin Helmich

Other Decks in Programming

Transcript

  1. martin@mybox:~ > ssh myserver.de martin@myserver:~ > cd my_app martin@myserver:~/my_app >

    git fetch origin martin@myserver:~/my_app > git reset --hard origin/master martin@myserver:~/my_app > git submodule update --init martin@myserver:~/my_app > ./flow doctrine:migrate martin@myserver:~/my_app > ./flow cache:flush Manual
  2. martin@mybox:~ > ssh myserver.de martin@myserver:~ > cd my_app martin@myserver:~/my_app >

    git fetch origin martin@myserver:~/my_app > git reset --hard origin/master martin@myserver:~/my_app > git submodule update --init martin@myserver:~/my_app > ./flow doctrine:migrate martin@myserver:~/my_app > ./flow cache:flush VERSION
  3. ├── cache │ └── localgitclone ├── releases │ ├── 20130324175345

    │ └── current -> ./20130324175345 └── shared BEFORE ├── cache │ └── localgitclone ├── releases │ ├── 20130324175345 │ ├── 20130329184503 │ ├── previous -> ./20130324175345 │ └── current -> ./20130329184503 └── shared AFTER TYPO3
  4. Use

  5. Use

  6. <?php /** @var $deployment \TYPO3\Surf\Domain\Model\Deployment */ $workflow = new TYPO3\Surf\Domain\Model\SimpleWorkflow();

    $application = new TYPO3\Surf\Application\BaseApplication('MyApplication'); // ... $deployment->setWorkflow($workflow); $deployment->addApplication($application); if (getenv('BUILD_TARGET') !== FALSE) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . getenv('BUILD_TARGET')); $node->setHostname(getenv('BUILD_TARGET')); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } else { foreach (array('www01','www02','www03') as $node) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . $node); $node->setHostname($node); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } }
  7. <?php /** @var $deployment \TYPO3\Surf\Domain\Model\Deployment */ $workflow = new TYPO3\Surf\Domain\Model\SimpleWorkflow();

    $application = new TYPO3\Surf\Application\BaseApplication('MyApplication'); // ... $deployment->setWorkflow($workflow); $deployment->addApplication($application); if (getenv('BUILD_TARGET') !== FALSE) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . getenv('BUILD_TARGET')); $node->setHostname(getenv('BUILD_TARGET')); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } else { foreach (array('www01','www02','www03') as $node) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . $node); $node->setHostname($node); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } }
  8. <?php /** @var $deployment \TYPO3\Surf\Domain\Model\Deployment */ $workflow = new TYPO3\Surf\Domain\Model\SimpleWorkflow();

    $application = new TYPO3\Surf\Application\BaseApplication('MyApplication'); // ... $deployment->setWorkflow($workflow); $deployment->addApplication($application); if (getenv('BUILD_TARGET') !== FALSE) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . getenv('BUILD_TARGET')); $node->setHostname(getenv('BUILD_TARGET')); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } else { foreach (array('www01','www02','www03') as $node) { $node = new TYPO3\Surf\Domain\Model\Node('node-' . $node); $node->setHostname($node); $node->setOptions(array( 'username' => 'surf' )); $application->addNode($node); } }
  9. Use

  10. Use

  11. Use

  12. GIT PRIMARY GIT 2NDARY GERRIT JENKINS MASTER-1 JENKINS MASTER-2 BUILD

    NODES BUILD NODES DEV DEV INT DEV DEV QA DEV DEV LIVE TYPO3 SURF TYPO3 SURF Deployment