Ganeti Web Manager
Installation
Note: Installing from the tarball is the preferred method. After installing the dependencies, please download the tarball instead of cloning the repository.
Overview
- Install dependencies: Python, Pip, Fabric, VirtualEnv
- Get the Ganeti Web Manager code: Clone from the repository or download a release tarball
- Deploy fabric environment: fab dev deploy or fab prod deploy
- Configure Settings: Copy settings.py.dist to settings.py and make any modifications
- Sync database, then run the server: ./manage.py syncdb --migrate, then ./manage.py runserver
This section explains how to automatically install Ganeti Web Manager using Fabric. Fabric simplifies the installation process by automatically installing dependencies into a virtual environment.
Related Topics:
- Read more about why Fabric is strongly recommended.
- Troubleshoot an installation using Fabric.
- Manual installation.
Compatibility
Ganeti Web Manager is compatible with the following:
- Ganeti: >= v2.2.x is supported. v2.1.x and v2.0.x are unsupported and sometimes work but can cause problems (see #8973). Lower versions are not supported.
- Browsers: Mozilla Firefox >= v3.x, Google Chrome or Chromium. Other contemporary browsers may also work, but are not supported. (The web-based VNC console requires browser support of WebSockets and HTML5)
- Databases: MySQL or SQLite. SQLite is not recommended in production environments.
- Operating Systems: GWM has been tested on Debian 7, Ubuntu 11.10, 12.04 and CentOs 5 and 6. Debian 6 is supported, provided the Pip, Virtualenv and Fabric packages are updated to the versions listed below.
Dependencies
- Python: >=2.5, python >=2.6 recommended
- Pip >= 0.8.2
- Fabric >=1.0.1
- VirtualEnv >= 1.6.1
Pip is required for installing Fabric and a useful tool to install Virtualenv
Install Fabric and Virtualenv
Note: the use of pip to install system packages is not recommended, please use your system's package manager to install Virtualenv and Fabric.
Install with Fabric
- Either download and unpack the latest release, or check it out from the repository:
- Switch to project directory
- Run Fabric to automatically create python virtual environment with required dependencies. Choose either production or development environment
- Activate virtual environment
Configuration
- In the project root, you'll find a default-settings file called settings.py.dist. Copy it to settings.py:
- If you want to use another database engine besides the default SQLite (not recommended for production), edit settings.py, and edit the following lines to reflect your wishes (note that postgresql is not supported at this time and the install will fail, see issue #3237):
- Initialize Database:
- Build the search indexes
Note: running ./manage.py update_index on a regular basis ensures that the search indexes stay up-to-date when models change in Ganeti Web Manager.
- Everything should be all set up! Run the development server with:
Additional configuration for production servers:
Deploying a production server requires additional setup steps.
- Change the ownership of the
whoosh_index
directory to apache
- Change your SECRET_KEY and WEB_MGR_API_KEY to unique (and hopefully unguessable) strings in your settings.py.
- Configure the Django Cache Framework to use a production capable backend in settings.py. By default Ganeti Web Manager is configured to use the LocMemCache but it is not recommended for production. Use Memcached or a similar backend.
- For versions >= 0.5 you may need to add the full filesystem path to your templates directory to
TEMPLATE_DIRS
and remove the relative reference to'templates'
. We've had issues using wsgi not working correctly unless this change has been made. - Ensure the server has the ability to send emails or you have access to an SMTP server. Set
EMAIL_HOST
,EMAIL_PORT
, andDEFAULT_FROM_EMAIL
in settings.py. For more complicated outgoing mail setups, please refer to the django email documentation. - Follow the django guide to deploy with apache. Here is an example mod_wsgi file:
- Enable the periodic cache updater.
NOTE: Do not run the cache updater asroot
.
You may encounter an issue where twisted fails to start and gives you an error.
This is usually caused by the environment variable PYTHONPATH not being
exported correctly if you switch to superuser 'su -'. To fix it type:
Thenexit
out of root. - Set VNC_PROXY to the hostname of your VNC AuthProxy server in settings.py. The VNC AuthProxy does not need to run on the same server as Ganeti Web Manager.
https://code.osuosl.org/projects/ganeti-webmgr/wiki/Installation
http://downloads.ganeti.org/releases/
https://github.com/simplecloud/noVNC
https://github.com/genyiwang/simplecloud