Prior to version 0.11, the preferred way of installing Ganeti Web Manager was by using
fabric. It is no longer a default way of installing Ganeti Web Manager. If
you have older Ganeti Web Manager, look at these instructions.
This instruction covers installation steps for end users. It is not intended for Ganeti Web Manager developers or people installing unstable version. If you want to play with unstable Ganeti Web Manager, please follow instructions for developers.
Installation is now automatic. There is now a shell script detects your operating system, installs required dependencies (even for your database of choice!), creates Python virtual environment and finally installs Ganeti Web Manager with its own dependencies.
Make sure that all Ganeti Web Manager‘s Requirements are met.
Next you need the latest release of Ganeti Web Manager which is 0.11.1. You can download that here: https://github.com/osuosl/ganeti_webmgr/archive/0.11.1.tar.gz. You can also clone the repo and checkout the latest tag as well:
$ git clone https://github.com/osuosl/ganeti_webmgr.git $ git checkout $VERSION
Replace $VERSION with the version you want to deploy, such as 0.11.1
It doesn’t actually matter where you put these, it will only be used for installation, which will eventually install the project to another location, which by default is
Once you’ve got the project, you will use our shell script to install things. First, cd to the Ganeti Web Manager project folder:
$ cd ./ganeti_webmgr
./scripts/setup.sh -hto get help and see all possible usages of our shell script. There are different options for installing to different locations, as well as installing different database dependencies.
Now that you’ve looked at the options, you’ll want to actuall install Ganeti Web Manager. By default, it will install to
/opt/ganeti_webmgrand will not install any database dependencies. To do this install run the following:
If you want to install Ganeti Web Manager with mysql support, which means installing your systems mysql-client libraries, development headers, and the python mysql package run:
$ ./scripts/setup.sh -D mysql
You will likely need to run this as root as it requires permissions to install packages and create directories in
VNC AuthProxy startup script¶
Ganeti Web Manager provides an in-browser VNC console. For more information, see VNC. In order to use the VNC console, you must run VNC AuthProxy, which comes with Ganeti Web Manager.
VNC AuthProxy can be set up to start on boot if wanted. To do so, it is necessary to set up an init script to manage the daemon. These vary by platform, so depending on what kind of system you are running Ganeti Web Manager on, there are a few choices.
CentOS and Ubuntu¶
These scripts were written for CentOS 6.5 and Ubuntu 12.04.
If you are running CentOS, copy the file
/etc/init.d/vncauthproxy and install the service:
$ sudo cp /path/to/gwm/source/scripts/vncauthproxy/init-centos /etc/init.d/vncauthproxy $ sudo chkconfig --add vncauthproxy
Otherwise, if you are running Ubuntu, copy the file
install the service:
$ sudo cp /path/to/gwm/scripts/vncauthproxy/init-ubuntu /etc/init.d/vncauthproxy $ sudo update-rc.d vncauthproxy defaults
vncauthproxy service is installed and can be started:
$ sudo service vncauthproxy start
For systems running
systemd, a basic systemd script is provided. It
has been tested on Debian 8.
Copy the file
/lib/systemd/system/vncauthproxy.service and enable the service:
$ sudo cp /path/to/gwm/scripts/vncauthproxy/init-systemd /lib/systemd/system/vncauthproxy.service $ sudo systemctl enable vncauthproxy
The script supports variables for PIDFILE, LOGFILE, PORT, and INTERFACE, which can be set in ‘/etc/defaults/vncauthproxy’.
To set the location of the
twistd daemon to somewhere other than
/opt/ganeti_webmgr/bin/twistd, it is at this time necessary to modify the
service file directly.
There are defaults for most settings, however, there are no defaults set for database settings. Make sure to set these or you will run into problems with the rest of the installation.
See configuration page for documentation on configuring Ganeti Web Manager.
Because your Ganeti Web Manager instance lives within virtual environment, you must activate the virtual environment in order to access GWM:
$ source /opt/ganeti_webmgr/bin/activate
Now all the programs installed to that virtual environment are available for
you (until you issue
deactivate or close your terminal session).
We’ll be using the
django-admin.py tool to run commands to administer our
app from this point forward. You might be familiar with
manage.py, which is
django-admin.py is. However, we need to tell
django-admin.py what settings to use, in order for it to work. To do this
run the following command:
$ export DJANGO_SETTINGS_MODULE="ganeti_webmgr.ganeti_web.settings"
You only need to run this once each time you activate the virtual environment,
or if you prefer, each time you run
django-admin.py you can provided the
$ django-admin.py $CMD --settings "ganeti_webmgr.ganeti_web.settings"
Replace $CMD with the command you actually need to run. Also note that
--settings flag must come after the $CMD being run.
MySQL or SQLite: create new tables and migrate all applications using South:
$ django-admin.py syncdb --migrate
PostgreSQL: only fresh installation supports PostgreSQL, because there are no migrations for this database within Ganeti Web Manager prior to version 0.11:
$ django-admin.py syncdb --all $ django-admin.py migrate --fake
Prior to version 0.11 when migrations were run, we would automatically update the cache of RAPI data in the Database, however running this during migrations was prone to a lot of errors, so it is now its own command. Run the following to update the cache:
$ django-admin.py refreshcache
New in version 0.11.
Build them with:
$ django-admin.py rebuild_index
django-admin.py update_index on a regular basis ensures that the search indexes stay up-to-date when models change in Ganeti Web Manager.