Installation

Warning

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.

Installing

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.

  1. Make sure that all Ganeti Web Manager’s Requirements are met.

  2. 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
    

Note

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 /opt/ganeti_webmgr.

  1. 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
    

    Next run ./scripts/setup.sh -h to 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.

  2. 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_webmgr and will not install any database dependencies. To do this install run the following:

    $ ./scripts/setup.sh
    

    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
    

Note

You will likely need to run this as root as it requires permissions to install packages and create directories in /opt.

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

Important

These scripts were written for CentOS 6.5 and Ubuntu 12.04.

If you are running CentOS, copy the file scripts/vncauthproxy/init-centos to /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 scripts/vncauthproxy/init-ubuntu to /etc/init.d/vncauthproxy and install the service:

$ sudo cp /path/to/gwm/scripts/vncauthproxy/init-ubuntu /etc/init.d/vncauthproxy
$ sudo update-rc.d vncauthproxy defaults

The vncauthproxy service is installed and can be started:

$ sudo service vncauthproxy start

systemd

For systems running systemd, a basic systemd script is provided. It has been tested on Debian 8.

Copy the file scripts/vncauthproxy/init-systemd to /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.

Minimum Configuration

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.

Initializing

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 essentially what 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 --settings argument:

$ django-admin.py $CMD --settings "ganeti_webmgr.ganeti_web.settings"

Note

Replace $CMD with the command you actually need to run. Also note that the --settings flag must come after the $CMD being run.

Initialize database

  • 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
    

Update Cache

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.

Search indexes

Build them with:

$ django-admin.py rebuild_index

Note

Running 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.

Next Steps

Congratulations! Ganeti Web Manager is now installed and initialized. Next, you’ll want to look into Configuring and Deployment Intro, if you are going to be setting up a production instance.

Otherwise, if you just want to play around with Ganeti Web Manager, or are developing, take a look at the Development Server.