From 74ecb47018d318d59c753b6693ee35851f98966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org> Date: Mon, 16 Mar 2020 15:25:17 -0400 Subject: [PATCH] show git instructions earlier --- tsa/howto/fabric.mdwn | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/tsa/howto/fabric.mdwn b/tsa/howto/fabric.mdwn index 391ebb9d..7039e5b5 100644 --- a/tsa/howto/fabric.mdwn +++ b/tsa/howto/fabric.mdwn @@ -20,6 +20,12 @@ which we use [[puppet]]. # Tutorial +All of the instructions below assume you have a copy of the TPA fabric +library, fetch it with: + + git clone git@git-rw.torproject.org:admin/tsa-misc.git && + cd tsa-misc + ## Running a command on hosts Fabric can be used from the commandline to run arbitrary commands on @@ -80,11 +86,9 @@ trivial example that shouldn't be implemented (it is easier to just tell `fab` to run the shell command) but it should give you an idea of how to write new tasks. - 1. clone and edit the source + 1. edit the source - git clone git@git-rw.torproject.org:admin/tsa-misc.git - cd tsa-misc/fabric_tpa - $EDITOR host.py + $EDITOR fabric_tpa/host.py we pick the "generic" host library (`host.py`) here, but there are other libraries that might be more appropriate, for example @@ -125,9 +129,22 @@ N/A. ## Installation +Fabric is available as a Debian package: + + apt install fabric + +See also the [upstream instructions](https://www.fabfile.org/installing.html) for other platforms +(e.g. Pip). + Fabric code grew out of the installer and reboot scripts in the -`tsa-misc` repository. It could also be moved to its own repository -altogether. +`tsa-misc` repository. To get access to the code, simply clone the +repository and run from the top level directory: + + git clone git@git-rw.torproject.org:admin/tsa-misc.git && + cd tsa-misc && + fab -l + +This code could also be moved to its own repository altogether. ### Installing Fabric on Debian buster -- GitLab