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
150
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
96
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.2k
寫個好懂的程式
qrtt1
1
630
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
240
Other Decks in Programming
See All in Programming
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
170
CSC305 Lecture 05
javiergs
PRO
0
210
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
340
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
140
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
590
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.2k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
870
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
450
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
510
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
910
Featured
See All Featured
Visualization
eitanlees
149
16k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Building Applications with DynamoDB
mza
96
6.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Automating Front-end Workflow
addyosmani
1371
200k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
How to Think Like a Performance Engineer
csswizardry
27
2k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Building Adaptive Systems
keathley
44
2.8k
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