25
EASY MAGENTO SYNCHRONIZATION Presented by & Mage::day(2013); // Modena - 8 Novembre 2013 Alessandro Ronchi Roberto Gambuzzi

Mageploy presentato al Mage::day() 2013

Embed Size (px)

DESCRIPTION

Presentazione di Mageploy al Magento Day 2013, Modena 8 novembre 2013

Citation preview

  • 1. EASY MAGENTO SYNCHRONIZATION Presented by Alessandro Ronchi & Roberto Gambuzzi Mage::day(2013); // Modena - 8 Novembre 2013

2. CHI SIAMO Membri e Fondatori del PUG MoRe Magento Certified Developers Colleghi in @webgriffe 3. PERCH E COME NATO PROBLEMA Propagare modifiche in Admin Panel su diversi ambientiSOLUZIONI POSSIBILIA mano: time consuming, error prone, costoso Upgrade Script: time consuming, e conflitti su feature branch DB centralizzato: no offline, concorrenza spietata Selenium: selettori da correggere e non cross-platform MageFlow (?): "MageFlow Beta is launching in December" Mageploy: niente codice, distribuito, time-saving 4. COME FUNZIONA LIVE DEMO 5. COME FUNZIONA STATUS E RUN (GIT PULL SU ALTRO AMBIENTE) vgatpeie2/a/w/a10$gtpl arn@rcs3:vrwwmg80 i ul rmt:Cutn ojcs 2,dn. eoe onig bet: 7 oe rmt:Cmrsigojcs 10 (/) dn. eoe opesn bet: 0% 44, oe rmt:Ttl1 (et 3,rue 1 (et 3 eoe oa 4 dla ) esd 4 dla ) Upcigojcs 10 (41) dn. nakn bet: 0% 1/4, oe Fo gtu.o:u-oedm-aea21 rm ihbcmpgmr/eomgdy03 e542.e42 mse aa9.7439 atr - oii/atr > rgnmse Udtn e542.e42 paig aa9.7439 Fs-owr atfrad vrmgpo/aelyalcv a/aelymgpo_l.s 1flscagd 1isrin() ie hne, netos+|1+ 6. COME FUNZIONA STATUS vgatpeie2/a/w/a10$ppselmgpo.h arn@rcs3:vrwwmg80 h hl/aelypp s Mgpo v119-takn i atv -ue i rbro aely .. rcig s cie sr s oet PnigAtosls: edn cin it I:1 D -Sv nwMgzio'a-0'(rnh o MnOt2 0:25 21) ae e aazn mg01 aoci n o c 8 92:6 03 Ttlpnigatos 1 oa edn cin:RUN vgatpeie2/a/w/a10$ppselmgpo.h arn@rcs3:vrwwmg80 h hl/aelypp r Mgpo v119-takn i atv -ue i rbro aely .. rcig s cie sr s oet Ato I # -scesEeet cet cnsces cin D 1 ucs lmno rao o ucso Eeue atos 11 xctd cin: / 7. COME FUNZIONA PANNELLO DI ADMIN 8. COME FUNZIONA PANNELLO DI ADMIN (DELETE) 9. COME FUNZIONA PANNELLO DI ADMIN (COMMIT E PUSH DELLA DELETE) vgatpeie2/a/w/a10$gtsau arn@rcs3:vrwwmg80 i tts #O bac mse n rnh atr #Cagsntsae frcmi: hne o tgd o omt # # mdfe: vrmgpo/aelyalcv oiid a/aelymgpo_l.s # vgatpeie2/a/w/a10$gtcmi -m"lmnt mgzio arn@rcs3:vrwwmg80 i omt a Eiiao aazn" [atredb6 Eiiaomgzio mse de2] lmnt aazn 1fl cagd 1isrin+ ie hne, neto() vgatpeie2/a/w/a10$gtps arn@rcs3:vrwwmg80 i uh Cutn ojcs 9 dn. onig bet: , oe Dlacmrsinuigu t 2tras et opeso sn p o hed. Cmrsigojcs 10 (/) dn. opesn bet: 0% 33, oe Wiigojcs 10 (/) 40bts dn. rtn bet: 0% 55, 4 ye, oe Ttl5(et 2,rue 0(et 0 oa dla ) esd dla ) T gtgtu.o:u-oedm-aea21.i o i@ihbcmpgmr/eomgdy03gt 374f.de2 mse - mse 5db.edb6 atr > atr 10. COME FUNZIONA PANNELLO DI ADMIN (RICEZIONE DELLE DELETE DA PARTE PRIMO DEV) aesnr@oasi~NtenPoet/ae80 ppselmgpo.h lsadoKwlk:/eBasrjcsmg10$ h hl/aelypp s Mgpo v119-takn i atv -ue i aoci aely .. rcig s cie sr s rnh PnigAtosls: edn cin it I:2-Dlt eitn Mgzio'a-0'(oet o MnOt2 1:12 21) D eee xsig aazn mg01 rbro n o c 8 02:0 03 Ttlpnigatos 1 oa edn cin: aesnr@oasi~NtenPoet/ae80 ppselmgpo.h lsadoKwlk:/eBasrjcsmg10$ h hl/aelypp r Mgpo v119-takn i atv -ue i aoci aely .. rcig s cie sr s rnh Ato I # -scesEeet cnelt cnsces cin D 2 ucs lmno aclao o ucso Eeue atos 11 xctd cin: / 11. COME SVILUPPATO THE MAGENTO WAY Request Funnel: registra le invocazioni alle Action a cui associato un Tracker Tracker: implementa encoding e decoding dei parametri delle Action convertendo gli ID specifici di ogni ambiente in UUID UUID (Universally Unique Identifier): identifica univocamente le entit secondo una logica specifica; implementazione potenzialmente complessa che pu richiedere vincoli Config: un modulo pu aggiungere i propri Tracker dichiarandoli nel config.xml 12. COME SVILUPPATO 13. COME SVILUPPATO DICHIARAZIONE DI UN TRACKER NEL CONFIG.XML .. . dfut .. . atos eoMgdy03MdlMgpo_cinMgzii/ls> casDm_aea21_oe_aelyAto_aazn /eomgdy03 /aely .. . .. . /ofg 14. COME SVILUPPATO LA CLASSE CHE IMPLEMENTA IL TRACKER Estende PgoeMgpo_oe_cinAsrc uMR_aelyMdlAto_btat Implementazione minima per registrare le informazioni utili nel log utilizzando la funzione m t h )della classe ac( base eVrin2...ef:ESO; } 15. COME SVILUPPATO LA FUNZIONE MATCH() DELLA CLASSE BASE rqet>eMdlNm() h>o(Mdl ae s, ti-_eus-gtoueae); $-lg"otolrnm:%" $hs>rqet>eCnrleNm() h>o(Cnrle ae s, ti-_eus-gtotolrae); $-lg"cinnm:%" $hs>rqet>eAtoNm() h>o(Ato ae s, ti-_eus-gtcinae); $-lg"eus Prmtr:%" pitr$hs>rqet>ePrm(,tu); h>o(Rqet aaees s, rn_(ti-_eus-gtaas) re) rtr fle eun as; } 16. COME SVILUPPATO INFORMAZIONI NEL LOG DOPO UNA SAVE ACTION NEW DELETE 21-02T84:70:0DBG() 031-80:42+00 EU 7: Mdl nm:dma21 oue ae emg03 21-02T84:70:0DBG() 031-80:42+00 EU 7: Cnrle nm:amntlmgzi otolr ae dihm_aaz n i 21-02T84:70:0DBG() 031-80:42+00 EU 7: Ato nm:sv cin ae ae 21-02T84:70:0DBG() 031-80:42+00 EU 7: (RqetPrmtr:Ary eus aaees ra2E / )[e]= 1a1e6.595b4a ky > d237..11804 [omky = v1o5h58O fr_e] > 1MzRXU43 [oie = mg01 cdc] > a-0 [oe = MCne nm] > Betr [ain]= I nzoe > T [it]= Mdn cta > oea [a]= 410 cp > 10 [niiz]= vaeVrii,5 idrzo > il iglo [mi]= mg0@oegupog eal > a01mr.rs.r21-02T90:80:0DBG() 031-80:02+00 EU 7: Mdl nm:dma21 oue ae emg03 21-02T90:80:0DBG() 031-80:02+00 EU 7: Cnrle nm:amntlmgzi otolr ae dihm_aaz n i 21-02T90:80:0DBG() 031-80:02+00 EU 7: Ato nm:dlt cin ae eee 21-02T90:80:0DBG() 031-80:02+00 EU 7: RqetPrmtr:Ary eus aaees ra ( [d = 1 i] > [e]= f690.2c3a ky > 617..3e06 ) 17. COME SVILUPPATO CLASSE COMPLETA PER IL TRACKING DEI MAGAZZINI s Gtu u iHb 18. eVrin2 . ef:ESO; } pbi fnto mth) ulc ucin ac( { i ($hs>rqet { f !ti-_eus) rtr fle eun as; }i (ti-_eus-gtoueae)= 'emg03){ f $hs>rqet>eMdlNm( = dma21' i (ti-_eus-gtotolrae)= 'dihm_aazn' { f $hs>rqet>eCnrleNm( = amntlmgzii) i (nary$hs>rqet>eAtoNm(,ary'ae,'eee f i_ra(ti-_eus-gtcinae) ra(sv' dlt' rtr tu; eun re } } } }rtr fle eun as;pbi fnto ecd( ulc ucin noe) { 19. COME SVILUPPATO RISULTATO DEL TRACKING (CSV) cl:18927 o1 32516 cl:aoci o2 rnh cl:Sv nwMgzio'a-0' o3 ae e aazn mg01 cl:Dm_aea21_oe_aelyAto_aazn o4 eoMgdy03MdlMgpo_cinMgzii cl:Dm_aea21 o5 eoMgdy03 cl:amntlmgzii o6 dihm_aazn cl:sv o7 ae cl:oOtOYINZlZIc.t3lmyXwmyy7Q= o8 3nzj6mvGjS7..bJLddNL9ZIf= cl:111 o9 .. 20. CONFLITTI Scenario: due programmatori hanno creato un magazzino con lo stesso codice. Il primo ha gi fatto commit e push. Il secondo si ritrova nello stato seguente: aesnr@oasi~NtenPoet/ae80 gtpl lsadoKwlk:/eBasrjcsmg10$ i ul rmt:Cutn ojcs 9 dn. eoe onig bet: , oe rmt:Cmrsigojcs 10 (/) dn. eoe opesn bet: 0% 11, oe rmt:Ttl5(et 2,rue 5(et 2 eoe oa dla ) esd dla ) Upcigojcs 10 (/) dn. nakn bet: 0% 55, oe Fo gtu.o:u-oedm-aea21 rm ihbcmpgmr/eomgdy03 4809.8d1 mse 639.57ab atr - oii/atr > rgnmse At-egn vrmgpo/aelyalcv uomrig a/aelymgpo_l.s CNLC (otn) Mrecnlc i vrmgpo/aelyalcv OFIT cnet: eg ofit n a/aelymgpo_l.s Atmtcmrefie;fxcnlcsadte cmi tersl. uoai eg ald i ofit n hn omt h eut 21. CONFLITTI Cosa troveremo nel m g p o _ l . s ? aelyalcv57ab2237408f845fec5f >>> 8d11291323e35372160cCome si risolve? Parlandosi :-) Un conflitto di questo tipo il risultato di una mancata comunicazione; va risolto scegliendo l'azione da mantenere o eliminando entrambe e registrandone una nuova. 22. CONCLUSIONI AS-ISAttribute Tracker Category Tracker CMS Tracker Store System Config (sperimentale)TO BEPi Tracker possibili Controllo dei vincoli Test automatici 23. ?Q & (HOPEFULLY) A 24. GRAZIE! RIMANIAMO IN CONTATTO... Mageploy: mageploy.com Twitter: @aleron75 - @pug_more GitHub: github.com/aleron75 - github.com/pugmore Blog: www.magentocommunity.it PUG MoRe: http://more.grusp.org Magento Italia on G+