Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker in CI - Cacoo與Backlog導入Docker的經驗分享
Search
株式会社ヌーラボ
PRO
December 10, 2015
Technology
2
460
Docker in CI - Cacoo與Backlog導入Docker的經驗分享
Presentation slides at
http://containersummit.ithome.com.tw/
株式会社ヌーラボ
PRO
December 10, 2015
Tweet
Share
More Decks by 株式会社ヌーラボ
See All by 株式会社ヌーラボ
ライティングチームだからこそできた、「どことでも繋がれるチーム」づくりの結果 / Technical Writing Meetup vol.38
nulabinc
PRO
0
30
4つの基本的な組織形態を知る ~ミンツバーグの組織論 7つの類型と力学、そしてその先へ~ より GWD in Nagoya
nulabinc
PRO
2
97
必要なのは客観性。組織変革をもたらす、より良い「対話」を生み出すための活動 #scrummikawa
nulabinc
PRO
3
1k
悪い実装例から学ぶ ウェブアクセシビリティ改善のヒント
nulabinc
PRO
1
330
ヌーラボカスタマーサクセスチームのBacklog活用
nulabinc
PRO
0
280
言葉で「ヌーラボらしさ」をどう届ける? グローバルチームでコラボレーションする大切さ
nulabinc
PRO
1
100
タスクの可視化は争いをなくす!? 夏休みを乗り切る 宿題プロジェクトマネジメント
nulabinc
PRO
2
260
情シスの申請業務におけるBacklog活用術
nulabinc
PRO
0
300
Backlogと業務プロセスのちょっといい関係
nulabinc
PRO
0
270
Other Decks in Technology
See All in Technology
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
710
Application Development WG Intro at AppDeveloperCon
salaboy
0
200
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
100
Storybook との上手な向き合い方を考える
re_taro
4
610
TypeScript、上達の瞬間
sadnessojisan
46
14k
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
120
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
Platform Engineering for Software Developers and Architects
syntasso
1
520
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
210
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
880
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Speed Design
sergeychernyshev
25
620
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How STYLIGHT went responsive
nonsquared
95
5.2k
Embracing the Ebb and Flow
colly
84
4.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Making Projects Easy
brettharned
115
5.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Transcript
None
https://www.flickr.com/photos/dahlstroms/3144199355 %PDLFSJO$* $BDPPᢛ#BDLMPHಋೖ%PDLFSతៃᱛڗ
છాوࢤ 40.&%"5BLBTIJ (SPXUI)BDLFS!/VMBC*OD
$PMMBCPSBUJWF"QQ.BLFS IUUQTOVMBCJODDPN
֨ᒜ #BDLMPH 1SPKFDUNBOBHFNFOUUPPMPWFS DPNQBOJFTVTF IUUQCBDLMPHUPPMDPNUX
-PPLJOHGPS5BJXBOFTF&OHJOFFS IUUQTOVMBCJODDPNDBSFFSTPGUXBSFFOHJOFFSCBDLMPH
$BDPP .VTFSTBSPVOEUIFXPSME ,VTFSTJO5BJXBO ESBXEJBHSBNTPO$BDPP IUUQTDBDPPDPNMBOH[I@UX
5ZQFUBML $PMMBCPSBUJWFEJTDVTTJPOUPPM IUUQTXXXUZQFUBMLJO
2VFTUJPO
6TFDBTFPG%PDLFSJO$* • 6TJOH%PDLFSGPS+PC&YFDVUJPO • 6TJOH%PDLFSGPS$*$MVTUFS
'PDVT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JPOTPGNJEEMFXBSFBOEUPPMT • 4IPVMECFJOEFQFOEFOUCBTJDBMMZ
*TTVFTJO$* • 4MPXUFTU • 5FTUIBTUPXBJUGPSSVOVOUJMUFTU FOWJSPONFOUPDDVQJFEXJUIPUIFSUFTU CFDPNFTBWBJMBCMF • )BSEUPNBOBHFTMBWFT •
.FTTZDPOpHVSBUJPOEJTBCMFTVTUP CPPUTUSBQOFXTMBWFRVJDLMZBOEHJWFVQ UFTUJOHGPSTPNFCSBODIFT
)FSF`T%PDLFS
)PX%PDLFSTPMWFTJTTVFT • 5PPNBOZCSBODIFTUPUFTU • 3VOOJOHUFTUGPSCSBODIJOJUTPXO%PDLFS DPOUBJOFSBMMPXTUPSVOUFTUTJOQBSBMMFM • 7BSJPVTUFTUFOWJSPONFOUSFRVJSFE • /FFEUPJOTUBMMPOMZ%PDLFSJOUPTMBWFT
XIFOZPVOFFENPSFSFTPVSDFTGPSUFTUJOH
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
4UFQTUP4UBSU4MBWF IUUQTXJLJKFOLJOTDJPSHEJTQMBZ+&/,*/4"NB[PO &$ 1MVHJO
#FOFpUPG4JNQMF4MBWF4FUVQ • #PPUTUSBQOFXTMBWFRVJDLMZ • &OBCMFUPSVOKPCTBOZXIFSF%PDLFS JTSVOOJOH
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
+PC$POpHVSBUJPO $ ./gradlew clean test –Penv=ci $ docker run <run
option> test-image ./gradlew clean test
3VO.VMUJ1SPDFTTFTJO4JOHMF$POUBJOFS # Dockerfile # install package required for test RUN
apt-get install –y redis-server # Test Configuration in Jenkins $ docker run test-image bach –c “service redis-server start ; ./ gradlew clean test” • 0OMZTJOHMF%PDLFSpMFSFRVJSFE • 3VOUFTUXJUITBNFTFUUJOHJOMPDBM
%PDLFS$PNQPTFWT4JOHMF%PDLFSpMF • +VTUGPSUFTUJOHQVSQPTF 4JOHMF %PDLFSpMFJTFOPVHIJONBOZDBTFT • *G%PDLFSpMFXJMMCFSFVTFEGPSPUIFS QVSQPTF %PDLFS$PNQPTFDPVMECF CFUUFS
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
*OIPVTF3FHJTUSZBT*NBHF$BDIF
%FQFOEFODZ$BDIFr)PTU%JSFDUPSZ
%FQFOEFODZ$BDIFr)PTU%JSFDUPSZ $ docker run –v ${HOME}/.gradle:/root/.gradle test-image <test command> •
)PTUEJSFDUPSZBTDBDIF • 1SPTTIBSFDBDIFXJUIPUIFSKPCT • $POTQFSNJTTJPOJTTVF
%FQFOEFODZ$BDIFr$BDIFJOBEWBODF
%FQFOEFODZ$BDIFr$BDIFJOBEWBODF # Dockerfile RUN mkdir -p /opt/local/app COPY requirements.txt /opt/local/app/
WORKDIR /opt/local/app RUN pip install -r requirements.txt COPY . /opt/local/app $ docker build –t test-image . $ docker run test-image <test command> %FQFOEFODZVQEBUF IBQQFOT/05TPPGUFO UIBOBQQMJDBUJPODPEF
%FQFOEFODZ$BDIFr$BDIFJOBEWBODF • *OTUBMMEFQFOEFODZJOBEWBODF • 1SPTOPQFSNJTTJPOJTTVF • $POTBMMDBDIFDMFBSFEJOEFQFOEFODZ DIBOHF
%FQFOEFODZ$BDIFr&YUFSOBM$BDIF
%FQFOEFODZ$BDIFr&YUFSOBM$BDIF # Dockerfile RUN mkdir /root/.gradle RUN cd /root/.gradle; curl
-skL https://s3-ap- northeast-1.amazonaws.com/<cache-bucket>/cache.20151201.tar.gz | tar zxf - • &YUFSOBMDBDIF • 1SPTGBTUFSJOJUJBMJOTUBMMBUJPO • $POTNBJOUBJOFYUFSOBMDBDIF
%FQFOEFODZ$BDIF4USBUFHZ )PXUPDBDIF 1SPT $POT 1SPKFDUXFVTF )PTU%JSFDUPSZ 8IFOSVOOJOH UFTU NPVOUIPTU EJSFDUPSZUP
DPOUBJOFSBOE TUPSFEFQFOEFOU MJCSBSJFTUIFSF 4IBSFMJCSBSJFT BNPOHQSPKFDUT BOETNBMM EFQFOEFODZ DIBOHFEPFTO`U JNQBDUTPNVDI 1FSNJTTJPOJTTVF DPVMEIBQQFOJG UFTUTIPVMECF SVOCZOPOSPPU VTFS +BWB 4DBMB .BWFO (SBEMF TCU $BDIFJO BEWBODF $SFBUFMPDBMJNBHF XJUIJOTUBMMJOH EFQFOEFOU MJCSBSJFTCFGPSF UFTUJOH /PQFSNJTTJPO JTTVF 8IFO EFQFOEFODZ DIBOHFE BMM DBDIFXJMMCF DMFBSFE 1FSM 1ZUIPO OPEFKT &YUFSOBM$BDIF $SFBUFDBDIF BSDIJWFBOETBWF JUUPFYUFSOBM TUPSBHFMJLF4 BOEEPXOMPBEJU XIFOSVOOJOHUFTU 'BTUFSJOJUJBM JOTUBMMBUJPO DPNQBSFEUP MFUUJOHCVJMEUPPM UPSFTPMWF EFQFOEFODJFT /FFEUPNBJOUBJO FYUFSOBMDBDIF QSPQFSMZUPLFFQ QFSGPSNBODF 4DBMB TCU
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
3FUSJFWF#VJME3FTVMU
3FUSJFWF#VJME3FTVMU # Dockerfile WORKDIR /opt/app $ docker run --rm –v
$(pwd):/opt/app test-image <test command> • .PVOUXPSLTQBDFUPDPOUBJOFS • 1SPTSFNPWFDPOUBJOFSTPPOBGUFSUFTU • $POTQFSNJTTJPOJTTVF
1FSNJTTJPO*TTVFPG)PTU%JSFDUPSZ • *OTPNFDBTF UFTUTIPVMECFSVOCZOPO SPPUVTFS • 0XOFSPGIPTUEJSFDUPSZJOTJEFDPOUBJOFS JTJOEFpOJUF • 8SJUJOHCVJMESFTVMUUPIPTUEJSFDUPSZCZ
OPOSPPUVTFSDBOGBJM
8PSLBSPVOE • 8SJUFSFTVMUUPBWBJMBCMFEJSFDUPSZGPS OPOSPPUVTFS • $PQZJUUPIPTUEJSFDUPSZCZSPPU # run.sh su test-user
–c “py.test tests –-junit-xml=/var/tmp/results.xml” cp –p /var/tmp/results.xml . $ docker run --rm –v $(pwd):/opt/app test-image ./run.sh
8PSLBSPVOE • $IBOHFPXOFSTIJQUPOPOSPPUVTFS EVSJOHCVJMEUJNF # run.sh chown test-user . su
test-user –c “py.test tests” chown $1 . $ docker run --rm –v $(pwd):/opt/app test-image ./run.sh $(id -u)
3FUSJFWF#VJME3FTVMU BMU # Dockerfile WORKDIR /opt/app COPY . /opt/app
$ UNIQUE_NAME=“TEST_${GIT_COMMIT}_$(date +%s)” $ docker run --name=${UNIQUE_NAME} test-image <test command> $ docker cp ${UNIQUE_NAME}:/opt/app/build/test-result/ test-result $ docker rm ${UNIQUE_NAME} • $PQZCVJMESFTVMUGSPNDPOUBJOFS • 1SPTOPQFSNJTTJPOJTTVF • $POTDPNQMJDBUFE
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
6QMPBE"SDIJWFUP4 • 6QMPBEBQQMJDBUJPOBSDIJWFUP4GPSGVUVSF EFQMPZ • "84TUBOEBSEUPPMJOTUBMMFEJO"NB[PO-JOVY CZEFGBVMU • 6QMPBETUBUJDSFTPVSDFT JNBHF
TDSJQU DTT XJUIJOBSDIJWFUP4GPS$%/EFMJWFSZ • *OIPVTFVQMPBEJOHUPPM
%PDLFSOJ[FJOIPVTFVQMPBEJOHUPPM $ /usr/local/bin/upload-static-s3 ROOT.war –b <cdn-bucket> # Dockerfile ENTRYPOINT [“/usr/local/bin/upload-static-s3”]
$ docker run --rm <in-house-registory>/upload-static-s3 ROOT.war – b <cdn-bucket>
#VJME5JNF5SFOE
8IPMF$*QSPDFTTQPSUBCMF
4VNNBSZ
-FTTPO-FBSOFE • $*NFFUTQSPCMFNTMJLF • 5PPNBOZCSBODIFTUPUFTU • $PNQMJDBUFEUFTUJOHFOWJSPONFOU • %PDLFSDBOTPMWFUIFNF⒏DJFOUMZ
,FZ1PJOUTUPVTF%PDLFSJO$* • 4FUVQTMBWF • 4JNQMJGZUFTU • "DDFMFSBUFUFTU • 3FUSJFWFCVJMESFTVMU •
6QMPBEBSDIJWF
1SPEVDUJPO6TF$BTFJO+BQBO
%PDLFSJO$* • (PPEQMBDFUPTUBSU%PDLFS • $*CFDPNFTDPNNPOQSBDUJDF • *OTUBMMJOH%PDLFSJO$*EPFTO`UDIBOHF NBOZUIJOHT • 8FDPVMEIBWFCFTUQSBDUJDFJOUIJTBSFB
IUUQTXXXEPDLFSDPNQSPEVDUTVTFDBTFT
None