Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (32 sloc) 1.55 kb
88badcf @bitprophet Started in with Sphinx in a big way. Totally not done yet but groundwork...
bitprophet authored
1 Fabric is a Python library and command-line tool designed to streamline
2 deploying applications or performing system administration tasks via the SSH
3 protocol. It provides tools for running arbitrary shell commands (either as a
4 normal login user, or via ``sudo``), uploading and downloading files, and so
abd2645 @ssteinerx More docs re-wrapping and whitespace tweaks.
ssteinerx authored
5 forth.
ed16642 @chrisvest INSTALL and README files with some initial and hopefully helpful text.
chrisvest authored
6
88badcf @bitprophet Started in with Sphinx in a big way. Totally not done yet but groundwork...
bitprophet authored
7 Typical use involves defining a "fabfile" (a Python module) containing one or
8 more functions or tasks which may then be executed by the ``fab`` command-line
a1ad6b2 @bitprophet Add example to README, expand/update docs index.
bitprophet authored
9 tool. For example, here's a small (but complete) ``fabfile.py`` containing a
10 single task::
11
12 from fabric.api import run
13
14 def host_type():
15 """
16 Prints host type (via ``uname -s``) for a remote host.
17 """
18 run('uname -s')
19
20 Executing this on an arbitrary server or list of servers is simple (below,
21 we're using an ssh-agent, and so there are no password prompts)::
22
4763a31 @bitprophet Fixes #45 - corrects README example
bitprophet authored
23 $ fab -H localhost,linuxbox host_type
a1ad6b2 @bitprophet Add example to README, expand/update docs index.
bitprophet authored
24 [localhost] run: uname -s
25 [localhost] out: Darwin
26 [linuxbox] run: uname -s
27 [linuxbox] out: Linux
28
29 Done.
30 Disconnecting from localhost... done.
31 Disconnecting from linuxbox... done.
32
33 Fabric provides extra functionality related to this mode of use, such as
88badcf @bitprophet Started in with Sphinx in a big way. Totally not done yet but groundwork...
bitprophet authored
34 prompting for user input, ensuring certain variables are present in order for
abd2645 @ssteinerx More docs re-wrapping and whitespace tweaks.
ssteinerx authored
35 tasks to run, and specifying which host or hosts a specific task connects to
36 by default.
ed16642 @chrisvest INSTALL and README files with some initial and hopefully helpful text.
chrisvest authored
37
88badcf @bitprophet Started in with Sphinx in a big way. Totally not done yet but groundwork...
bitprophet authored
38 Fabric may also be used as a standalone library, so that other Python programs
a1ad6b2 @bitprophet Add example to README, expand/update docs index.
bitprophet authored
39 needing a simple but powerful API on top of SSH or SCP may import and utilize
40 specific pieces of functionality.
Something went wrong with that request. Please try again.