Slide 1

Slide 1 text

8FCΞϓϦͷ
 σϓϩΠࠓੲ෺ޠ 1)1$POGFSFODF+BQBOc IUUQTKPJOEJO

Slide 2

Slide 2 text

ळࢁݦ࣏ ,FOKJ"LJZBNB גࣜձࣾϋ΢ςϨϏδϣϯ ΤϯδχΞ ! !BSUJGBDUTBVDF !BSUJGBDUTBVDF ,FOKJ"LJZBNB ! ؾ͕͚ͭ͹ࡀ

Slide 3

Slide 3 text

֎ࢿब׆υοτίϜ w ৽ଔ޲͚ٻਓϝσΟΞ w ೥ϦϦʔε w ౦େʗܚԠେͷब׆ੜͷ൒ ਺͕ձһొ࿥͍ͯ͠Δ w 8PSE1SFTTͱ$BLF1)1Ͱ Ͱ͖͍ͯΔ

Slide 4

Slide 4 text

εΩϧηοτ

Slide 5

Slide 5 text

࠷ۙ͸

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

࢓ࣄ΋ϓϥΠϕʔτ΋ ஍ຯͳ໾ׂ͕େ޷͖

Slide 9

Slide 9 text

ҎલͷΩϟϦΞ ཧֶ̋ݚڀॴʹ೥΄Ͳ ! w όΠΦΠϯϑΥϚςΟΫε w ੜ෺σʔλͷղੳ w σʔλϕʔεߏங w 8FCΞϓϦ։ൃ

Slide 10

Slide 10 text

ࠓճͷझࢫ ‣ ओʹதখن໛8FCΞϓϦΛ։ൃ͖ͯͨ͠ ਓͷࢹ఺Ͱɺ8FCΞϓϦͷσϓϩΠʹ· ͭΘΔྺ࢙ΛৼΓฦΓͳ͕Βɺͳͥࠓɺ͜ ͷΑ͏ͳܗʹͳ͍ͬͯΔͷ͔ʁ͜Ε͔ΒͲ ͷΑ͏ʹͳΔͷ͔ʁΛߟ͑Δɻ ‣ ࣗ୐αʔόʔ೿΍σʔληϯλʔར༻೿ͳ Ͳ͸·ͨผͷྺ࢙ΛาΜͰ͍·͢ͷͰɺࠓ ճͷࢹ఺͔Β͸ζϨͯ͘Δͱࢥ͍·͢ɻ

Slide 11

Slide 11 text

஫ҙ ‣ ͓͓Αͦͷ࣌୅ͷྲྀΕΛ͔ͭΉ͜ͱ͕໨త Ͱ͋Γɺݫີͳ΋ͷͰ͸͋Γ·ͤΜɻ ‣ ࡉ͔͍͜ͱ͸ؾʹ͠ͳ͍ͰɺβΝʔͬͱฉ ͍͍ͯͩ͘͞ɻ

Slide 12

Slide 12 text

ର৅ͱ͍ͯ͠Δਓ ‣ 8FCΞϓϦ։ൃͷॳ৺ऀ ‣ σϓϩΠπʔϧΛ࢖͍࢝Ίͨ͹͔Γͷਓ ‣ σϓϩΠπʔϧΛ࢖͍ͬͯΔ͚Ͳɺ࢖͍࢝ ΊΔલͷ͜ͱΛ஌Βͳ͍ਓ

Slide 13

Slide 13 text

–Wikipedia ιϑτ΢ΣΞσϓϩΠϝϯτʢӳ4PGUXBSF EFQMPZNFOUʣͱ͸ɺιϑτ΢ΣΞγεςϜΛར ༻Մೳʹ͢Δ׆ಈશൠΛࢦ͢༻ޠͰ͋Δɻσϓϩ Πϝϯτʢ%FQMPZNFOUʣͱ͸ʮల։ɺ഑උɺ഑ ஔʯͳͲͷҙɻ

Slide 14

Slide 14 text

8FCΞϓϦͷσϓϩΠͷྺ࢙ ‣ Ϩϯαό࣌୅ ‣ 714࣌୅ ‣ 1BB4࣌୅ ‣ *BB4࣌୅

Slide 15

Slide 15 text

