Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Operating Rails in Kubernetes
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kir Shatrov
April 17, 2018
Programming
500
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Operating Rails in Kubernetes
My talk at RailsConf 2018.
Kir Shatrov
April 17, 2018
More Decks by Kir Shatrov
See All by Kir Shatrov
Running Jobs at Scale
kirs
1
240
RailsClub 2016
kirs
2
330
Performance regressions in Ruby on Rails Core
kirs
0
240
Building a toolkit to detect performance regressions in Ruby on Rails core
kirs
3
6.2k
Развертывание веб-приложений и фреймворк Capistrano
kirs
1
300
Capistrano 3
kirs
4
3.1k
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
1k
速習iPhone Duo対応
yuukiw00w
1
510
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
App Intentsのビルドプロセスを支える技術
kntkymt
0
380
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
170
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
アクセシビリティから考える情報設計
high_g_engineer
0
380
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
140
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
620
setup-vp GitLab対応の裏側
naokihaba
0
100
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
260
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
210
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Paper Plane (Part 1)
katiecoart
PRO
2
11k
4 Signs Your Business is Dying
shpigford
187
23k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
エンジニアに許された特別な時間の終わり
watany
109
250k
Odyssey Design
rkendrick25
PRO
2
810
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
280
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Transcript
Operating Rails in Kubernetes Kir Shatrov
1. Intro to Kubernetes 2. Rails in Kubernetes 3. Shopify’s
migration story
Containers are awesome! *
Containerizing Rails: Techniques, Pitfalls, & Best Practices by Daniel Azuma
Tomorrow 3:30pm
None
None
app01 app02 app03
app01 app02 app03
None
None
None
Smart container scheduling for better utilization
Smart container scheduling for better utilization
Smart container scheduling for better utilization
Kubernetes basics: Pod
Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
None
None
web jobs Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
Managing Resources
YAML
None
YAML apply when changed
YAML store in repository
None
Deploy process controlling servers
Deploy process sequentially applying commands by SSH
Capistrano sequentially applying commands by SSH
None
kubectl apply --file web.yml
kubectl apply --file jobs.yml
Controlling servers vs describing configuration
Controlling servers Describing configuration running commands remotely comparing output with
expected not prone to failures push configuration poll for it to apply abstracts from physical machines self-healing
Controlling servers Describing configuration running commands remotely comparing output with
expected not prone to failures push configuration poll for it to apply abstracts from physical machines self-healing
None
It's easy to run a container, but not Rails
The Twelve-Factor app
None
Disposability and termination
Web requests
Background Jobs
Long-running jobs
None
Abort and re-enqueue
Concurrency scale out via the process model
None
Assets
rake assets:precompile
Assets Shipped in container
Database Migrations
Migrations as a part of deploy
Migrations as a part of deploy
Asynchronous Migrations
1. Change code and add a migration 1. Add a
migration 2. Change code
1. Change code and add a migration 1. Add a
migration 2. Change code
Asynchronous Migrations
None
None
Secret Management
Secrets in the environment
Secrets in a container
Secrets in a container
Rails 5.2 Credentials
None
ENV[‘RAILS_MASTER_KEY’]
The Twelve Factors Let workers terminate gracefully Migrations as a
part of deploy can be fragile Rails 5.2 Credentials + Kubernetes Secrets
Kubernetes at Shopify
None
Resource specs in YAML
None
None
None
kubectl apply --file web.yml
None
None
Let robots help humans to migrate apps Developers don’t have
to write YAML configs kubernetes-deploy brings visibility into rollout progress
None
Kubernetes helps organizations to efficiently schedule workload and save resources
It’s not magic, it only schedules and runs your containers Things you need to know about Rails
None
None
Thanks! @kirs @kirshatrov