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
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
120
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
290
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
310
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Oxlintはいいぞ
yug1224
5
1.3k
SourceGeneratorのススメ
htkym
0
200
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
組織で育むオブザーバビリティ
ryota_hnk
0
180
Featured
See All Featured
BBQ
matthewcrist
89
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
120
The Limits of Empathy - UXLibs8
cassininazir
1
220
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
It's Worth the Effort
3n
188
29k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Site-Speed That Sticks
csswizardry
13
1.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
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Λ׆༻͢Δ͠