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
CIにどこまで任せるのか?
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
valerauko
May 28, 2019
Programming
0
240
CIにどこまで任せるのか?
CircleCIを使ってサーバーへのデプロイをしてみた経験談。CIとCDの境目がどこにあるのか、どの時点で重要になるのかを考える。
valerauko
May 28, 2019
Tweet
Share
More Decks by valerauko
See All by valerauko
Reitit使ってみた
valerauko
0
390
分解に救われる
valerauko
0
100
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
CSC307 Lecture 10
javiergs
PRO
1
660
Architectural Extensions
denyspoltorak
0
300
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
200
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
ぼくの開発環境2026
yuzneri
0
240
dchart: charts from deck markup
ajstarks
3
1k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
52
4 Signs Your Business is Dying
shpigford
187
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
290
Statistics for Hackers
jakevdp
799
230k
How to Talk to Developers About Accessibility
jct
2
130
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
Transcript
CIにどこまで任せるのか? CI と CD の境目を探ってみたお話
introduction.yaml version: 2.1 executors: balint-erdos: environment: TECH: ["clojure", "kafka", "kubernetes"]
links: - https://balint.erdos.tech - https://github.com/valerauko tags: ["craft beer", "alpinism", "music"] working_directory: /tokyo jobs: studist: executor: balint-erdos environment: LANG: ["ruby", "javascript", "clojure"] steps: - tech lead enjin: executor: balint-erdos environment: LANG: ["ruby", "javascript", "go"] steps: - founding member
CircleCIとの出会い • スタディスト入社時( 2017 年) • ネイティブアプリのビルドに使用 • 当時ウェブの CI
がなかった • 開発環境を Vagrant から Docker に したい動きがあった
最初の試み: docker-composeそのままで • 開発環境を Docker に移住 • docker-compose.yml をそのままで CI
の環境として使う プラス • 自動テストができた マイナス • 遅い。とても。 • デプロイもやってもらいたい ... - run: name: Create test DB command: | docker-compose -f .circleci/compose.yml run teachme_web bundle exec rake db:create test docker-compose -f .circleci/compose.yml run teachme_web bundle exec rake db:migrate test docker-compose -f .circleci/compose.yml run teachme_web bundle exec rake db:seed test - run: name: Run rspec command: docker-compose -f .circleci/compose.yml run teachme_web bundle exec rspec
500倍 自動テストはいいぞ テストの量がまさかの
デプロイやってみよう • AWS の EC2 へデプロイ • CodeDeploy とかは備わってない プラス
• 自動デプロイできた! マイナス • ステージング 1 台のみ • すごく脆い 1. テスト走らせる 2. JS などのプリコンパイル走らせる 3. コミットして GitHub へ push 4. aws-cli でサーバーへ ssh 許可 5. ssh してサーバー上の deploy.sh 実行
とりあえずはやく! • docker-compose から CircleCI の設定に切り替え プラス • キャッシュが効く •
いくらでも平行できる マイナス • 設定の 2 重管理 主なポイント • YAML の alias をいっぱい使う • 並列化できる処理を全部 ◦ Rails のテスト ◦ Vue のテスト ◦ ドキュメントのコンパイル ◦ JS などのコンパイル • その中でもさらに並列 ◦ circleci tests glob ◦ circleci tests split
やってみたこと workspace で加速 • うまく行かず • 容量が大きすぎて結局インストー ルをそれぞれで走らせるよりも遅 くなったり executor
や command で共通化 • alias よりずっときれいになった
CIはイメージのビルドま でにしましょう
結論 デプロイは専用ツールに任せたい CircleCI から SSH でできるのは • 1 台のサーバー •
IP が決まっている やってもいいと思うのは • CD 入れるのもったいないぐら い小さなプロジェクト • とりあえずステージングの一台 だけでもやりたい時 CircleCD はいつかくるかな ... ?
仲間絶賛募集中! https://www.wantedly.com/companies/studist/ ご清聴ありがとうございました