Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CI Study with Vagrant & Chef

kazweda
January 27, 2017

CI Study with Vagrant & Chef

「CakePHPで学ぶ継続的インテグレーション」( http://book.impress.co.jp/books/1114101035 ) を読みながら、Chapter 04を最近のバージョンに置き換えて実践してみました。

kazweda

January 27, 2017
Tweet

More Decks by kazweda

Other Decks in Programming

Transcript

  1. Agile459 CIษڧձ in দࢁ ϗετଆ(macOS sierra)ʹඞཁͳ΋ͷ ‣ 7JSUVBM#PYIUUQTXXXWJSUVBMCPYPSH ‣ 7BHSBOUIUUQTXXXWBHSBOUVQDPN

    QMVHJO4BIBSB WBHSBOUPNOJCVT WBHSBOUDBDIJFS ‣ $IFGCVOEMFS 3VCZӘԹԫԙդԠ☛ⅈԬդՓ ӑԌ՛ԡ԰դՓ HFNJOTUBMMCVOEMFS ‣ 7BHSBOUCPYѫIUUQTHJUIVCDPNDIFGCFOUP ‣ HJU YDPEFTFMFDUJOTUBMM
  2. Agile459 CIษڧձ in দࢁ SourceTree ീ⢰ѷ(JU)VCӕ44)ᝇ❰ӑҷӵӲҰӕӃӵᢅᴿѸ IUUQTHPPHM+F7- 4PVSDF5SFFӑ(JU)VCӕQVTIӃӵӒԐՑդѭ 1FSNJTTJPOEFOJFE QVCMJDLFZ

     ǟ⽇⼊㒎ӘԽԉԌՓൻӼ➰㗶 JE@STB@IPHF ӃӵӒ⨿ҹӔҮ  ǟ_TTIDPOGJHӮIPHFIPHFHJUDPOGJHӼ⽠ӽӑҹӶӔҮ  ⽇⼊㒎ӘԽԉԌՓൻӼԯԽԑՓ԰ӕӁӐҴҹѭ _TTIJE@STB _TTIJE@STBQVC
  3. Agile459 CIษڧձ in দࢁ VagrantΛಈ͔ͯ͠ΈΔ ‣ 7BHSBOUGJMF⻱㈨ਦ 7"(3"/5'*-&@"1*@7&34*0/ 7BHSBOUDPOGJHVSF 7"(3"/5'*-&@"1*@7&34*0/

    EP]DPOGJH] DPOGJHWNCPYPQTDPEFVCVOUV DPOGJHWNOFUXPSLQSJWBUF@OFUXPSL JQ FOE ‣ ゼಌ WBHSBOUVQ ‣ ՕԘԌ՛ WBHSBOUTTI ‣ ુ᱑ WBHSBOUIBMU
  4. Agile459 CIษڧձ in দࢁ Ծ૝؀ڥΛ࡞ΔͨΊͷ؀ڥઃఆ $ gem install bundler Fetching:

    bundler-1.13.7.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/ Gems/2.0.0 directory. $ which gem /usr/bin/gem できれば、sudo でシステム(OS)領域を触りたくない。
  5. Agile459 CIษڧձ in দࢁ Ծ૝؀ڥΛ࡞ΔͨΊͷ؀ڥઃఆ MTMVTS UPUBM ESXYSYSYSPPUXIFFMCJO ESXYSYSYSPPUXIFFMJODMVEF ESXYSYSYSPPUXIFFMMJC

    ESXYSYSYSPPUXIFFMMJCFYFD ESXYSYSYSPPUXIFFMMPDBM 㮢⍋∪㮣 MTMVTSMPDBM UPUBM ESXYSYSYIPHFVTFSTUBGGCJO ESXYSXYSYSPPUBENJOMJC
  6. Agile459 CIษڧձ in দࢁ Ծ૝؀ڥΛ࡞ΔͨΊͷ؀ڥઃఆ XIJDISVCZ 6TFSTIPHFVTFSBOZFOWFOWTSCFOWTIJNTSVCZ MTN_BOZFOWFOWTSCFOWTIJNT CFSLT CVOEMF

    CVOEMFS DIFGBQQMZ DIFGDMJFOU DIFG TIFMM DIFGTPMP DIFG[FSP FSC FSVCJT GGJZBKMCFODI  HFN IUNMEJGG IUUQDMJFOU JSC LOJGF MEJGG NJOJUBS  PIBJ QJSC QSVCZ SBDLVQ SBLF SEPD SJ STQFD SVCZ  TFSWFSTQFDJOJU UIPS ҽӶӑԬդՓҶᡖҮӨӁӉѭ
  7. Agile459 CIษڧձ in দࢁ ։ൃ༻Ծ૝αʔόͷߏங ‣ ԿՕԻԠՏԳ՛ԘӘṍ૨ CVOEMFFYFDLOJGFTPMPJOJUCFSLTIFMG ᒨ⺙ӔԯԋՔԗ԰Ւ᭜㉏ҶਃᘻҿӶӨӃѭ ‣

    CVOEMFFYFD (FNGJMFӕ⻱㈨ӁӉ↯ဩӑᇴ⷗ ‣ LOJGFTPMPJOJU SFDJQFӼਃӵӉӫӘԯԋՔԗ԰Ւ᭜㉏Ӽਃᘻ JFLJUDIFO  IUUQTNBUTDIBGGFSHJUIVCJPLOJGFTPMP ‣ CFSLTIFMG DPPLCPPLTӘਸ਼ᆼ㕉ੋ☛ⅈԬդՓ
  8. Agile459 CIษڧձ in দࢁ ։ൃ༻Ծ૝αʔόͷߏங ‣ ԯԋՔԗ԰Ւஈ᥶ 7BHSBOUGJMFӼ➰㗶 IUUQTHPPHM3+UEXF WBHSBOUSFMPBEEFWFMPQ

    Ճԡ԰04ӘԓՔ՛԰ԯԋՔԗ԰Ւ஗BQQMJDBUJPOԽԑՓԨҶ শᕵԝդԸ EFWFMPQ Ә WBSXXXBQQMJDBUJPODVSSFOU Ӓஈ᥶ҿӶӨӃѭ
  9. Agile459 CIษڧձ in দࢁ ։ൃ༻Ծ૝αʔόͷߏங - େ·͔ͳखॱ 1 / 2

    ‣ 1)1Ѭ.Z42-Ѭ/HJOYӘԌ՛ԡ԰դՓӒ⼀ᇰ TJUFDPPLCPPLTQIQFOWSFDJQFEFGBVMUSC ‣ ൵┣⼀ᇰӘఉᦆઙӼ➰㗶 TJUFDPPLCPPLTQIQFOWBUUSJCVUFTEFGBVMUSC ‣ /HJOYӘԯԽԑՓ԰ԝԌ԰⼀ᇰ TJUFDPPLCPPLTQIQFOWUFNQMBUFTEFGBVMUEFGBVMUFSC ǟFUDOHJOYTJUFTBWBJMBCMFEFGBVMUҶ⇰ᘻҿӶӵѭ ‣ /HJOYӘԮԡ԰⇹ԸդԩՋՓՃԡ԰⼀ᇰ TJUFDPPLCPPLTQIQFOWUFNQMBUFTEFGBVMUUFTUFSC ‣ /HJOYӘԱԕՍՉ՛԰Փդ԰ӕ㌔⡕ӃӵJOEFYQIQ TJUFDPPLCPPLTQIQFOWUFNQMBUFTEFGBVMUJOEFYQIQFSC
  10. Agile459 CIษڧձ in দࢁ ։ൃ༻Ծ૝αʔόͷߏங - େ·͔ͳखॱ 2 / 2

    నӘԡՑԌԱӑ௲ᦸञҶӍӉՔԟԼӼӬӒӕѬ 7BHSBOUGJMFӼ➰㗶ӁӐ ԿՕԻԠՏԳ՛ԘӼᇴ⷗ WBHSBOUQSPWJTJPOEFWFMPQ ǟԯդԧՁդԡӔӓӃӣӐఉᦆೂҿӶӵӘӑҾᵍᖌӼѭ
  11. Agile459 CIษڧձ in দࢁ JenkinsͷखಈΠϯετʔϧ ▸ BQU⇹ӘԕդӼ㈲ౢ XHFUR0IUUQQLHKFOLJOTDJPSHEFCJBO KFOLJOTDJPSHLFZ]TVEPBQULFZBEE ▸

    BQUӕ+FOLJOTӘՒՅԠ԰ՒӼ㈲ౢ FDIPEFCIUUQQLHKFOLJOTDJPSHEFCJBOCJOBSZ] TVEPUFFBFUDBQUTPVSDFTMJTU ▸ Ԍ՛ԡ԰դՓ TVEPBQUHFUVQEBUF TVEPBQUHFUJOTUBMMZKFOLJOT
  12. Agile459 CIษڧձ in দࢁ JenkinsखಈΠϯετʔϧ࣌ͷΤϥʔ W: Can't drop privileges for

    downloading as file '/var/lib/ apt/lists/partial/ us.archive.ubuntu.com_ubuntu_dists_xenial_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ‣ ରॲ $ sudo chmod 777 /var/lib/apt/lists/partial
  13. Agile459 CIษڧձ in দࢁ JenkinsࣗಈΠϯετʔϧ - ࣦഊฤ Ԛԡ԰04 DJ ӕՕԘԌ՛

    WBHSBOUTTIDJ NPSFFUDBQUTPVSDFTMJTUEKFOLJOTMJTU EFCIUUQQLHKFOLJOTDJPSHEFCJBOCJOBSZ ҽӘԨԾՓԗԒդ԰Ҷ㊶㢕ӑԌ՛ԡ԰դՓҶ㉜ӨӔҮѭ ǟFUDBQUTPVSDFTMJTUӑҬӶӚ0, ӜӒӨӄTIFMMTDSJQUӑ༪㊙ѭ
  14. Agile459 CIษڧձ in দࢁ JenkinsࣗಈΠϯετʔϧ - shell scriptฤ TJUFDPPLCPPLTKFOLJOTSFDJQFTEFGBVMUSCӼ➰㗶 CBTIKFOLJOTEP

    DPEF&0) XHFUR0IUUQTQLHKFOLJOTJPEFCJBOKFOLJOTJPLFZ ]TVEPBQULFZBEE TVEPFDIPEFCIUUQQLHKFOLJOTDJPSHEFCJBOCJOBSZ FUDBQUTPVSDFTMJTUEKFOLJOTMJTU &0) FOE ❰ҹ
  15. Agile459 CIษڧձ in দࢁ $IFGӘീ⢰7$$8 _W http://vccw.cc/ ʮQiita: VCCW v3Ͱͷมߋ఺ͱ৽ػೳ·ͱΊʯ

    https://goo.gl/fH3UMU v2·Ͱ͸Chef͕࢖ΘΕ͍ͯͨɻv3͸Ansibleɻ VCCW(~v2) Ͱ SiteGuard WP Plugin Λ࢖͍͍ͨɻ -> FreeType ͕ඞཁɻ site-cookbooks/vccw/templates/default/default_configure_options.erb Λ։͍ͯԼهΛ௥Ճͯ͠ vagrant provision Λ࣮ߦɻ --with-freetype-dir=/usr ※ σʔλϕʔεͳͲॳظঢ়ଶʹ໭ΔͷͰ͝஫ҙΛ!!