Ϩϯαό ‣ Ϩϯλϧαʔόʔͷུ ‣ ϗεςΟϯάαʔόʔ·ͨ͸ڞ༻αʔόʔͱ΋ ݺ͹ΕΔ ‣ ෳ਺ͷར༻ऀʹσΟεΫεϖʔεΛି͠ग़͢αʔ Ϗε ‣ Ϧιʔεʢ$16.FNͳͲʣ͸ར༻ऀͰڞ༗ ͢Δ ‣ $(*44*͕ಈ͔ͤΔʢ΋ͷ΋͋Δʣ

Slide 16

Slide 16 text

Ϩϯαό࣌୅ ‣ ೥୆ޙ൒͔Β೥ॳ಄͔ʁ ‣ Ϩϯλϧαʔόʔ͘Β͍͔͠બ୒ࢶ͕ແ͔ͬ ͨ࣌୅ʢٕज़తʹ΋ۚમతʹ΋ʣ ‣ தখن໛ͷαʔϏεʹ͸઎༗αʔόʔͳΜ ͯख͕ग़ͳ͍ɻ

Slide 17

Slide 17 text

͜ͷ࣌୅ ‣ 1FSMʢ೥ʣ ‣ $(*"QQMJDBUJPOʢ೥ʣ ‣ 1)1ʢ೥ʣ ‣ 8JOEPXTʢ೥ʣ ‣ 4VCWFSTJPOʢ೥ʣ

Slide 18

Slide 18 text

Ϩϯαόʹ͓͚ΔσϓϩΠ ‣ ओྲྀ͸8JOEPXTΫϥΠΞϯτ͔Βͷ'51 Ξοϓϩʔυ ‣ αʔόʔઃఆʹख͕ग़ͤͳ͍ͨΊɺ௨৴ख ஈͷબ୒ࢶ͕'51Ҏ֎ʹແ͍ɻ

Slide 19

Slide 19 text

Ϩϯαόʹ͓͚ΔσϓϩΠͷ໰୊఺ ‣ '51ͳͷͰηΩϡϦςΟ͕؁͍ ‣ ҉߸Խ͞Ε͍ͯͳ͍ύεϫʔυ͕ωοτ ϫʔΫʹྲྀΕΔɻ ‣ ڞ௨ΞΧ΢ϯτͰίϯςϯπ؅ཧ ‣ ΞΧ΢ϯτ͕Θ͔Ε͹ԿͰ΋Ͱ͖Δɻ

Slide 20

Slide 20 text

ΞϓϦͷංେԽ ‣ ංେԽ͢Δ8FCΞϓϦͷॲཧ଎౓Λվળ ͠Α͏ͱ͍͏ࢼΈ͕ਐΉɻ ‣ NPE@QFSMʢ೥ʣ ‣ 'BTU$(*ʢ೥ʣ

Slide 21

Slide 21 text

ΞϓϦͷංେԽ ‣ ංେԽ͢Δ8FCΞϓϦͷॲཧ଎౓Λվળ ͠Α͏ͱ͍͏ࢼΈ͕ਐΉɻ ‣ NPE@QFSMʢ೥ʣ ‣ 'BTU$(*ʢ೥ʣ ϨϯαόͰ͸͜ΕΒͷٕज़Λར༻Ͱ͖ͳ͍

Slide 22

Slide 22 text

714࣌୅ ‣ 7JSUVBM1SJWBUF4FSWFS ‣ ෺ཧίϯϐϡʔλʔ্ͰԾ૝తʹίϯ ϐϡʔλʔΛෳ਺ىಈ͢Δٕज़Λ༻͍ͯ ࡞ΒΕͨԾ૝తͳίϯϐϡʔλʔ ‣ 7.8BSF 'SFF#4%KBJM 7JSUVP[[P 9FO 8JOEPXT4FSWFS 4PMBSJT$POUBJOFS ,7.

Slide 23

Slide 23 text

͜ͷ࣌୅ ‣ ೥ॳ಄͔Β೥୆લ൒ ‣ σεΫτοϓ-JOVY͕࢖͑Δ΋ͷʹͳͬͯ ͖ͨɻ ‣ 1FSMʢ೥ʣ ‣ 1)1ʢ೥ʣ ‣ 3VCZPO3BJMTॳެ։ʢ೥ʣ

Slide 24

Slide 24 text

714ͷϝϦοτ ‣ Ϧιʔεʢ$16.FN)%%ͳͲʣҎ֎͸ ࣗ༝ʹͰ͖Δɻ ‣ ϛυϧ΢ΣΞ΍ϓϩάϥϛϯάݴޠͳͲ ‣ ΞΧ΢ϯτ؅ཧ ‣ ௨৴ํ๏΋44)Λ࢖͑ΔΑ͏ʹͳͬͨ ‣ 0QFO44)ͷීٴ͸೥͔Β

Slide 25

Slide 25 text

714ʹ͓͚ΔσϓϩΠ ‣ -JOVYΫϥΠΞϯτ͔ΒͷSTZOD ‣ ίϚϯυϥΠϯ͔Β44)Λ௨ͯ͠ΞΫη ε͢Δ ‣ ϦϞʔταʔόʔͱϑΝΠϧಉظΛͱΔ

Slide 26

Slide 26 text

͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 27

Slide 27 text

ͦΜͳΘ͚ͳ͍ ͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 28

Slide 28 text

ΞϓϦͷߏ੒ͷෳࡶԽ ‣ ϓϩηεͷӬଓԽ ‣ ੩తϑΝΠϧ͚ͩ͸ผαʔόʔ ‣ +BWBTDSJQUͷ೉ಡԽʗ࠷খԽ ‣ Ωϟογϡͷอ࣋

