From 02db6b778cb8ba046e20f0ac8fef265a7fa37e91 Mon Sep 17 00:00:00 2001 From: Bryan Date: Thu, 30 Jan 2014 03:11:06 -0500 Subject: [PATCH] Adding some host-based fab documentation while I was about chasing rabbits down holes. --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cd86b5..3c5f2dc 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,32 @@ forwards to your virtual machine's web site. *Notice* Fabric might not run properly if you presently in a virtualenv. `deactivate` prior to running fab commands. -1. On the virtual machine, type `cd karmanotes` to get into the code repository. +### From the Host Machine + +If Fabric is available on the host machine, you should be able to run Fabric +commands directly on the host machine, pointed at the virtual machine. If +Fabric is not available on the Host Machine, see the next section. + +To setup the host machine properly, see the section about +[accessing the VM via fabric](#accessing-the-vm-via-fabric) and then return to +this section. + +Assuming those steps were followed with the alias, the following instructions +should complete the virtual machine setup: + +1. `cd {project_root}` on the host machine. + +1. type `vmfab first_deploy`. + +### From within the Virtual Machine + +If Fabric is not available on the host machine, or just for funsies, you may +run the Fabric commands within the virtual machine. + +1. Connect to the virtual machine with `vagrant ssh`. + +1. On the virtual machine, type `cd karmanotes` to get into the code + repository. 1. In the code repo of the VM, type `fab -H 127.0.0.1 first_deploy` @@ -363,7 +388,8 @@ to run Fabric against the virtual machine. You will need to setup the host machine with the proper SSH credentials to access the virtual machine. This is done by running `vagrant ssh-config` from -`{project_root}`. +`{project_root}` and copying the results into your SSH configuration file +(usually found at `~/.ssh/config`). The VM will, by default, route its SSH connection through localhost port 2222 on the host machine and the base user with be vagrant. Point Fabric there when -- 2.25.1