# 1 Objectives

Install and use the Ganeti Web Manager.

# 2 Choose server

You could choose to install GWM on a server separate from your Ganeti nodes, or you could install it inside a VM. If it is installed in a VM it needs to be connected to your management network or able to route traffic there.

It's not a good idea to install it directly on the host server, but for the purposes of this host it is sufficient; or if you have a running Debian VM instance you can install it there.

# 3 Choose hostname

Ganeti web manager is best installed in its own virtual host with its own domain name. In this example we will use "hostX.ws.nsrc.org", but replace it with your own hostname.

The DNS must be set up so that this name resolves to the IP address of the server running ganeti web manager. (If you are installing into a VM instance, check with the instructors that the IP you are using has a resolvable hostname in the DNS)

# 4 Installation

Ganeti Web Manager is a python/django web application, and is a little tricky to install and deploy the first time.

As there is no installable package, you will have to install from source. These instructions are suitable for an Ubuntu or Debian host.

Note: don't follow the instructions on the osuosl.org wiki as these are stale. The current documentation is at

readthedocs.org

The instructions below are for Ganeti Web Manager v. 0.11rc1.

For this exercise you should be root. It's also helpful for debugging if you log your entire session into a file.

# 7 Troubleshooting

Things may not have gone smoothly! If you get an error when you try to access Ganeti Web Manager in the browser, take a look at the steps below.

## 7.1 Errors seen at the console

• If you get a python error involving AES keys then ensure that the two random keys you generated in config.yml are exactly 16, 24 or 32 characters long.

• If you get a python error about getlocale returning null then try typing

export LANG=en_US

and then re-run the command which gave the error.

• Other locale errors can be fixed by:

apt-get install locales
vi /etc/locale.gen   # uncomment the line "en_US.UTF-8 UTF-8" and save
locale-gen
update-locale LANG="en_US.UTF-8" LANGUAGE="en_US:en"
• If you forget the mysql password which you gave to the ganeti_webmgr account, you can reset it using the mysql root password.

# mysql -u root -p
<< enter the mysql root password >>

mysql> set password for 'ganeti_webmgr'@'localhost' = PASSWORD('SomePassWord');
mysql> exit;

If you have forgotten the mysql root password, follow these instructions

## 7.2 Errors seen in the browser

• If you get "Internal Server Error" then start by looking at /var/log/apache2/ganeti-error.log - the problem may be with the length of the SECRET_KEY and WEB_MGR_API_KEY keys, which must be 16, 24 or 32 characters as stated above.

• If you still get the default webserver page, then edit /etc/apache2/sites-available/default and insert the following line after <VirtualHost *:80>

ServerName localhost

Then reload apache (service apache2 reload)

• If you get an error involving sqlite3 then you probably forgot to change the ENGINE value in config.yml. Go back, change this setting, then re-run the commands under the heading "Populate the database"

• If you get a login page but the username/password does not work, you can (re)create the user account using

# cd /opt/ganeti_webmgr
# django-admin.py createsuperuser

Note: consult the configuration settings page for a list of supported settings you can adjust on Ganeti Web Manager.