Slide 29

Slide 29 text

ෳࡶԽ΁ͷରॲ ‣ εΫϦϓτΛॻ͍ͨ͆ ‣ ൿ఻ͷλϨ͕׬੒

Slide 30

Slide 30 text

σϓϩΠπʔϧͷ஀ੜ ‣ $BQJTUSBOP ‣ ೥ʹ4XJUDI5PXFS͔Βվ໊ ‣ ։ൃ౰ॳ͸4IFMM4DSJQU ‣ 3VCZͰॻ͖௚͞ΕΔ ‣ ݱࡏͷόʔδϣϯ͸

Slide 31

Slide 31 text

$BQJTUSBOP ‣ ෳ਺ͷαʔόʔ্ͰεΫϦϓτΛ࣮ߦ͢Δ ͨΊͷΦʔϓϯιʔεͷπʔϧ ‣ ͭҎ্ͷ8FCαʔό্ͷΞϓϦέʔγϣ ϯΛ৽͍͠όʔδϣϯʹ͢Δ࡞ۀΛࣗಈԽ

Slide 32

Slide 32 text

$BQJTUSBOPEFQMPZ Current "QQ4FSWFS (JU4FSWFS σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 33

Slide 33 text

$BQJTUSBOPEFQMPZ Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 34

Slide 34 text

$BQJTUSBOPEFQMPZ Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 35

Slide 35 text

$BQJTUSBOPEFQMPZ Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 36

Slide 36 text

$BQJTUSBOPEFQMPZ New Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 37

Slide 37 text

$BQJTUSBOPEFQMPZ New Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 38

Slide 38 text

$BQJTUSBOPEFQMPZ New Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 39

Slide 39 text

$BQJTUSBOPEFQMPZ New Current "QQ4FSWFS (JU4FSWFS $ cap production deploy σϑΥϧτͰ༻ҙ͞Ε͍ͯΔEFQMPZλεΫ

Slide 40

Slide 40 text

EFQMPZUBTL ‣ EFQMPZTUBSUJOH ‣ EFQMPZDIFDL ‣ HJUDIFDL ‣ EFQMPZDIFDLEJSFDUPSJFT ‣ EFQMPZDIFDLMJOLFE@EJST ‣ EFQMPZDIFDLNBLF@MJOLFE@EJST ‣ EFQMPZDIFDLMJOLFE@pMFT ‣ EFQMPZTUBSUFE ‣ EFQMPZVQEBUJOH ‣ HJUDSFBUF@SFMFBTF ‣ EFQMPZTZNMJOLTIBSFE ‣ EFQMPZTZNMJOLMJOLFE@pMFT ‣ EFQMPZTZNMJOLMJOLFE@EJST ‣ EFQMPZVQEBUFE ‣ EFQMPZQVCMJTIJOH ‣ EFQMPZTZNMJOLSFMFBTF ‣ EFQMPZQVCMJTIFE ‣ EFQMPZpOJTIJOH ‣ EFQMPZDMFBOVQ ‣ EFQMPZpOJTIFE $BQJTUSBOPͷσϓϩΠϑϨʔϜϫʔΫͷ࢖͍ํ աڈܗͰه͞Ε͍ͯΔλεΫ͸ۭͷλεΫ ͳͷͰ͜ΕΒΛඞཁʹԠ্ͯ͡ॻ͖͢Δ

Slide 41

Slide 41 text

جຊํ਑ ‣ σϑΥϧτʹدͤͯΈΔ

Slide 42

Slide 42 text

