Top Banner
Deploy com Drupal da maneira certa!
28

Deploy com Drupal do Jeito Certo

Jul 02, 2015

Download

Technology

Taller

Palestra do Renato na DrupalPicchu 2014
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Deploy com Drupal do Jeito Certo

Deploy com

Drupalda maneira certa!

Page 2: Deploy com Drupal do Jeito Certo

about.me/revagomes@revagomes

Page 3: Deploy com Drupal do Jeito Certo
Page 4: Deploy com Drupal do Jeito Certo

Sumário

Oqueédeploy?

Conceitosbásicos

Ferramentas

Processodedeploy

Exemplo

Page 5: Deploy com Drupal do Jeito Certo

O que é deploy?

Instalar,testareimplementarumaaplicaçãoousistemadecomputador.

Apalavradeploytemraízemumtermomilitar,usadopara

descreveracolocaçãodeequipamentosetropasnocampode

batalha.

webopedia.com

Wikipediahttp://lb.cm/dploywiki

Page 6: Deploy com Drupal do Jeito Certo

Continuous Deploymentin 5 steps

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

Page 7: Deploy com Drupal do Jeito Certo

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))

Page 8: Deploy com Drupal do Jeito Certo

Ferramentas

Drush

ShellScript

Git

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

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

Page 9: Deploy com Drupal do Jeito Certo

Por onde começar?

Page 10: Deploy com Drupal do Jeito Certo

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

Ambiente de desenvolvimento

Local/DevIntegraçãoTest/QAHomolog/UATStagingProduction

Page 11: Deploy com Drupal do Jeito Certo
Page 12: Deploy com Drupal do Jeito Certo

Git Workflow

1. Centralizedworkflow2. Featurebranchworkflow3. Gitflowworkflow4. Forkingworkflow

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

Page 13: Deploy com Drupal do Jeito Certo

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

Page 14: Deploy com Drupal do Jeito Certo

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

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

Page 15: Deploy com Drupal do Jeito Certo

Git hooks

Page 16: Deploy com Drupal do Jeito Certo

pre-commit

Page 17: Deploy com Drupal do Jeito Certo

post-receive

Page 18: Deploy com Drupal do Jeito Certo

Drupal Code Quality

https://drupal.org/project/dcq

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

Page 19: Deploy com Drupal do Jeito Certo

E como faço com asconfigurações?

Page 20: Deploy com Drupal do Jeito Certo

Strongarm

https://drupal.org/project/strongarm

Page 21: Deploy com Drupal do Jeito Certo

Features

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

Page 22: Deploy com Drupal do Jeito Certo

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.

Page 23: Deploy com Drupal do Jeito Certo

Configuration ManagementInitiative (CMI)

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

Page 24: Deploy com Drupal do Jeito Certo

Configuration Management

http://drupal.org/project/configuration

Page 25: Deploy com Drupal do Jeito Certo

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

Page 26: Deploy com Drupal do Jeito Certo

E como fazer deploy deConteúdo?

Page 27: Deploy com Drupal do Jeito Certo

Deployhttps://drupal.org/project/deploy

Page 28: Deploy com Drupal do Jeito Certo

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

plans/content-staging

SitePreviewSystem

InteractiveInformationBar

StateMachine

Collections