= Deployment Demo = A source repository is maintained as a demo for the Rattail [[Deployment|deployment framework]]. 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 [[Deployment/ControlEnvironment|control environment]]. Assuming Python/pip/virtualenv are present, create (and activate) a new virtual environment: {{{ cd /srv/envs virtualenv fabdemo source fabdemo/bin/activate }}} == Source Code == Fetch the demo code with: {{{ cd ~/src git clone https://rattailproject.org/git/rattail-fabdemo.git }}} With your virtual environment activated then, install the package: {{{ cd ~/src/rattail-fabdemo pip install -e . }}} == Server Bundle Prep == See [[Deployment/ServerBundlePrep|Server Bundle Prep]] 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 [[Deployment/ServerMachinePrep|Server Machine Prep]], or you can target a virtual machine, in which case see [[Deployment/VagrantTesting|Testing with Vagrant]]. == Bootstrapping the Server == With your virtual environment activated, bootstrap the 'host' server with (paraphrasing here, `fab` options will depend on your connection needs): {{{ 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/.