From 922001ed38e5e5a13ba182644b1f5b02cedb4dbd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 15 Feb 2025 21:12:35 -0600 Subject: [PATCH] Add Deployment-Demo --- Deployment-Demo.-.md | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Deployment-Demo.-.md diff --git a/Deployment-Demo.-.md b/Deployment-Demo.-.md new file mode 100644 index 0000000..8e12e1c --- /dev/null +++ b/Deployment-Demo.-.md @@ -0,0 +1,52 @@ +# Deployment Demo + +A source repository is maintained as a demo for the Rattail [deployment framework](Deployment). Its goals are to: + + * Illustrate some of the key concepts of the framework. + * Provide a convenient way to try out an actual working example. + * Provide a starting point for creating new server bundle projects. + +## Virtual Environment + +You must first set up your [control environment](Deployment-ControlEnvironment.-). Assuming Python/pip/virtualenv are present, create (and activate) a new virtual environment: + +```sh +cd /srv/envs +virtualenv fabdemo +source fabdemo/bin/activate +``` + +## Source Code + +Fetch the demo code with: + +```sh +cd ~/src +git clone https://rattailproject.org/git/rattail-fabdemo.git +``` + +With your virtual environment activated then, install the package: + +```sh +cd ~/src/rattail-fabdemo +pip install -e . +``` + +## Server Bundle Prep + +See [Server Bundle Prep](Deployment-ServerBundlePrep.-) for general instructions, but in the case of the demo, there is technically none required at all. This is a convenience; bundles normally always require some prep. + +## Server Machine Prep + +As with any bundle, you have two main (documented) options for the target server. You can either target a conventional (physical) machine, in which case see [Server Machine Prep](Deployment-ServerMachinePrep.-), or you can target a virtual machine, in which case see [Testing with Vagrant](Deployment-VagrantTesting.-). + +## Bootstrapping the Server + +With your virtual environment activated, bootstrap the 'host' server with (paraphrasing here, `fab` options will depend on your connection needs): + +```sh +cd ~/src/rattail-fabdemo/servers/host +fab -H target bootstrap_all +``` + +Upon completion, there should be a Tailbone web app running on the server, e.g. at http://target/. If you used Vagrant then you should be able to browse this site at http://localhost:9080/.