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
7.1k
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
UI State設計とテスト方針
rmakiyama
2
300
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
23
11k
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
170
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
240
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
500
Qiita埋め込み用スライド
naoki_0531
0
350
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
We Have a Design System, Now What?
morganepeng
51
7.3k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
What's in a price? How to price your products and services
michaelherold
243
12k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
GitHub's CSS Performance
jonrohan
1030
460k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
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!