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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
240
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
ぼくの開発環境2026
yuzneri
0
230
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
120
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
300
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
WCS-LA-2024
lcolladotor
0
450
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Designing for Performance
lara
610
70k
A Tale of Four Properties
chriscoyier
162
24k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Google's AI Overviews - The New Search
badams
0
910
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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Λ׆༻͢Δ͠