Monday, August 4, 2014

wheezy web: deploy nginx + uwsgi + memcached

wheezy.web is a lightweight, high performance, high concurrency WSGI web framework with the key features to build modern, efficient web. Here we will deploy quick start with nginx, uwsgi and memcached to clean debian stable installation.

Before proceeding ensure you have quick start empty or quick start i18n up and running. We will use the following names for installation:
  • master - a user used for installation, owner of corresponding deployment directories.
  • deby32 - a name of machine with clean debian stable.


It is handy to setup password less ssh login, su without asking password and sudo for user who run installation/update:
apt-get install sudo
adduser master sudo
echo 'master ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
Install fabric to your development environment:
env/bin/easy_install fabric
Install debian packages:
env/bin/fab -H deby32 debian


The default fabric file uses mercurial to determine current project version. Just in case here is a typical .hgignore file:
syntax: glob
so let's add it to hg repository.
hg init
hg add
hg ci -m "Initial project structure."
Open etc/config.ini file and change encryption-key, ticket-salt and validation-key (don't forget to commit your changes). Create distributive archive:
make clean release
ls -lh dist/
Provide one time installation and configuration:
env/bin/fab -u master -H deby32 install config
Try navigate to the host with browser.


Here are commands necessary to update your application:
make clean release
env/bin/fab -H deby32 update reload

No comments :

Post a Comment