Dead simple LAMP-stack deployments for Python-powered web applications
Project description
Underwear is a library for easily deploying any Python-powered web application to one or more Linux servers. Underwear is configurable by a YAML template and takes care of installing packages, configuring web/WSGI servers, and securing the server.
What Problem Does Underwear Solve?
Despite the advent of configuration management tools such as Puppet, Chef, Ansible, and Salt, it remains difficult to deploy a web application because you have to first learn one of those tools and then write scripts in the tool’s domain-specific language.
Underwear makes deploying to a traditional Linux server stack as easy as deploying to Heroku by providing a pre-packaged, easily configurable library. Deployments can be executed simply by installing Underwear with pip, specifying the IP addresses of the server(s) to deploy to, then running a couple of commands.
Quick Start
After these ten steps your app should be completely configured, secured, and deployed to remote servers.
These instructions will be simplied in future releases as the library is further developed.
Install Underwear to your virtualenv:
pip install underwear
Add ‘underwear’ to INSTALLED_APPS in your Django project. Underwear currently only supports Django (Flask and Bottle will be added in the 0.5 release).
Create a deploy directory under your Django project:
mkdir deploy; cd deploy
Download the Fabric file for uploading SSH keys, YAML configuration template, and hosts file to your project under the deploy/ directory:
wget https://raw.github.com/makaimc/underwear/master/underwear/deploy/fabfile.py wget https://raw.github.com/makaimc/underwear/master/underwear/deploy/underwear.yml wget https://raw.github.com/makaimc/underwear/master/underwear/deploy/hosts
Fill in blank variables fields in fabfile.py.
Execute the Fabric script (the script will prompt you for the non-root password):
fab bootstrap_ansible
Fill in blank fields and modify desired settings in the underwear.yml file so that Underwear knows where to install your web application.
Fill in the hosts file with your servers’ IP addresses. For example, the file may look like the following:
[webservers] 192.168.1.1 [dbservers] 192.168.1.2
Deploy your application:
python manage.py deploy
Underwear will output each step in the deployment process to standard output as it happens.
Access your application from the domain name you provided in the underwear.yml file.
License and Documentation
Underwear is free software under the MIT license.
Additional Underwear documentation can be found on Read the Docs.
About the Name “Underwear”
This library goes underneath your WSGI application to help you quickly deploy it to traditional servers. Otherwise no one knows you’re using it, and you can swap it out at any time for another deployment process when you outgrow the standard LAMP-stack setup.
There also weren’t any projects on GitHub by the name of underwear that had more than two stars and “underwear” was an open library name on PyPi :)
Features
Automated WSGI application deployments to a web & database server
Configurable via a simple YAML template
Support for ad hoc deployment needs without SSH-ing into remote servers
History
0.4.5 (2014-06-17)
Updated to work with the latest Ansible release under the covers (1.6.3).
Fixed a bug with evaluating conditional for postgresql backend.
Fixed issue where fail2ban wouldn’t be found on a system because the apt cache was not updated.
0.4.4 (2014-01-05)
Changing Django management command defaults to deploy directory within the project instead of your ~/.ssh key directory.
New option in underwear.yml to deploy to MySQL or PostgreSQL.
0.4.3 (2014-01-02)
Adding toggle for whether South should be used with a Django project (django_use_south) and a toggle for whether a fixtures file should be loaded (django_fixtures_file).
0.4.2 (2013-12-30)
Added toggle to flip whether or not SSL should be used with Nginx (deploy_ssl).
0.4.0 (2013-12-26)
Release now allows for 2 server web app deployments (one web server and one database server).
Fixes issues with Supervisor template and Django environment variables.
Includes templates required to tell the library where to deploy the application.
0.3.0 (2013-12-24)
First release on PyPI.
0.2.0 (2013-12-16)
Added initial working Ansible scripts for deployment.
0.1.0 (2013-12-16)
Initial codebase with Python package
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file underwear-0.4.5.tar.gz
.
File metadata
- Download URL: underwear-0.4.5.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f24642097713a1114584c54e23179e0cbeaf2f1eff89edde37cfc23b6d40ad |
|
MD5 | 7f4be309ff3eba2090290b0c0b461549 |
|
BLAKE2b-256 | c05ac5ed3841694caa5b1961fdb43b0a927c04fbc960a472105123f95cdea332 |