A tool for deploying Django Web Apps to remote servers
Project description
Last Updated: June 1st, 2016
Supported on Mac OSX 10.11 (El Capitan)
A collection of commands for generating a new Django project (running Python 3) and deploying using Ansible to either a Vagrant or web host instance.
Dependencies
Vagrant
Python 2.7
Setup
pip install yak-yurt
mkdir ~/roles
ansible-galaxy install nodesource.node -p ~/roles
vagrant plugin install vagrant-vbguest
Usage
Create some editable settings (required before running “yurt new_project”)
cd new_proj
yurt add_settings (--vault)
(nano/vim/subl) fabric_settings.py
Create a Django project and a Vagrant VM instance
cd new_proj
yurt new_project
Adds a remote server target to the Django project
cd new_proj
yurt remote_server
Deploys to a remote server target (must be inside the Django project git repo)
cd new_proj/project_repo
yurt deploy
Setup a Yurt-started project (git ssh link required)
cd new_proj
yurt existing
Create a JSON file with Vault credentials (experimental)
cd new_proj
yurt vault (--dest=<destination directory>)
Notes on Project Structure
After running either “yurt existing” or “yurt new_project” inside an empty directory (“new_proj”) this is the structure:
new_proj
|_ Vagrantfile
|_ project_repo
|_ manage.py
|_ requirements.txt
|_ config
| |_ settings
| | |_ base.py
| | |_ local.py
| |
| |_ urls.py
| |_ wsgi.py
|
|_ orchestration
|_ env_vars
| |_ base.yml
| |_ vagrant.yml
|
|_ inventory
| |_ vagrant
|
|_ roles
| |_ {{ all the Ansible roles }}
|
|_ appservers.yml
|_ dbservers.yml
|_ site.yml
|_ vagrant.yml
Vagrant Notes
Use the command vagrant ssh to SSH into the Vagrant VM
On the Vagrant VM, the application code is in /server/<project_name> and the virtualenv is in /server/.virtualenvs/<project_name>
VM is provisioned with Ansible for the first time when calling vagrant up
Re-provisioning with Ansible can be called with vagrant provision
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for yak_yurt-0.1.dev48-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3da877b95d287e4aa35b97fe90c49c49562c1c7054dcd85abe6fd80d3f92035 |
|
MD5 | a16ff39dcdfc7f5a1615f92fb3452489 |
|
BLAKE2b-256 | f24a3df7ddbc988cb1894b7b864f293277b6ffb07d5b64a9c21f43d075c53a21 |