Add Deployment-Demo
							parent
							
								
									b5b6860a48
								
							
						
					
					
						commit
						922001ed38
					
				
					 1 changed files with 52 additions and 0 deletions
				
			
		
							
								
								
									
										52
									
								
								Deployment-Demo.-.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								Deployment-Demo.-.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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/.
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue