Deploy com Drupal do Jeito Certo

Post on 02-Jul-2015

231 views 0 download

description

Palestra do Renato na DrupalPicchu 2014

Transcript of Deploy com Drupal do Jeito Certo

Deploy com

Drupalda maneira certa!

about.me/revagomes@revagomes

Sumário

Oqueédeploy?

Conceitosbásicos

Ferramentas

Processodedeploy

Exemplo

O que é deploy?

Instalar,testareimplementarumaaplicaçãoousistemadecomputador.

Apalavradeploytemraízemumtermomilitar,usadopara

descreveracolocaçãodeequipamentosetropasnocampode

batalha.

webopedia.com

Wikipediahttp://lb.cm/dploywiki

Continuous Deploymentin 5 steps

http://lb.cm/dploy5stpsEricRies-O'ReillyRadar

Deploy Contínuo em 5 passos

1. Continuousintegrationserver.(ServidordeIntegraçãocontínua)

2. Sourcecontrolcommitcheck.(Checagemdecommits)

3. Simpledeploymentscript.(Scriptdedeploysimples)

4. Real-timealerting.(Alertaemtemporeal)

5. Rootcauseanalysis(fivewhys)(Análisedaraízdoproblema(5porquês))

Ferramentas

Drush

ShellScript

Git

Tests(Cucumber/Watir/Gherkin,Selenium,CasperJS...)

CITool(Jenkins,Travis,CruiseControl,Buildbot...)

Por onde começar?

http://dltj.org/article/software-development-practice/

Ambiente de desenvolvimento

Local/DevIntegraçãoTest/QAHomolog/UATStagingProduction

Git Workflow

1. Centralizedworkflow2. Featurebranchworkflow3. Gitflowworkflow4. Forkingworkflow

https://www.atlassian.com/git/workflows

VincentDriessenhttp://nvie.com/posts/a-successful-git-branching-model

Git Flowhttps://github.com/nvie/gitflow

GitFlowCheatsheethttp://danielkummer.github.io/git-flow-cheatsheet/

Git hooks

pre-commit

post-receive

Drupal Code Quality

https://drupal.org/project/dcq

Instalaçãohttps://drupal.org/node/2067677

E como faço com asconfigurações?

Strongarm

https://drupal.org/project/strongarm

Features

https://drupal.org/project/featureshttps://drupal.org/documentation/modules/features

Drush Commands

features-components(fc)-Listfeaturescomponents.

features-diff(fd)-Showthedifferencebetweenthedefaultandoverriddenstateofafeature.

features-export(fe)-Exportafeaturefromyoursiteintoamodule.

features-list(fl,features)-Listalltheavailablefeaturesforyoursite.

features-revert(fr)-Revertafeaturemoduleonyoursite.

features-revert-all(fr-all,fra)-Revertallenabledfeaturemoduleonyoursite.

features-update(fu)-Updateafeaturemoduleonyoursite.

features-update-all(fu-all,fua)-Updateallfeaturemodulesonyoursite.

Configuration ManagementInitiative (CMI)

https://groups.drupal.org/build-systems-change-management/cmi

Configuration Management

http://drupal.org/project/configuration

Drush Commandsconfig-export(cexp)-Exportaconfigurationtothedatastore.

config-get-components(cgc)-Returnthelistofconfigurationscomponentsthatcanbeexported.

config-get-identifiers(cgi)-Returnthelistofidentifiersforagivencomponent.

config-get-non-tracked(cgnt)-Returnthelistofconfigurationscomponentsthatarenottracked.

config-get-tracked(cgt)-Returnthelistofconfigurationscomponentsthataretracked.

config-list(clist)-Returnthelistofcomponentsandidentifiers.

config-start-tracking(csta)-Starttrackingconfigurationchanges.

config-stop-tracking(csto)-Stoptrackingconfigurationchanges.

config-sync(csyn)-Synchronizeconfigurations

E como fazer deploy deConteúdo?

Deployhttps://drupal.org/project/deploy

Content Staging Initiative (CSI)https://groups.drupal.org/large-scale-drupal-lsd-projects-and-

plans/content-staging

SitePreviewSystem

InteractiveInformationBar

StateMachine

Collections