24
Inspiring people to share TYPO3 Developer Days - Eindhoven 2014 TYPO3 Surf Workshop T3DD14 TYPO3 Surf Helmut Hummel <[email protected]> 07.07.2013 Creating a Toolbox for TYPO3 CMS Deployment 1

TYPO3 Surf Introduction

Embed Size (px)

DESCRIPTION

A short introduction to TYPO3 Surf

Citation preview

Page 1: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

T3DD14 TYPO3 Surf

Helmut Hummel <[email protected]>

07.07.2013

Creating a Toolbox for TYPO3 CMS Deployment

1

Page 2: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

T3DD14 - TYPO3 Surf for TYPO3 CMS

Agenda• Introduction to TYPO3 Surf

• Hands on - Installing Surf and deploying your first App

• Required Workflows/ Tools for TYPO3 CMS Deployments

• Hands on - Working on (some) Workflows/ Tools

2

Page 3: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

Introduction to TYPO3 Surf

3

Page 4: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

Task Runner

4

Page 5: TYPO3 Surf Introduction

Node

Application

Node

Application

TYPO3 Surf Architecture

5

Deployment

Workflow Application

Node

StageTask

Stage

Stage

Task

Task

Task

Task

Task

Page 6: TYPO3 Surf Introduction

Node

Application

Node

Application

TYPO3 Surf Scenario

6

Deployment

Workflow customer.tld

Server1

Packagecheckout

Transfer

Switch

tar

rsync

mysql

cache

link

Page 7: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

Describe Deployment in PHP

7

Page 8: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop 8

<?php/** @var \TYPO3\Surf\Domain\Model\Deployment $deployment */$application = new \TYPO3\Surf\Domain\Model\Application('Demo');$node = new \TYPO3\Surf\Domain\Model\Node('Vhost1 on local system');$node->setHostname('localhost');$application->addNode($node);$workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow();$deployment->setWorkflow($workflow);"$deployment->addApplication($application);

Page 9: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

The Application adds Tasks to the Workflow

9

Page 10: TYPO3 Surf Introduction

TYPO3 Surf

Workflow Stages• Initialize

• Package

• Transfer

• Update

• Migrate

• Finalize

• Test

• Switch

• Cleanup10

Page 11: TYPO3 Surf Introduction

TYPO3 Surf

Stage Initialize• Create Directories (first time deploy)

11

Page 12: TYPO3 Surf Introduction

TYPO3 Surf

Stage Package• Create a packaged application locally

• All (static) assets

• Necessary database updates/ inserts

• Application code (from VCS)

• Tasks available for the following methods:

• git

12

Page 13: TYPO3 Surf Introduction

TYPO3 Surf

Stage Transfer• Transfer the application package to each node

• Tasks available for the following methods:

• git

• rsync

13

Page 14: TYPO3 Surf Introduction

TYPO3 Surf

Stage Update• „Update Application assets on the node“

• Tasks available: none

14

Page 15: TYPO3 Surf Introduction

TYPO3 Surf

Stage Migrate• Migration tasks

• Database migration

• Code migration?

• Tasks available: none (for TYPO3 CMS)

15

Page 16: TYPO3 Surf Introduction

TYPO3 Surf

Stage Finalize• Last steps before your app is ready to run

• Cache warmup

• …

• Tasks available: none (for TYPO3 CMS)

• VarnishBan

• VarnishPurge

16

Page 17: TYPO3 Surf Introduction

TYPO3 Surf

Stage Test• Test if your App would run like expected

• Smoke Tests

• Tasks available

• HttpTestTask

17

Page 18: TYPO3 Surf Introduction

TYPO3 Surf

Stage Switch• Switch from the old deployed state to the new

• Tasks available

• SymlinkReleaseTask

18

Page 19: TYPO3 Surf Introduction

TYPO3 Surf

Stage Cleanup• Remove temporary files needed for deployment

• Tasks available

• CleanupReleases

• (other publishing tasks like git tag or source forge upload)

19

Page 20: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

TYPO3 Surf is a toolbox

20

Page 21: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

Let’s add some more tools!

21

Page 22: TYPO3 Surf Introduction

Inspiring people toshare

TYPO3 Developer Days - Eindhoven 2014

TYPO3 Surf Workshop

Installing TYPO3 Surf

22

Page 23: TYPO3 Surf Introduction

23

$ composer create-project typo3-surf-cms/distribution TYPO3.Surf $ $ cd TYPO3.Surf $ ./flow surf:list

Page 24: TYPO3 Surf Introduction

Thank you!@helhum

[email protected]

24