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
110
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
78
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.1k
寫個好懂的程式
qrtt1
1
590
OAuth 2.0 Authorization Code Flow
qrtt1
0
260
types of knowledge
qrtt1
1
1.3k
twjug 小活動
qrtt1
0
430
TWJUG 2019
qrtt1
0
190
Learning Concepts
qrtt1
0
200
Other Decks in Programming
See All in Programming
PromptyによるAI開発入門
ymd65536
1
320
高セキュリティ・高耐障害性・サブシステム化。そして2億円
tasukulab280
2
530
Generative AI for Beginners .NETの紹介
tomokusaba
1
260
DenoでOpenTelemetryに入門する
yotahada3
2
260
아직도 SOLID 를 '글'로만 알고 계신가요?
sh1mj1
0
320
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
140
生産性アップのためのAI個人活用
kunoyasu
0
450
CQRS+ES勉強会#1
rechellatek
0
330
「その気にさせる」エンジニアが 最強のリーダーになる理由
gimupop
3
420
AWS CDKにおけるL2 Constructの仕組み / aws-cdk-l2-construct
gotok365
4
880
❄️ NixOS/nixpkgsにSATySFiサポートを実装する
momeemt
2
160
SLI/SLOの設定を進めるその前に アラート品質の改善に取り組んだ話
tanden
2
340
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Making Projects Easy
brettharned
116
6.1k
Scaling GitHub
holman
459
140k
Documentation Writing (for coders)
carmenintech
69
4.7k
Building an army of robots
kneath
303
45k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
What's in a price? How to price your products and services
michaelherold
244
12k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
How STYLIGHT went responsive
nonsquared
99
5.4k
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