Setup script

As part of Google Summer of Code 2013 work, Ganeti Web Manager gained better internal structure and important feature, which is being a Python package.

This will ensure that future users of Ganeti Web Manager can install it easily with Python tools like pip.

What’s even more important is that we created an installation script for your convenience.


Take a look at installation instructions to see how you should install Ganeti Web Manager.

The script can be located in the scripts/ folder at the root of the Ganeti Web Manager project folder.


What this script does:

  1. Detects operating system (only Ubuntu, Debian and CentOS are supported) and it’s architecture.
  2. Installs system dependencies (Python, python-virtualenv) via user’s OS default package manager (apt or yum) [requires sudo priviledge].
  3. Creates virtual environment in local directory (or in directory specified by user).
  4. Installs newest pip, setuptools and wheel Python packages into that virtual environment.
  5. Installs Ganeti Web Manager and it’s dependencies from OSUOSL servers ( into that virtual environment. These packages are provided as .whl packages, ie. binary compiled packages. That helps speeding up installation time and requires no compilation on end user’s side.


If you happen to have different operating system from these supported by OSUOSL, you should not install .whl packages from OSUOSL servers. They’re compiled against these specific operating systems and their behavior on other systems / architectures might by unpredictable.


This script does not auto-configure your installation. You have to manually do this.

Database requirements

Depending on your operating system, different packages are needed for different database servers.

  • MySQL: libmysqlclient18 on Ubuntu/Debian, or mysql-libs on CentOS
  • PostgreSQL: libpq5 on Ubuntu/Debian, or postgresql-libs on CentOS

These dependencies are required for MySQL-python and psycopg2 Python packages to work.

The script will get appropriate packages for you, unless you use -N flag. For more information, take a look at Command line arguments.


Command line arguments

-d <install directory>

Directory for the virtual environment.

-w <wheels (local/remote) directory location>

Wheel packages are read from that path. The path can be either local (eg. ./gwm/wheels) or remote (eg.

This also assumes the directory structure for the wheels package is structured according to how the Dependencies building script structures files.


Don’t change it unless you know what you’re doing!

-D <database server>

If you provide postgresql or mysql, the script will try to install system and Python dependencies for selected database, unless -N flag is set.


Skip installing system dependencies. You want to use this flag if you either don’t trust this script or if you have unsupported operating system.


When -N flag isn’t provided, the script will run sudo to get user’s permission to install some system dependencies.

-p <http proxy url>

If you provide an HTTP proxy URL, pip will use this proxy to install all of the required packages.

-u <install directory>

Upgrade existing installation. Point the script to directory being a virtual environment, ie. containing bin/pip (which is required in order to upgrade).


Display help.


Run with default settings:

$ ./scripts/

Install PostgreSQL:

$ ./scripts/ -d ./gwm -D postgresql

Skip installing system dependencies:

$ ./scripts/ -N

Upgrade existing installation:

$ ./scripts/ -u ./existing_gwm

Generate wheels on your own with building script:

$ ./scripts/ -e ./venv_whl -w ./wheels
$ ./scripts/ -d ./ganeti_webmgr -w ./wheels

or send wheels to remote location and install from it:

$ ./scripts/ -e ./venv_whl -w ./wheels
$ rsync ./wheels
$ ./scripts/ -d ./ganeti_webmgr -w

Directory structure

After installing Ganeti Web Manager via this is what you get:

├── bin
├── config
├── include
│   └── ...
├── lib
│   └── ...
└── local
    └── ...

Directories bin, include, lib or local are Virtual environment specific - don’t bother about them. The directory config on the other hand is important to you: this is where your Ganeti Web Manager configuration resides.


Can’t run permission denied

This script needs to be executable, you can make it by issuing this command:

$ chmod +x ./scripts/