Skip to content

Instantly share code, notes, and snippets.

@pbanaszkiewicz
Last active December 21, 2015 00:59
Show Gist options
  • Save pbanaszkiewicz/6224698 to your computer and use it in GitHub Desktop.
Save pbanaszkiewicz/6224698 to your computer and use it in GitHub Desktop.
Ganeti Web Manager ``setup.sh`` installation script

Ganeti Web Manager installation

(You can watch the progress here.)

Proposed setup.sh installation script for GWM would:

  1. detect user's operating system (Debian or CentOS)
  2. install system dependencies (Python, python-virtualenv) via user's OS default package managers (apt or yum) [this will require sudo]
  3. create virtual environment in local directory (or in directory specified by user)
  4. install newest pip and setuptools in that virtual environment (it's needed for wheel packages below)
  5. install GWM dependencies into that virtual environment (some of them might need to be provided as wheel binary packages, because GWM users might not be allowed to have gcc & co. installed)
  6. install GWM itself into that virtual environment
  7. create configuration directory near that virtual environment with sane default settings in there
  8. install GWM tools (ie. /usr/bin/gwm*, like webserver or update utility) that use above configuration directory (for example through environment variable, like Django does with DJANGO_SETTINGS_MODULE)
  9. generate random SECRET_KEY (with read access only for GWM webserver)
  10. generate proper WSGI file for the project (that can work with custom directory and virtual environment)

Necessary GWM changes

  • GWM will need to be truly PyPI and pip compliant package
  • it will need to take into account different settings path (as mentioned above: via environment variable)
  • GWM will need to be easily WSGI-fied, so that a lightweight webserver can host it

Additional enhancements

  • ganeti-webmgr-tools package with webserver and/or some other tools will be needed
  • we'll need to provide wheel packages of GWM's binary dependencies (like PostgreSQL connection library)
  • we'll need to think of sane default settings for GWM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment