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
67
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
56
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.1k
寫個好懂的程式
qrtt1
1
500
OAuth 2.0 Authorization Code Flow
qrtt1
0
190
types of knowledge
qrtt1
1
1.1k
twjug 小活動
qrtt1
0
330
TWJUG 2019
qrtt1
0
160
Learning Concepts
qrtt1
0
150
Other Decks in Programming
See All in Programming
Git Lint
bkuhlmann
4
750
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.3k
見た目から始める生産性向上
ikumatadokoro
7
770
Snowflakeで眠ったデータを起こそう!
estie
0
110
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Goのエラースタックトレースの歴史と今後
sonatard
6
660
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
360
Goのmultiple errorsについて (2024年4月版)
syumai
1
350
Ruby GitHub Packages
bkuhlmann
0
630
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
26
8.1k
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
13
1.5k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Practical Orchestrator
shlominoach
181
9.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Ruby is Unlike a Banana
tanoku
96
10k
Adopting Sorbet at Scale
ufuk
67
8.6k
The Pragmatic Product Professional
lauravandoore
24
5.8k
Unsuck your backbone
ammeep
663
57k
Designing Experiences People Love
moore
136
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Web Components: a chance to create the future
zenorocha
305
41k
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