FastHandle - Automation Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Top     SiteMap

Sidebar


Top     SiteMap

Manager Server

Target Server













.

operation:fabric.html



Top#How to use FastHandle

How to use Fabric in Python



FastHandle use Fabric. So you must learn Fabric.



About Fabric

http://www.fabfile.org/

Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.


fab Command Options

Fabric use fab command.

$ fab -h
Usage: fab [options] <command>[:arg1,arg2=val2,host=foo,hosts='h1;h2',...] ...

Options:
  -h, --help            show this help message and exit


  -H HOSTS, --hosts=HOSTS
                        comma-separated list of hosts to operate on
  -w, --warn-only       warn, instead of abort, when commands fail


  -u USER, --user=USER  username to use when connecting to remote hosts
  -p PASSWORD, --password=PASSWORD
                        password for use with authentication and/or sudo
  -i PATH               path to SSH private key file. May be repeated.
  -I, --initial-password-prompt
                        Force password prompt up-front


  -P, --parallel        default to parallel execution method
  -z INT, --pool-size=INT
                        number of concurrent processes to use in parallel mode


Example fab command

$ fab -H test-server-1 -u user01 -p XXXX -- whoami

$ PASS=XXXX
$ fab -H test-server-1 -u user01 -p $PASS -- hostname






Top#How to use FastHandle



operation/fabric.html.txt ยท Last modified: 2018/01/28 23:52 by kurihara