͔ͭͯͷσϓϩΠखॱ (JUͷ։ൃϒϥϯν͔ΒANBTUFSAϒϥϯν΁Ϛʔδ͢Δ ࡞ۀͷ։࢝Λ4MBDLͰશһʹ௨஌͢Δ લճͷσϓϩΠ͔Βมߋͷ͋ͬͨϑΝΠϧ͚ͩΛαʔόʔʹίϐʔ͢Δ ݱߦόʔδϣϯͷσΟϨΫτϦΛ৽ͨͳόʔδϣϯ໊Λ෇͚ͯίϐʔ͢ Δ αʔόʔʹίϐʔͨ͠ϑΝΠϧͰ৽όʔδϣϯσΟϨΫτϦͷϑΝΠϧ Λ্ॻ͖͢Δ ݱߦόʔδϣϯͷσΟϨΫτϦΛࢦ͢4ZNMJOLΛɺ৽όʔδϣϯσΟϨ ΫτϦΛࢦ͢Α͏ʹ࡞੒͠௚͢ $BDIFϑΝΠϧΛ࡟আ͢Δ QIQGQNΛ࠶ىಈ͢Δ ࡞ۀͷऴྃΛ4MBDLͰશһʹ௨஌͢Δ

Slide 43

Slide 43 text

͔ͭͯͷσϓϩΠखॱ # local ! $ git checkout master $ git pull $ git merge DEV_BRANCH $ PAGER=cat git diff --name-status LAST_TAG CRRT_TAG \ > > file_diff.txt $ grep '^D' file_diff.txt > file_del.txt $ grep -v '^D' file_diff.txt > file_mod.txt $ grep '\w\s*wordpress' file_diff.txt > file_wdp.txt $ perl -i -ple '/\.scss$/ \ > && s/(sass|scss$)/css/g’ file_mod.txt $ bundle exec compass compile $ mkdir -p DEST_DIR $ perl -ple 's/^\w\s+//' file_mod.txt \ > | xargs -I% rsync -R % DEST_DIR $ cp file_del.txt DEST_DIR $ scp -r DEST_DIR REMOTE_HOST:~/DEST_DIR ! # remote ! $ cd DEPLOY_TO $ sudo -u DEPLOY_USER cp -apr LAST_TAG CRRT_TAG $ sudo -u DEPLOY_USER rsync -av DEST_DIR DEPLOY_TO/ \ > CRRT_TAG $ cd DEPLOY_TO/CRRT_TAG $ perl -ple 's/^D\s+//' file_del.txt | xargs rm $ sudo -u DEPLOY_USER ln -snf DEPLOY_TO/CRRT_TAG WEB_ROOT $ sudo find CAKE1_APP_CACHE -type f -exec rm {} \; $ sudo find CAKE2_APP_CACHE -type f -name 'empty' -prune \ > -o -type f -exec rm {} \; $ sudo service php5-fpm restart

Slide 44

Slide 44 text

ࣗಈԽͷԸܙ # local ! $ git checkout master $ git pull $ git merge DEV_BRANCH $ PAGER=cat git diff --name-status LAST_TAG CRRT_TAG \ > > file_diff.txt $ grep '^D' file_diff.txt > file_del.txt $ grep -v '^D' file_diff.txt > file_mod.txt $ grep '\w\s*wordpress' file_diff.txt > file_wdp.txt $ perl -i -ple '/\.scss$/ \ > && s/(sass|scss$)/css/g’ file_mod.txt $ bundle exec compass compile $ mkdir -p DEST_DIR $ perl -ple 's/^\w\s+//' file_mod.txt \ > | xargs -I% rsync -R % DEST_DIR $ cp file_del.txt DEST_DIR $ scp -r DEST_DIR REMOTE_HOST:~/DEST_DIR ! # remote ! $ cd DEPLOY_TO $ sudo -u DEPLOY_USER cp -apr LAST_TAG CRRT_TAG $ sudo -u DEPLOY_USER rsync -av DEST_DIR DEPLOY_TO/ \ > CRRT_TAG $ cd DEPLOY_TO/CRRT_TAG $ perl -ple 's/^D\s+//' file_del.txt | xargs rm $ sudo -u DEPLOY_USER ln -snf DEPLOY_TO/CRRT_TAG WEB_ROOT $ sudo find CAKE1_APP_CACHE -type f -exec rm {} \; $ sudo find CAKE2_APP_CACHE -type f -name 'empty' -prune \ > -o -type f -exec rm {} \; $ sudo service php5-fpm restart

Slide 45

Slide 45 text

ࣗಈԽͷԸܙ # local ! $ git checkout master $ git pull $ git merge DEV_BRANCH $ PAGER=cat git diff --name-status LAST_TAG CRRT_TAG \ > > file_diff.txt $ grep '^D' file_diff.txt > file_del.txt $ grep -v '^D' file_diff.txt > file_mod.txt $ grep '\w\s*wordpress' file_diff.txt > file_wdp.txt $ perl -i -ple '/\.scss$/ \ > && s/(sass|scss$)/css/g’ file_mod.txt $ bundle exec compass compile $ mkdir -p DEST_DIR $ perl -ple 's/^\w\s+//' file_mod.txt \ > | xargs -I% rsync -R % DEST_DIR $ cp file_del.txt DEST_DIR $ scp -r DEST_DIR REMOTE_HOST:~/DEST_DIR ! # remote ! $ cd DEPLOY_TO $ sudo -u DEPLOY_USER cp -apr LAST_TAG CRRT_TAG $ sudo -u DEPLOY_USER rsync -av DEST_DIR DEPLOY_TO/ \ > CRRT_TAG $ cd DEPLOY_TO/CRRT_TAG $ perl -ple 's/^D\s+//' file_del.txt | xargs rm $ sudo -u DEPLOY_USER ln -snf DEPLOY_TO/CRRT_TAG WEB_ROOT $ sudo find CAKE1_APP_CACHE -type f -exec rm {} \; $ sudo find CAKE2_APP_CACHE -type f -name 'empty' -prune \ > -o -type f -exec rm {} \; $ sudo service php5-fpm restart # local ! $ cap production deploy

Slide 46

Slide 46 text

ࣗಈԽͷԸܙ # local ! $ git checkout master $ git pull $ git merge DEV_BRANCH $ PAGER=cat git diff --name-status LAST_TAG CRRT_TAG \ > > file_diff.txt $ grep '^D' file_diff.txt > file_del.txt $ grep -v '^D' file_diff.txt > file_mod.txt $ grep '\w\s*wordpress' file_diff.txt > file_wdp.txt $ perl -i -ple '/\.scss$/ \ > && s/(sass|scss$)/css/g’ file_mod.txt $ bundle exec compass compile $ mkdir -p DEST_DIR $ perl -ple 's/^\w\s+//' file_mod.txt \ > | xargs -I% rsync -R % DEST_DIR $ cp file_del.txt DEST_DIR $ scp -r DEST_DIR REMOTE_HOST:~/DEST_DIR ! # remote ! $ cd DEPLOY_TO $ sudo -u DEPLOY_USER cp -apr LAST_TAG CRRT_TAG $ sudo -u DEPLOY_USER rsync -av DEST_DIR DEPLOY_TO/ \ > CRRT_TAG $ cd DEPLOY_TO/CRRT_TAG $ perl -ple 's/^D\s+//' file_del.txt | xargs rm $ sudo -u DEPLOY_USER ln -snf DEPLOY_TO/CRRT_TAG WEB_ROOT $ sudo find CAKE1_APP_CACHE -type f -exec rm {} \; $ sudo find CAKE2_APP_CACHE -type f -name 'empty' -prune \ > -o -type f -exec rm {} \; $ sudo service php5-fpm restart # local ! $ cap production deploy UBLFOCZXJFENBJFS

Slide 47

Slide 47 text

ࣗಈԽͷԸܙ ࣌ؒ UBLFOCZIJQQPOPUJ[FE

Slide 48

Slide 48 text

ࣗಈԽͷԸܙ ࣌ؒ UBLFOCZIJQQPOPUJ[FE ෼ UBLFOCZQIPUPOT

Slide 49

Slide 49 text

ࣗಈԽͷԸܙ ࣌ؒ UBLFOCZIJQQPOPUJ[FE ෼ UBLFOCZQIPUPOT ഒ

Slide 50

Slide 50 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end

Slide 51

Slide 51 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end $BLF1)1ϥΠϒϥϦ΁ ϦϯΫΛுΔ

Slide 52

Slide 52 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end $BLF1)1ϥΠϒϥϦ΁ ϦϯΫΛுΔ DPNQPTFSͰϓϥάΠϯ ΛΠϯετʔϧ͢Δ

Slide 53

Slide 53 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end $BLF1)1ϥΠϒϥϦ΁ ϦϯΫΛுΔ DPNQPTFSͰϓϥάΠϯ ΛΠϯετʔϧ͢Δ σʔλϕʔεϚΠάϨʔ γϣϯΛ࣮ߦ͢Δ

Slide 54

Slide 54 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end $BLF1)1ϥΠϒϥϦ΁ ϦϯΫΛுΔ DPNQPTFSͰϓϥάΠϯ ΛΠϯετʔϧ͢Δ DPNQBTTͰTBTTϑΝΠϧ ΛίϯύΠϧ͢Δ σʔλϕʔεϚΠάϨʔ γϣϯΛ࣮ߦ͢Δ

