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
Drone CI
Search
Daisuke Fujita
October 20, 2015
Technology
3
490
Drone CI
社内勉強会で Drone について話した資料です
Daisuke Fujita
October 20, 2015
Tweet
Share
More Decks by Daisuke Fujita
See All by Daisuke Fujita
SREcon19 Asia/Pacific Recap
dtan4
0
150
Our Practices of Delegating Ownership in Microservices World
dtan4
4
8.8k
Kubernetes Cluster Upgrade / Mercari Meetup for Microservices Platform
dtan4
3
4.5k
KubeCon EU 2018 Recap: Multi-Tenancy in Kubernetes: Best Practices Today, and Future Directions / Kubernetes Meetup Tokyo 11 #k8sjp
dtan4
1
1.8k
Wantedly から Chef を一掃した話 / #chibadan
dtan4
24
11k
さようなら Chef こんにちは Dockerfile / Web Tech Tokyo #1
dtan4
6
7k
Docker をフル活用したインフラの紹介と成長し続けるためのインフラ戦略 / #abejameetup
dtan4
19
3.9k
Docker Compose PaaS の作り方、そして社内に導入した話 / #yapc8oji
dtan4
1
8.2k
Writing Kubenetes tools in Go
dtan4
1
3.5k
Other Decks in Technology
See All in Technology
複雑なState管理からの脱却
sansantech
PRO
1
130
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
150
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
AGIについてChatGPTに聞いてみた
blueb
0
130
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
4
530
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
170
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
870
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
2
530
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
0
980
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
570
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
Thoughts on Productivity
jonyablonski
67
4.3k
Making Projects Easy
brettharned
115
5.9k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Documentation Writing (for coders)
carmenintech
65
4.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
For a Future-Friendly Web
brad_frost
175
9.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Building an army of robots
kneath
302
43k
Being A Developer After 40
akosma
86
590k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Why Our Code Smells
bkeepers
PRO
334
57k
Transcript
Drone CI 2015-10-20 @dtan4 http://www.humanitarianstudies.no/wp-content/uploads/2014/06/drone-sunset.jpg
2छྨͷ Drone CI • Drone.io • CI as a Service
• Drone • OSS • @dtan4 ͕ಋೖ͠Α͏ͱฃಆ͍ͯ͠Δͭ
Drone.io https://drone.io
None
Drone.io • CI as a Service ͱͯ͠ͷ Drone • OSS
ແྉɺPrivate Repository ༗ྉ • GitHub, Bitbucket, Google Code ରԠ • ͖ͳΑ͏ʹςετεΫϦϓτΛ͔͚Δ • ϦϙδτϦϧʔτͷ .yml ͡Όͳ͍… • S3, Heroku, Dotcloud, … ʹσϓϩΠՄೳ https://drone.io/
Drone.io
Drone.io
Drone.io … • ʢͨͿΜʣDocker Βͳ͍ & ͬͯͳ͍ • ͍·Ͳ͖ .yml
ͰεΫϦϓτॻ͚ͳ͍ͷ… • ଞΑΓ͍҆ͱ͍͏Θ͚Ͱͳ͍ • m1.small + Jenkins ΑΓ͍҆ͱ͍͏͚ͩ • ςετΛฒྻʹ͢Δͷ CircleCI ΑΓߴ͍ • Jenkins ͷ͍উखΛΫϥυαʔϏεͰɺ ͱ͍͏ਓ͚ʁ
Drone drone/drone
Drone • OSS ͷ Docker-based CI • Ϗϧυ͝ͱʹಠཱͨ͠ Docker Container
ཱ͕ͭ • DB ͱ͔Ϗϧυ͝ͱʹཱͭ • Drone.io ͷ @bradrydzewski ͕Φʔφʔ • Golang drone/drone
Drone • GitHub, GH:E, Bitbucket, GitLab ʹରԠ • ϦϙδτϦϧʔτͷ .drone.yml
ʹ ςετεΫϦϓτΛॻ͘ • OSS CI ͩͱ Drone ͱ GitLab CI ͘Β͍͔͠ ରԠͯ͠ͳ͍ • Heroku, S3, … ͷσϓϩΠରԠ • Email, HipChat, Slack, … ͷ௨ʹରԠ drone/drone
Jenkins #1 #2 #3 #4
Drone #1 #2 #3 #4
Version of Drone • Version 0.3 (master) • ݱࡏͷ stable
• 1ϲ݄͘Β͍์ஔ͞ΕͯΔ • Version 0.4 (0.4.0) • Ӷҙ։ൃத • .drone.yml ͷޓੑͳ͍ drone/drone
.drone.yml image: ruby:2.2.3 cache: - vendor/bundle env: - RAILS_ENV=test services:
- postgres script: - bundle install -j4 --path=vendor/bundle - bundle exec rake db:test:prepare - bundle exec rspec 0.3 Α͋͘Δ Rails Drone ެࣜΠϝʔδ or ެ։͞Ε͍ͯΔΠϝʔδ ͖͜͜ͳΠϝʔδ͑Δ
.drone.yml cache: mount: - vendor/bundle compose: database: image: postgres:9.4 build:
image: ruby:2.2.3 environment: - DATABASE_USER=postgres - RAILS_ENV=test commands: - bundle install -j4 --path=vendor/bundle - bundle exec rake db:test:prepare - bundle exec rspec 0.4 Α͋͘Δ Rails
ςετը໘ 0.3 Ϗϧυ్தͰ ΩϟϯηϧͰ͖ͳ͍…
ςετը໘ 0.4
Secret Variables • 0.3, 0.4 ͱʹ Web UI ্ͰઃఆՄೳ •
wercker Έ͍ͨʹӅͯ͘͠Εͳ͍ • 0.4 ͩͱ .drone.sec ͱ͍͏ϑΝΠϧʹ҉߸Խͯ͠ ϦϙδτϦʹஔ͚Δ • travis encrypt ͱ ࣅͨײ͡
Docker on Drone • جຊతʹͰ͖ͳ͍ • ςετίϯςφ͕ /var/run/docker.sock Ϛϯτͯ͠ͳ͍ͨΊ •
ଞͷςετίϯςφΛফͤͯ͠·͏ • Docker in Docker ͳΒͰ͖Δ…ʁ (#380) • ߟ͑ͳ͓ͤͱ͍͏هࣄ͋Δ • DOCKER_HOST Λผϗετʹ͚ͯ docker build docker-compose ͢Δͱ͔…ʁ http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
ॴײ • ࣗલͰ CI ࣋ͭͳΒ͜ΕҰ • Docker ίϯςφͱͯ͠ಈ͔͢ͷ༰қ • ΠϚυΩͷ
CI as a service ͷػೳΛͪΌΜͱ ͑Δ • ·ͩ·ͩ։ൃ్্ • Drone 0.4 ͱ PostgreSQL ͷ૬ੑ͕ѱ͍ • ͍͟ͱͳͬͨΒιʔεಡΜͰͤΔ • OSS! OSS!