Varhoo Manager
Python HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client
doc/images
server
tools
.gitignore
LICENSE
README.md

README.md

Varhoo Manager

It's client/server application for manage django, php projects on remote servers. Application supports followin operations:

  • Manage projects, systems
  • Production running due to uwsgi, proxy, appache2
  • Repository SVN, GIT
  • Automation for update project
  • Monitoring remote systems

How to start

Client

How to setup and use system with client - https://github.com/Pajinek/vhm/wiki/Client

Server

Easy way to strat the project is used Docker image (LXC). It is very easy - only run following commands in bash:

docker pull varhoo/vhm-server
docker run -i -t -p 80:8000 varhoo/vhm-server

Detail of docker's image https://registry.hub.docker.com/u/varhoo/vhm-server/

Following steps are for running on the common system:

  1. Installation
pip install -r requirements/basic.pip
  1. Run server
cd server
python manage.py runserver
  1. Run client
cd tools
python vhm_check.py

Default template for uwsgi socket (Python):

<uwsgi id="{{id}}">
      <wsgi-file>{{root_proc}}/wsgi.py</wsgi-file>
      <processes>1</processes>
      <chdir>{{root_proc}}</chdir>
      <uid>{{uid}}</uid>
      <gid>{{gid}}</gid>
      <pythonpath>{{root_proc}}</pythonpath>
      <limit-as>256</limit-as>
      <optimize>0</optimize>
      <daemonize>{{root}}log/{{id}}-{{name}}.log</daemonize>
      <master/>
      <home>/opt/env</home>
      <no-orphans/>
      <pidfile>{{root}}{{id}}-{{name}}.pid</pidfile>
      <socket>0.0.0.0:{{port}}</socket>
</uwsgi>

And basic template looks as follows (PHP):

<VirtualHost *:80>
        ServerAdmin {{ admin_email }}
        ServerName {{domain}}
{% for alias in alias_list %}
        ServerAlias {{ alias }}
{% endfor %}
        DocumentRoot {{root_proc}}
</VirtualHost>

Basic apache proxy configuration:

<VirtualHost _default_:443>
        ServerAdmin {{ admin_email }}
        ServerName {{domain}}
{% for alias in alias_list %}
        ServerAlias {{ alias }}
{% endfor %}
          ProxyPass / uwsgi://0.0.0.0:{{port}}/
        ProxyPassReverse / uwsgi://0.0.0.0:{{port}}/
</VirtualHost>

advanced way to configure apache proxy looks following:

<VirtualHost *:80>
        ServerAdmin {{ admin_email }}
        ServerName {{domain}}
{% for alias in alias_list %}
        ServerAlias {{ alias }}
{% endfor %}
  <Location /media/>
       SetHandler None
       Order deny,allow
       Allow from all
       Options -Indexes
  </Location>
  <Location /static/>
       SetHandler None
       Order deny,allow
       Allow from all
       Options -Indexes
  </Location>
  alias /media/ {{root_proc}}{{media}}
  alias /static/ {{root_proc}}{{static}}
  ProxyPreserveHost On
        ProxyErrorOverride Off
  ProxyPass /media !
  ProxyPass /static !
        ProxyPass / uwsgi://0.0.0.0:{{port}}/
        ProxyPassReverse / uwsgi://0.0.0.0:{{port}}/
</VirtualHost>