Slide 55

Slide 55 text

ͲΜͳίʔυʁ task :updated do on roles(:app) do ["cakephp1","cakephp2"].each do |cake_dir| ["cake", "lib", "index.php", "plugins", "vendors"].each do |part_dir| part_path = fetch(:deploy_to) + '/' + cake_dir + '/' + part_dir if test "[ -e #{part_path} ]" then execute :ln, '-snf', part_path, "#{fetch(:release_path)}/#{cake_dir}/#{part_dir}" end end end ! within "#{fetch(:release_path)}/cakephp2/app" do composer_path = "#{fetch(:release_path)}/cakephp2/app/composer.phar" if test "[ -f #{composer_path} ]" then execute "./composer.phar", 'install' end ! if fetch(:run_migration) then execute '../lib/Cake/Console/cake', 'Migrations.migration', 'run', 'all' end end ! if fetch(:sass_compile_path) then within "#{fetch(:release_path)}/#{fetch(:sass_compile_path)}" do execute :compass, 'compile', '--boring' end end ! end end $BLF1)1ϥΠϒϥϦ΁ ϦϯΫΛுΔ DPNQPTFSͰϓϥάΠϯ ΛΠϯετʔϧ͢Δ DPNQBTTͰTBTTϑΝΠϧ ΛίϯύΠϧ͢Δ σʔλϕʔεϚΠάϨʔ γϣϯΛ࣮ߦ͢Δ ΞϓϦέʔγϣϯಛҟతͳλεΫΛ௥ ه͍ͯ͘͠

Slide 56

Slide 56 text

