From 46ed76b8761c37895ebfe615f420c61672d76968 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 15 Feb 2025 21:00:09 -0600 Subject: [PATCH] Add Deployment-Setup --- Deployment-Setup.-.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Deployment-Setup.-.md diff --git a/Deployment-Setup.-.md b/Deployment-Setup.-.md new file mode 100644 index 0000000..88fcea4 --- /dev/null +++ b/Deployment-Setup.-.md @@ -0,0 +1,40 @@ +# Setup for Fabric Deployment + +This will describe the setup required on one's personal (e.g. laptop) machine, so that it may be used for Fabric deployment. + +See [Server Machine Prep](Deployment-ServerMachinePrep.-) for info on setting up the "target" machine, to which things are to be deployed. + +## Python + +You should already have [[https://www.python.org/|Python]] installed. As of this writing, it should be version 3.6 or greater, but latest available is best. + +## Virtual Environment + +You must decide where you'd like virtual environments to live, on your personal machine. Perhaps you already have a place for them, or perhaps this is the only one you'll need and you really don't care. If the latter then may we suggest for simplicity: + + * `/srv/envs` on Linux + * `C:\envs` on Windows + +Basically all docs and generated code will assume `/srv/envs` as the location for this, e.g. on target machines. + +Once you have a spot picked out then cd to it and make a virtual environment. We'll call it "myfabenv" here but please use whatever name makes sense in your context. (You might call it "theo" if you just need to [deploy a Theo server](Theo-ServerSetup.-).) + +```sh +cd /srv/envs +python3 -m venv myfabenv +``` + +## Fabric Packages + +When installing packages, you must be sure to "activate" your virtual environment, e.g.: + +```sh +cd /srv/envs/myfabenv +source bin/activate +``` + +Then the basics can be had with: + +```sh +pip install rattail-fabric2 +```