More Related Content
2日間Fabricを触った俺が
色々解説してみる Chef の気まぐれ環境構築 〜季節の Capistrano を添えて〜 #jawsug What's hot (20)
Processing LTSV by Apache Pig Fission で 始める Containerless Kubernetes #serverlesstokyo My misstake on Ansible’s lineinfile module Log analysis by using elasticsearch,kibana and fluentd. OpenStack を NetApp Unified Driver と NFS Copy Offload を使って拡張する Vol.002 Box plot for annual income presentation using R HUで6000万pvのトラフィックを捌くまでに起ったことをありのままに話すぜ Rが苦手な人にもRを使って頂くために~RcommanderとRook~ Viewers also liked (13)
Automation - fabric, django and more Fabric - a server management tool from Instagram Python Deployment with Fabric Pythonic Deployment with Fabric 0.9 Scaling mysql with python (and Docker). Fabric, Cuisine and Watchdog for server administration in Python Similar to Fabric (20)
Lapp環境をソースからインストールする(centos) Debianを用いたCortex-M3マイコン開発事例のご紹介 ホームディレクトリに埋もれた便利なコードをさがせ! 「Python言語」はじめの一歩 / First step of Python / 2016 Jan 12 Building production server on docker Building production server on docker More from Joe_noh (20)
パフォーマンス改善のためにやったこと・やらなかったこと Fabric
- 3. 3
インストール
● やりかたいろいろ
■ $ pip fabric
■ $ easy_install fabric
■ $ sudo apt-get install fabric
● git clone は やめた方がいいとか
- 4. 4
使い方
$ fab [options] task[ task task ...]
options
■ -f another_fabfile.py (./fabfile.py is default)
■ -H target.host.co.jp[,anothor.host.co.jp]
■ -p password
■ -i ~/.ssh/ssh_key
:
- 5. 5
雰囲気
● fabfile.py →
● $ fab -H ksl-i7 whats_your_name
[ksl-i7] run: hostname
[ksl-i7] out: ksl-i7.nagaokaut.ac.jp
from fabric.api import run
def whats_your_name():
run(“hostname”)
- 6. 6
もうちょい実用
● fabfile.py →
● $ fab -H ksl-i7,ksl-i5,ksl-t88w catch_snakes
[ksl-i7] sudo: yum install python
[ksl-i7] out: sudo password:
from fabric.api import run, sudo
def catch_snakes():
sudo(“yum install python”)