ͲΜͳίʔυʁ task :restart do on roles(:app, :wp) do execute :sudo, :service, 'php5-fpm', 'restart' end end ! after :publishing, :restart ! before :restart, :clear_cache do on roles(:app) do if fetch(:app_cache1_path) then execute :sudo, :find, fetch(:app_cache1_path), '-type f -exec rm {} \;' end if fetch(:app_cache2_path) then execute :sudo, :find, fetch(:app_cache2_path), '-type f -name "empty" -prune -o -type f -exec rm {} \;' end end end

Slide 57

Slide 57 text

ͲΜͳίʔυʁ task :restart do on roles(:app, :wp) do execute :sudo, :service, 'php5-fpm', 'restart' end end ! after :publishing, :restart ! before :restart, :clear_cache do on roles(:app) do if fetch(:app_cache1_path) then execute :sudo, :find, fetch(:app_cache1_path), '-type f -exec rm {} \;' end if fetch(:app_cache2_path) then execute :sudo, :find, fetch(:app_cache2_path), '-type f -name "empty" -prune -o -type f -exec rm {} \;' end end end QIQGQNΛϦελʔτ͢Δ

Slide 58

Slide 58 text

ͲΜͳίʔυʁ task :restart do on roles(:app, :wp) do execute :sudo, :service, 'php5-fpm', 'restart' end end ! after :publishing, :restart ! before :restart, :clear_cache do on roles(:app) do if fetch(:app_cache1_path) then execute :sudo, :find, fetch(:app_cache1_path), '-type f -exec rm {} \;' end if fetch(:app_cache2_path) then execute :sudo, :find, fetch(:app_cache2_path), '-type f -name "empty" -prune -o -type f -exec rm {} \;' end end end QIQGQNΛϦελʔτ͢Δ QVCMJTIJOHλεΫͷޙ ʹ࣮ߦͯ͠Ͷὑ

Slide 59

Slide 59 text

ͲΜͳίʔυʁ task :restart do on roles(:app, :wp) do execute :sudo, :service, 'php5-fpm', 'restart' end end ! after :publishing, :restart ! before :restart, :clear_cache do on roles(:app) do if fetch(:app_cache1_path) then execute :sudo, :find, fetch(:app_cache1_path), '-type f -exec rm {} \;' end if fetch(:app_cache2_path) then execute :sudo, :find, fetch(:app_cache2_path), '-type f -name "empty" -prune -o -type f -exec rm {} \;' end end end QIQGQNΛϦελʔτ͢Δ QVCMJTIJOHλεΫͷޙ ʹ࣮ߦͯ͠Ͷὑ Ϧελʔτ͢ΔલʹΩϟο γϡΛফ͠ͱ͍ͯͶὑ

Slide 60

Slide 60 text

ͲΜͳίʔυʁ task :restart do on roles(:app, :wp) do execute :sudo, :service, 'php5-fpm', 'restart' end end ! after :publishing, :restart ! before :restart, :clear_cache do on roles(:app) do if fetch(:app_cache1_path) then execute :sudo, :find, fetch(:app_cache1_path), '-type f -exec rm {} \;' end if fetch(:app_cache2_path) then execute :sudo, :find, fetch(:app_cache2_path), '-type f -name "empty" -prune -o -type f -exec rm {} \;' end end end QIQGQNΛϦελʔτ͢Δ QVCMJTIJOHλεΫͷޙ ʹ࣮ߦͯ͠Ͷὑ Ϧελʔτ͢ΔલʹΩϟο γϡΛফ͠ͱ͍ͯͶὑ طଘͷλεΫͷલޙʹ೚ҙͷλεΫΛ )PPL͢Δ

Slide 61

Slide 61 text

ͲΜͳίʔυʁ namespace :notify do namespace :update do task :start do _send_message("[\`#{fetch(:application)}\`] Deployment has started.") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Deployment has finished. :ok_woman:\n> #{fetch(:commit_message)}") end end ! namespace :rollback do task :start do _send_message("[\`#{fetch(:application)}\`] Rollback has started.\nCurrent Revision is \`#{fetch(:latest_revision)}\`") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Rollback has finished. :ok_woman:\nCurrent revision is \`#{fetch(:current_revision)}\`") end end end ! before 'deploy:starting', 'notify:update:start' after 'deploy:finishing', 'notify:update:finish' before 'deploy:reverting', 'notify:rollback:start' after 'deploy:finishing_rollback', 'notify:rollback:finish' $BQJTUSBOPʹΑΔσϓϩΠͷ࣮ߦ࣌ʹ4MBDL௨஌͢Δํ๏

Slide 62

Slide 62 text

