a Python (2.5-‐‑2.7) library and command-‐‑line tool for streamlining the use of SSH for application deployment or systems administration tasks. From fabfile.org
a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/ downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution. From fabfile.org
is a tool+library to automate tasks execution and ease and speed up their implementation > Local or remote tasks (SSH) > Normal or super user tasks > Single or several hosts or hosts roles > Deploy and fill configuration files From myself
is not > A packaging tool > A deployment tool > A DevOps or SysAdmin tool > A set of rich commands such as "ʺpack as RPM, deploy code, restart httpd service"ʺ > But your fabfile could be all of these tools and more From myself
-‐‑ execute a command in remote hosts > sudo -‐‑ idem but using sudo to get superuser privileges > local -‐‑ idem but in localhost > execute -‐‑ run a task from another task > put / get -‐‑ upload / download files to / from remote host > upload_template -‐‑ render and upload template files > cd / lcd -‐‑ change current remote / local working dir > prompt -‐‑ interact with the user through command line > abort -‐‑ halt Fabric execution > require, reboot, open_shell... Fabric commands
-‐‑ to specify in which host must be executed a task. Useful for tasks to be run once in local @hosts('localhost') > @task -‐‑ to specify which function is a Fabric task. The rest of functions can not be lauched! > @parallel / @serial -‐‑ to specify how a tasks may be run @parallel(pool_size=5) > @with_seNings -‐‑ change environment variables only during the task execution @with_settings(warn_only=True) Environment variables & se3ings
makes tasks (commands) automation easier > Fabric is pre3y simple and powerful > Sometimes too simple > Do not abuse of Fabric! > Use native Python / Bash code instead of lots of complex commands when possible (modularity, testability...) > Use the right tool for the job, combine Fabric with > Puppet, Chef, Ansible, Cuisine, Bash & Python scripts... Conclusions