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
introduction the fabric tools
Search
Ching Yi Chan
October 14, 2012
Programming
2
470
introduction the fabric tools
Ching Yi Chan
October 14, 2012
Tweet
Share
More Decks by Ching Yi Chan
See All by Ching Yi Chan
[coscup] Reading and modifying the source code of the dbt adapter
qrtt1
0
140
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
93
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.2k
寫個好懂的程式
qrtt1
1
620
OAuth 2.0 Authorization Code Flow
qrtt1
0
290
types of knowledge
qrtt1
1
1.3k
twjug 小活動
qrtt1
0
470
TWJUG 2019
qrtt1
0
210
Learning Concepts
qrtt1
0
230
Other Decks in Programming
See All in Programming
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
300
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
110
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
330
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
150
Deep Dive into Kotlin Flow
jmatsu
1
340
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
270
AIコーディングAgentとの向き合い方
eycjur
0
270
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
150
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
Rancher と Terraform
fufuhu
2
400
testingを眺める
matumoto
1
140
Featured
See All Featured
Visualization
eitanlees
148
16k
Music & Morning Musume
bryan
46
6.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Designing Experiences People Love
moore
142
24k
Documentation Writing (for coders)
carmenintech
74
5k
Balancing Empowerment & Direction
lara
3
620
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
Faster Mobile Websites
deanohume
309
31k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
How GitHub (no longer) Works
holman
315
140k
It's Worth the Effort
3n
187
28k
Transcript
ڋኪ fabric qrtt1 2012.10.15
fabric ၾҢ Ң݊ࡈҞᆀٙʃ RDd ٜՑҢᇬႊʕəɓᇋf I am the king of
the world server administrator.
Server Admin ၍ server ேίِԬʡჿ deploy the java web application
maintain various settings on the server be a watchdog for many purposes
Shell scripts fabric ঐᏍЫਂٙd͜ shell scripts ɰБ ෂႭ server admin
ேࠅึᄳ shell script
But, qrtt One ٙ shell script ܓ˄ࢨ... #!/bin/sh python run.py
fabric http:/ /docs.fabfile.org Fabric is a Python (2.5 or higher)
library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.
using fabric as cmd fab ${OPTS} -- ${COMMANDS} fab -H
s1,s2 -- uptime fab -P -H s1,s2 -- uptime fab -w -P -H s1,s2 -- uptime
using fabric api ϞࡳԬ function ̙˸͜lk code ˢ˖һٜᙂ :D
fabric/api.py https:/ /github.com/fabric/fabric/blob/master/ fabric/api.py
None
do something who where which context thinking in fabric sequence
parallel how to execute local script remote script
do something who where which context thinking in fabric sequence
parallel how to execute local script remote script ༈ਂٙԫఱνΝࡡ͉ᄳ TIFMM TDSJQU ԟছf ҷ͜ GBCSJD BQJ ᄳdɰ̥݊εəɓᓃ QZUIPO ϾϞፋʲช ఊॱ൙ሞ̴d̥ SFNPUF TDSJQU މکлᇦəf from fabric.api import run, task @task def uptime(): run("uptime")
do something who where which context thinking in fabric sequence
parallel how to execute local script remote script from fabric.api import run, task, env env.user = ‘qrtt1’ env.hosts = [‘server1’, ‘server2’] @task def uptime(): run("uptime") л͜ DPOUFYU ฿ׂd ਗ਼ܸ˿ٙੂБ٫eੂБЗໄפᕎd ̘દəᕏׂٙ UBTL һ࢙ SFVTFd һϞዚึϓމจଡ଼Υٙᆀ৷ጐ˝
do something who where which context thinking in fabric sequence
parallel how to execute local script remote script from fabric.api import run, task, env, roles, parallel env.user = ‘deployer’ env.roledefs = {'web':['s1', 's2', 's3'], 'db':['s4']} @task @roles(‘web’, ‘db’) @parallel def uptime(): run("uptime")
demo {deploy by fabric} https:/ /github.com/qrtt1/pyhug_fabric_talk fab -H s1,s2,s3 -P
build_web restart_web
Q & A