ͲΜͳίʔυʁ namespace :notify do namespace :update do task :start do _send_message("[\`#{fetch(:application)}\`] Deployment has started.") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Deployment has finished. :ok_woman:\n> #{fetch(:commit_message)}") end end ! namespace :rollback do task :start do _send_message("[\`#{fetch(:application)}\`] Rollback has started.\nCurrent Revision is \`#{fetch(:latest_revision)}\`") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Rollback has finished. :ok_woman:\nCurrent revision is \`#{fetch(:current_revision)}\`") end end end ! before 'deploy:starting', 'notify:update:start' after 'deploy:finishing', 'notify:update:finish' before 'deploy:reverting', 'notify:rollback:start' after 'deploy:finishing_rollback', 'notify:rollback:finish' σϓϩΠ΍ϩʔϧόοΫͷ։࢝ऴྃ ͷલޙʹ௨஌ΛૹΔ $BQJTUSBOPʹΑΔσϓϩΠͷ࣮ߦ࣌ʹ4MBDL௨஌͢Δํ๏

Slide 63

Slide 63 text

ͲΜͳίʔυʁ namespace :notify do namespace :update do task :start do _send_message("[\`#{fetch(:application)}\`] Deployment has started.") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Deployment has finished. :ok_woman:\n> #{fetch(:commit_message)}") end end ! namespace :rollback do task :start do _send_message("[\`#{fetch(:application)}\`] Rollback has started.\nCurrent Revision is \`#{fetch(:latest_revision)}\`") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Rollback has finished. :ok_woman:\nCurrent revision is \`#{fetch(:current_revision)}\`") end end end ! before 'deploy:starting', 'notify:update:start' after 'deploy:finishing', 'notify:update:finish' before 'deploy:reverting', 'notify:rollback:start' after 'deploy:finishing_rollback', 'notify:rollback:finish' σϓϩΠ΍ϩʔϧόοΫͷ։࢝ऴྃ ͷલޙʹ௨஌ΛૹΔ $BQJTUSBOPʹΑΔσϓϩΠͷ࣮ߦ࣌ʹ4MBDL௨஌͢Δํ๏ ఆٛͨ͠3VCZͷؔ਺ Λݺͼग़͢

Slide 64

Slide 64 text

ͲΜͳίʔυʁ namespace :notify do namespace :update do task :start do _send_message("[\`#{fetch(:application)}\`] Deployment has started.") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Deployment has finished. :ok_woman:\n> #{fetch(:commit_message)}") end end ! namespace :rollback do task :start do _send_message("[\`#{fetch(:application)}\`] Rollback has started.\nCurrent Revision is \`#{fetch(:latest_revision)}\`") end ! task :finish do _send_message("[\`#{fetch(:application)}\`] Rollback has finished. :ok_woman:\nCurrent revision is \`#{fetch(:current_revision)}\`") end end end ! before 'deploy:starting', 'notify:update:start' after 'deploy:finishing', 'notify:update:finish' before 'deploy:reverting', 'notify:rollback:start' after 'deploy:finishing_rollback', 'notify:rollback:finish' σϓϩΠ΍ϩʔϧόοΫͷ։࢝ऴྃ ͷલޙʹ௨஌ΛૹΔ $BQJTUSBOPʹΑΔσϓϩΠͷ࣮ߦ࣌ʹ4MBDL௨஌͢Δํ๏ ఆٛͨ͠3VCZͷؔ਺ Λݺͼग़͢ 3VCZͰ֦ு͢Δ

Slide 65

Slide 65 text

σϓϩΠࣗಈԽͷԸܙ ‣ ϛε͕֨ஈʹݮΓɺ։ൃ଎౓্͕͕ͬͨ ‣ σϓϩΠʹର͢Δ৺ཧతোน͕Լ͕ͬͨ ‣ ίʔυԽ͞ΕΔ͜ͱͰ࡞ۀ͕໌֬ʹͳͬͨ

Slide 66

Slide 66 text

͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 67

Slide 67 text

ͦΜͳΘ͚ͳ͍ ͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 68

Slide 68 text

714ͷ໰୊ ‣ εέʔϧΞ΢τ͢Δͷ͸ͱͯ΋େม ‣ ΍ͬͺΓେखاۀʹ͸ఢΘͳ͍ͷ͔ʜɻ

Slide 69

Slide 69 text

1BB4࣌୅ ‣ 1MBUGPSNBTB4FSWJDF ‣ ϢʔβʔͷγεςϜΛ Քಇͤ͞Δࣄ͕Ͱ͖Δ ϓϥοτϑΥʔϜࣗମ ΛɺΠϯλʔωοτܦ ༝ͰαʔϏεͱͯ͠ར ༻Ͱ͖Δܗଶ ‣ &OHJOF:BSEʢ೥ʣ ‣ )FSPLVʢ೥ʣ

Slide 70

Slide 70 text

