Skip to content

Nova Unified Install System

piken edited this page Nov 8, 2010 · 14 revisions

#Nova Unified Install System Specification

##Goals

The goals of the unified installer are as follows:

  1. Single installer for all linux based distributions

  2. Ease of installer maintenance for multiple distributions and releases.

  3. Dependency free Python that uses only base Python modules until system specific components are loaded.

##Dependencies

  • Python >= 2.4.0
  • Bazaar >= 1.6
  • Internet access

Command line package managers or python-*

TBD: Use command line package managers like apt-get or yum, or use python-apt and python-yast.

(Both will be scalable for most linux distros as apt, emerge, ports, yum, and yast all use python as their core and have a python-* module for them.)

##Command line parameters:

Usage: nova.py [OPTIONS] [distribution:release]

Options:
  --help                           Show this help information
  --libvirt_type=qemu|xen|uml      Set libvirt-type to use - Default:qemu
  --logging=info|warning|error     Set the Python log level.
  --manifest_host=host             Set host for manifest retrieval
  --network_interface=interface    Set the Network Interface - Deafult:eth0
  --test_install                   Run tests after install
  --use_branch=branch              Set a Nova Branch to use - Deafult: lp:nova
  --with_ldap                      Use LDAP Authentication
  --with_mysql                     Use MySQL with Nova
  --with_mysql_host=hostname       Set the MySQL Hostname - Default:localhost
  --with_mysql_password=password   Set the MySQL Password - Default:nova
  --with_mysql_user=username       Set the MySQL Username - Default:nova

I am looking to make this as a complete command line parsing class that can be extracted as a stand alone class if needed. It will parse options along with printing --help for the application.

Example:

nova-install --with-mysql --manifest-host=https://github.com/piken/unified-install/raw/master/src ubuntu:10.04

##Logging

Currently logging will be to stdout on the terminal that it is running from. I am working out support for logical logging out put along with command line options for logging to a file instead of to the terminal for scripted remote installations.

Manifest Structure

Global Manifest

The global manifest is a JSON file that stores the list of distributions, release versions, and basename of the distributions manifest file. This is read at the creation of the ManifestImporter object in order to prepare for the import of a distributions manifest file.

Example creation of the ManifestImporter object.

    def main():
        mi = ManifestImporter()
        print mi.global_manifest

    if __name__ == "__main__":
    main()

JSON Format of manifest.global:

    {
    "<distribution_name>":{
        "release":["<version>"],
        "manifest":"<manifest basename>"
        }
    }

Example manifest.global with only a ubuntu entry:

   {
        "ubuntu":{
        "release":["10.04","10.10"],
        "manifest":"manifest.ubuntu."
        }
    }

Distribution Manifest

The distribution manifest is a JSON file that stores the install manifest for a distribution. This will have the package manager command, url to the nova repo to use, extra package repositories for the package manager, dependency lists (package manager, easy-install, and custom builds), and custom config steps.

Example creation of the ManifestImporter object.

    def main():
        mi = ManifestImporter()
        manifest = mi.ManifestImport()
        print manifest

    if __name__ == "__main__":
    main()

Distribution manifest json structure:

{
    "distroPckMgr":"",
    "novaUrl":"",
    "repositories":[],
    "dependencies":{
        "PckMgr":{
            "<order number>":[],
            },
        "easy-install-2.6":[],
        "build":[]
        },
    "config-steps":{
        "<order number>":[]
    }
}

Example manifest.ubuntu.10.10 (Far from complete manifest)

{
    "distroPckMgr":"apt-get",
    "novaUrl":"lp:nova",
    "repositories":[
            "ppa:nova-core/ppa"
        ],
    "dependencies":{
        "PckMgr":{
            "1":["python-software-properties"],
            "2":["dnsmasq","open-iscsi","kpartx","kvm","gawk","iptables","ebtables"],
            "3":["user-mode-linux","kvm","libvirt-bin"],
            "4":["screen","iscsitarget","euca2ools","vlan","curl","rabbitmq-server"],
            "5":["python-twisted","python-sqlalchemy","python-mox","python-greenlet","python-carrot"],
            "6":["python-daemon","python-eventlet","python-gflags","python-tornado","python-ipy"],
            "7":["python-libvirt","python-libxml2","python-routes"],
            "8":["mysql-server","python-mysqldb"]
            },
        "easy-install-2.6":[],
        "build":[]
        },
    "config-steps":{
        "3":["modprobe kvm; /etc/init.d/libvirt-bin restart"]
    }
}