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
Tmux Tips vol.02
Search
Riki Shimma
February 02, 2018
Programming
0
610
Tmux Tips vol.02
tmux and tmuxinator and more
Riki Shimma
February 02, 2018
Tweet
Share
More Decks by Riki Shimma
See All by Riki Shimma
管理画面のチラ見せから日本の決済を変える@管理画面チラ見せナイト#4
shimma
0
150
Other Decks in Programming
See All in Programming
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
今から始めるClaude Code超入門
448jp
8
8.9k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
290
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
CSC307 Lecture 09
javiergs
PRO
1
840
2026年 エンジニアリング自己学習法
yumechi
0
140
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
A designer walks into a library…
pauljervisheath
210
24k
Exploring anti-patterns in Rails
aemeredith
2
250
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Building an army of robots
kneath
306
46k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
The Invisible Side of Design
smashingmag
302
51k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Designing Powerful Visuals for Engaging Learning
tmiket
0
230
Transcript
Tmux Tips vol.02 tmuxinatorߨ࠲ 2017/12/15 @shimma
ۙͷ OpsWorksܦ༝ͰσϓϩΠ͢Δͱɺrailsଆͷ unicornϓϩηε͕࠶ىಈ͞Εͣɺݹ͍ιʔε ίʔυ͕ಈ͖ଓ͚Δͷଟൃ (NOW) • masterϓϩηε͕ͬͨ··ɺworkerϓϩηε͕ͬͨ·· • API͕1/4ͷ֬Ͱҧ͏σʔλΛฦ͢ (
࠷ߴ)
ۙͷ unicornͷΈ masterϓϩηεʹUSR2γάφϧૹΒΕΔͱɺࣗΛ࠶ىಈ͠ɺ ৽͍͠masterϓϩηεΛϑΥʔΫͨ͠workerϓϩηεੜ·Ε Δ
ղܾͷํੑ • ͻͱ·ͣσϓϩΠޙͷunicornͷϓϩηε͕৽͘͠ͳ͍ͬͯΔ ͷ͔֬ೝ͢Δ • (͋ͱࠜຊతʹOpsWorks͔ΒҾӽ͠Λ͍ͨ͠)
tmuxͷग़൪
tmuxinator • tmux sessionشൃੑ͕͋Γɺ࠶ىಈ͢Δͱফ͑Δ • pane/windowΛ໊લ͚ͭͯอଘग़དྷͨΒศར͡Όͳ͍ʁͱ͍ ͏ࢥ͔Βੜ·Εͨ • ݸਓతʹඞཁੑ͍ͱࢥ͏ •
https://qiita.com/shimma/items/7429bc74c235d6af6442 • 2014͘Β͍ʹྲྀߦͨ͠ • golangͷ࣮ΛࢼΈΔऀୡ͕͍Δ͕ɺܾఆ൛ͳ͍
install gem install tmuxinator
how to use tmuxinator edit prod tmuxinator prod # ~/.tmuxinator/prod.yml
name: demo-production root: /Users/shimma/src/github.com/shimma/demo windows: - production: panes: - ssh demo01 -t "cd /srv/www/demo/current && sudo -u deploy RAILS_ENV=production bin/rails console" - sleep 2 && ssh demo02 -t "cd /srv/www/demo/current && sudo -u deploy RAILS_ENV=production bin/rails dbconsole -p"
sample # ~/.tmuxinator/anypay.yml name: anypay root: /Users/shimma/src/github.com/shimma/demo windows: - production:
panes: - ssh demo01 - ssh demo02 - ssh demo03 - ssh demo04 # ଓޙʹsynchronized panesޙʹpsίϚϯυΛୟ͘
͔͠͠
ࠓճMakefileͰे check-unicorn-process: ssh demo01 "hostname && ps aux | grep
unicorn" ssh demo02 "hostname && ps aux | grep unicorn" ssh demo03 "hostname && ps aux | grep unicorn" ssh demo04 "hostname && ps aux | grep unicorn"
݁ جຊతʹMakefileShellScriptͰྃग़དྷΔΑ͏ʹ͢Δ͠ Ͳ͏ͯ͠ΠϯλϥΫςΟϒͳॲཧ͕ඞཁͳ࣌ʹtmuxinatorΛ׆༻͢Δ͠