͜ͷ࣌୅ ‣ (JUʢ೥ʣ ‣ 3VCZʢ೥ʣ ‣ 1ZUIPOʢ೥ʣ

Slide 71

Slide 71 text

1BB4ͷϝϦοτ ‣ ϗετͷ؅ཧ͸αʔϏεࣄۀऀ೚ͤ ‣ ෛՙ෼ࢄ͸ࣗಈ ‣ σϓϩΠ͸AHJUQVTIA͚ͩ

Slide 72

Slide 72 text

1BB4ͷӅΕͨϝϦοτ ‣ ϕετϓϥΫςΟεతͳͱ͜ΖΛڧ੍͢Δ ‣ σʔλϕʔεɾΞΫηε༻ͷύεϫʔυ ΛϦϙδτϦʹؚΊͪΌμϝΑὑ ‣ ΞϓϦΛϙʔλϒϧʹ͢Δ͜ͱΛڧ੍͢Δ ‣ ΞοϓϩʔυϑΝΠϧ΍ϩάɺηογϣ ϯ৘ใͳͲΛΞϓϦ͔Β෼཭ͤ͞Δ

Slide 73

Slide 73 text

ΞϓϦͷߏ੒ͷ͞ΒͳΔෳࡶԽ ‣ "MUFSOBUJW+4ͷίϯύΠϧ ‣ "MUFSOBUJWF$44ͷίϯύΠϧ

Slide 74

Slide 74 text

͜ͷ࣌୅ ‣ 4BTTʢ೥ʣ ‣ -&44ʢ೥ʣ ‣ $P⒎FFTDSJQUʢ೥ʣ ‣ 3VCZPO3BJMTʹؚ·ΕΔʢ೥ʣ

Slide 75

Slide 75 text

*BB4࣌୅ ‣ *OGSBTUSVDUVSFBTB4FSWJDF ‣ "NB[PO8FC4FSWJDFਖ਼ࣜެ։ʢ ೥ʣ ‣ (PPHMF$PNQVUF&OHJOFਖ਼ࣜެ։ ʢ೥ʣ

Slide 76

Slide 76 text

lྑ͍714zͰ͸ແ͔ͬͨ ‣ "1*ʹΑΔૢ࡞ ‣ पลαʔϏεͷॆ࣮ ‣ ෼ࢄετϨʔδʢ4ʣ ‣ σʔλϕʔεʢ%ZOBNP%#ʗ3%4ʣ ‣ %/4ʢ3PVUFʣ ‣ $%/ʢ$MPVE'SPOUʣ ‣ FUDʜ

Slide 77

Slide 77 text

lྑ͍714zͰ͸ແ͔ͬͨ ‣ "1*ʹΑΔૢ࡞ ‣ पลαʔϏεͷॆ࣮ ‣ ෼ࢄετϨʔδʢ4ʣ ‣ σʔλϕʔεʢ%ZOBNP%#ʗ3%4ʣ ‣ %/4ʢ3PVUFʣ ‣ $%/ʢ$MPVE'SPOUʣ ‣ FUDʜ αʔόʔΛ࢖͍ࣺͯͰ͖ΔΑ͏ʹͳͬͨ

Slide 78

Slide 78 text

*NNVUBCMF*OGSBTUSVDUVSF ‣ αʔόʔͷঢ়ଶΛ؅ཧ͠ͳ͍ ‣ αʔόʔͷ಺༰Λมߋ͢ΔͷͰ͸ͳ͘ɺ ׬੒ͨ͠αʔόʔͱݱߦαʔόʔΛ੾Γ ସ͑Δ

Slide 79

Slide 79 text

*NNVUBCMF*OGSBTUSVDUVSF ‣ αʔόʔͷঢ়ଶΛ؅ཧ͠ͳ͍ ‣ αʔόʔͷ಺༰Λมߋ͢ΔͷͰ͸ͳ͘ɺ ׬੒ͨ͠αʔόʔͱݱߦαʔόʔΛ੾Γ ସ͑Δ ΞϓϦ͕ϙʔλϒϧʹͳ͔ͬͨΒ࣮ݱ

Slide 80

Slide 80 text

ͦͷԸܙ ‣ େن໛ʹεέʔϧΞ΢τ͍ͯ͠ΔαʔϏε ͚ͩͰͳ͘ɺϗετͰࣄ଍ΓΔαʔϏε ʹ͢Βɺ҆શʹόʔδϣϯΞοϓ͕Ͱ͖Δ Α͏ʹͳͬͨɻ

Slide 81

Slide 81 text

͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 82

Slide 82 text

ࠓͷͱ͜Ζ͸Ͷ ͢΂͕ͯ͏·͍ͬͨ͘ ΋͏೰ΈͳΜͯແ͍

Slide 83

Slide 83 text

·ͱΊ ‣ σϓϩΠͷख๏ͱ͍͏ࢹ఺Ͱେ·͔ͳྺ࢙ Λͳͧͬͨɻ ‣ Ͳ͏͍ͬͨܦҢͰσϓϩΠͷख๏͕ൃల ͖ͯͨ͠ͷ͔ʁ ‣ Ͳ͏͍ٕͬͨज़͕࢖ΘΕ͖ͯͨͷ͔ʁ ‣ ͲͷΑ͏ʹࢥ૝͕มΘ͖ͬͯͨͷ͔ʁ

Slide 84

Slide 84 text

׬ ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ IUUQTKPJOEJO