Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/by-cx/uWSGI-Manager

Manager of uWSGI instances
https://github.com/by-cx/uWSGI-Manager

Last synced: 13 days ago
JSON representation

Manager of uWSGI instances

Awesome Lists containing this project

README

        

Copyright (c) Adam Strauch
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#####################################################################

uWSGI Manager

This is small python script for uWSGI instances. It can read your XML configuration and stop/reload/restart/start/what ever with your uWSGI processes. Originaly it was delevoped for Python hosting Rosti.cz, but parts of administration and tools are open now or will be opened soon. Script works only under root privileges.

Using:

$ mkdir /etc/uwsgi
$ vim /etc/uwsgi/config.xml
[copy modified configuration below]
$ uwsgi-manager.py -l
$ uwsgi-manager.py -R 1

Config file /etc/uwsgi/config.xml:



/home/user/django/


1
0
/home/user/virtualenvs/default
128
660
user
user
/home/user/uwsgi/django.pid
/home/user/uwsgi/django.sock
/home/user/django/django.wsgi
/home/user/uwsgi/django.log
/home/user/django/

I assume, you use same paths of uwsgi binaries as I:

* /usr/bin/uwsgi
* /usr/local/bin/uwsgi25
* /usr/local/bin/uwsgi27
* /usr/local/bin/uwsgi31
* /usr/local/bin/uwsgi32

If you want to use another paths, you have to go into code.

If you are lost, try -h:

$ ./uwsgi-manager.py -h
Usage: uwsgi-manager.py [options]

Options:
-h, --help show this help message and exit
-s ID, --start=ID Start app
-S ID, --stop=ID Stop app (sig 9)
-r ID, --reload=ID Reload app (sig 1)
-b ID, --brutal-reload=ID
Brutal reload app (sig 15)
-R ID, --restart=ID Restart app
-c ID, --check=ID Check state of app
-a, --start-all Start all apps
-A, --stop-all Stop all apps
-w, --reload-all Reload all apps
-W, --restart-all Restart all apps
-B, --brutal-reload-all
Brutal reload all apps
-l, --list Print state of all apps

Or send me e-mail.

Adam Strauch

Feel free send some useful patch too :-)