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
460
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
93
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
66
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.1k
寫個好懂的程式
qrtt1
1
560
OAuth 2.0 Authorization Code Flow
qrtt1
0
240
types of knowledge
qrtt1
1
1.2k
twjug 小活動
qrtt1
0
400
TWJUG 2019
qrtt1
0
180
Learning Concepts
qrtt1
0
170
Other Decks in Programming
See All in Programming
flutterkaigi_2024.pdf
kyoheig3
0
150
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Jakarta EE meets AI
ivargrimstad
0
670
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
最新TCAキャッチアップ
0si43
0
190
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
cmp.Or に感動した
otakakot
3
200
Arm移行タイムアタック
qnighy
0
330
CSC509 Lecture 13
javiergs
PRO
0
110
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Documentation Writing (for coders)
carmenintech
65
4.4k
Writing Fast Ruby
sferik
627
61k
Side Projects
sachag
452
42k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
BBQ
matthewcrist
85
9.3k
Being A Developer After 40
akosma
87
590k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
We Have a Design System, Now What?
morganepeng
50
7.2k
Making Projects Easy
brettharned
115
5.9k
Faster Mobile Websites
deanohume
305
30k
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