Exemple #1
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding Openstack QPID configuration")
    paramsList = [
                  {"CMD_OPTION"      : "qpid-host",
                   "USAGE"           : "The IP address of the server on which to install the QPID service",
                   "PROMPT"          : "Enter the IP address of the QPID service",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_QPID_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "QPIDLANCE",
                  "DESCRIPTION"           : "QPID Config parameters",
                  "PRE_CONDITION"         : "CONFIG_NOVA_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #2
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Glance configuration")
    paramsList = [
        {
            "CMD_OPTION": "glance-host",
            "USAGE": "The IP address of the server on which to install Glance",
            "PROMPT": "Enter the IP address of the Glance server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_GLANCE_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "glance-db-passwd",
            "USAGE": "The password to use for the Glance to access DB",
            "PROMPT": "Enter the password for the Glance DB access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_GLANCE_DB_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "glance-ks-passwd",
            "USAGE":
            "The password to use for the Glance to authenticate with Keystone",
            "PROMPT": "Enter the password for the Glance Keystone access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_GLANCE_KS_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "GLANCE",
        "DESCRIPTION": "Glance Config parameters",
        "PRE_CONDITION": "CONFIG_GLANCE_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Horizon configuration")
    paramsList = [
                  {"CMD_OPTION"      : "os-horizon-host",
                   "USAGE"           : "The IP address of the server on which to install Horizon",
                   "PROMPT"          : "Enter the IP address of the Horizon server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_HORIZON_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "OSHORIZON",
                  "DESCRIPTION"           : "OpenStack Horizon Config parameters",
                  "PRE_CONDITION"         : "CONFIG_HORIZON_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #4
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack QPID configuration")
    paramsList = [
        {
            "CMD_OPTION": "qpid-host",
            "USAGE":
            "The IP address of the server on which to install the QPID service",
            "PROMPT": "Enter the IP address of the QPID service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_QPID_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "QPIDLANCE",
        "DESCRIPTION": "QPID Config parameters",
        "PRE_CONDITION": "CONFIG_NOVA_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
Exemple #5
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Client configuration")
    paramsList = [
        {
            "CMD_OPTION": "osclient-host",
            "USAGE":
            "The IP address of the server on which to install the OpenStack client packages. An admin \"rc\" file will also be installed",
            "PROMPT": "Enter the IP address of the client server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_OSCLIENT_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "NOVACLIENT",
        "DESCRIPTION": "NOVACLIENT Config parameters",
        "PRE_CONDITION": "CONFIG_CLIENT_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Client configuration")
    paramsList = [
                  {"CMD_OPTION"      : "osclient-host",
                   "USAGE"           : "The IP address of the server on which to install the OpenStack client packages. An admin \"rc\" file will also be installed",
                   "PROMPT"          : "Enter the IP address of the client server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_OSCLIENT_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "NOVACLIENT",
                  "DESCRIPTION"           : "NOVACLIENT Config parameters",
                  "PRE_CONDITION"         : "CONFIG_CLIENT_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #7
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Glance configuration")
    paramsList = [
        {
            "CMD_OPTION": "glance-host",
            "USAGE": "The IP address of the server on which to install Glance",
            "PROMPT": "Enter the IP address of the Glance server",
            "OPTION_LIST": [],
            "VALIDATORS": [validate.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_GLANCE_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False,
        },
        {
            "CMD_OPTION": "glance-db-passwd",
            "USAGE": "The password to use for the Glance to access DB",
            "PROMPT": "Enter the password for the Glance DB access",
            "OPTION_LIST": [],
            "VALIDATORS": [validate.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_GLANCE_DB_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False,
        },
        {
            "CMD_OPTION": "glance-ks-passwd",
            "USAGE": "The password to use for the Glance to authenticate with Keystone",
            "PROMPT": "Enter the password for the Glance Keystone access",
            "OPTION_LIST": [],
            "VALIDATORS": [validate.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_GLANCE_KS_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False,
        },
    ]

    groupDict = {
        "GROUP_NAME": "GLANCE",
        "DESCRIPTION": "Glance Config parameters",
        "PRE_CONDITION": "CONFIG_GLANCE_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True,
    }

    controller.addGroup(groupDict, paramsList)
Exemple #8
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding Openstack Cinder configuration")
    paramsList = [
                  {"CMD_OPTION"      : "cinder-host",
                   "USAGE"           : "The IP address of the server on which to install Cinder",
                   "PROMPT"          : "Enter the IP address of the Cinder server",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_CINDER_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-db-passwd",
                   "USAGE"           : "The password to use for the Cinder to access DB",
                   "PROMPT"          : "Enter the password for the Cinder DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-ks-passwd",
                   "USAGE"           : "The password to use for the Cinder to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Cinder Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "CINDER",
                  "DESCRIPTION"           : "Cinder Config parameters",
                  "PRE_CONDITION"         : "CONFIG_CINDER_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding MySQL OpenStack configuration")
    paramsList = [
                  {"CMD_OPTION"      : "mysql-host",
                   "USAGE"           : "The IP address of the server on which to install MySQL",
                   "PROMPT"          : "Enter the IP address of the MySQL server",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_MYSQL_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "mysql-user",
                   "USAGE"           : "Username for the MySQL admin user",
                   "PROMPT"          : "Enter the username for the MySQL admin user",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : "root",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_MYSQL_USER",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "mysql-pw",
                   "USAGE"           : "Password for the MySQL admin user",
                   "PROMPT"          : "Enter the password for the MySQL admin user",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_MYSQL_PW",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "MYSQL",
                  "DESCRIPTION"           : "MySQL Config parameters",
                  "PRE_CONDITION"         : utils.returnYes,
                  "PRE_CONDITION_MATCH"   : "yes",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #10
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding MySQL OpenStack configuration")
    paramsList = [
                  {"CMD_OPTION"      : "mysql-host",
                   "USAGE"           : "The IP address of the server on which to install MySQL",
                   "PROMPT"          : "Enter the IP address of the MySQL server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_MYSQL_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "mysql-user",
                   "USAGE"           : "Username for the MySQL admin user",
                   "PROMPT"          : "Enter the username for the MySQL admin user",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : "root",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_MYSQL_USER",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "mysql-pw",
                   "USAGE"           : "Password for the MySQL admin user",
                   "PROMPT"          : "Enter the password for the MySQL admin user",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_MYSQL_PW",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "MYSQL",
                  "DESCRIPTION"           : "MySQL Config parameters",
                  "PRE_CONDITION"         : utils.returnYes,
                  "PRE_CONDITION_MATCH"   : "yes",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #11
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Nagios configuration")
    paramsList = [
        {
            "CMD_OPTION": "nagios-host",
            "USAGE":
            "The IP address of the server on which to install the Nagios server",
            "PROMPT": "Enter the IP address of the Nagios server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NAGIOS_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "nagios-passwd",
            "USAGE":
            "The password of the nagiosadmin user on the Nagios server",
            "PROMPT": "Enter the password for the nagiosadmin user",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NAGIOS_PW",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "NAGIOS",
        "DESCRIPTION": "Nagios Config parameters",
        "PRE_CONDITION": "CONFIG_NAGIOS_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
Exemple #12
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Nagios configuration")
    paramsList = [
                  {"CMD_OPTION"      : "nagios-host",
                   "USAGE"           : "The IP address of the server on which to install the Nagios server",
                   "PROMPT"          : "Enter the IP address of the Nagios server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NAGIOS_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "nagios-passwd",
                   "USAGE"           : "The password of the nagiosadmin user on the Nagios server",
                   "PROMPT"          : "Enter the password for the nagiosadmin user",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NAGIOS_PW",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "NAGIOS",
                  "DESCRIPTION"           : "Nagios Config parameters",
                  "PRE_CONDITION"         : "CONFIG_NAGIOS_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #13
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject

    paramsList = [
                  {"CMD_OPTION"      : "novaapi-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova API service",
                   "PROMPT"          : "Enter the IP address of the Nova API service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ip, validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_API_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacert-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Cert service",
                   "PROMPT"          : "Enter the IP address of the Nova Cert service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_CERT_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novavncproxy-hosts",
                   "USAGE"           : "The IP address of the server on which to install the Nova VNC proxy",
                   "PROMPT"          : "Enter the IP address of the Nova VNC proxy",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_VNCPROXY_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacompute-hosts",
                   "USAGE"           : "A comma separated list of IP addresses on which to install the Nova Compute services",
                   "PROMPT"          : "Enter a comma separated list of IP addresses on which to install the Nova Compute services",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_multi_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_COMPUTE_HOSTS",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacompute-privif",
                   "USAGE"           : "Private interface for Flat DHCP on the Nova compute servers",
                   "PROMPT"          : "Enter the Private interface for Flat DHCP on the Nova compute servers",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : "eth1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_COMPUTE_PRIVIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Network service",
                   "PROMPT"          : "Enter the IP address of the Nova Network service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ip, validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novaconductor-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Conductor service",
                   "PROMPT"          : "Enter the IP address of the Nova Conductor service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ip, validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_CONDUCTOR_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "nova-db-passwd",
                   "USAGE"           : "The password to use for the Nova to access DB",
                   "PROMPT"          : "Enter the password for the Nova DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_NOVA_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "nova-ks-passwd",
                   "USAGE"           : "The password to use for the Nova to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Nova Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_NOVA_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-pubif",
                   "USAGE"           : "Public interface on the Nova network server",
                   "PROMPT"          : "Enter the Public interface on the Nova network server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : "eth0",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_PUBIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-privif",
                   "USAGE"           : "Private interface for Flat DHCP on the Nova network server",
                   "PROMPT"          : "Enter the Private interface for Flat DHCP on the Nova network server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : "eth1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_PRIVIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-fixed-range",
                   "USAGE"           : "IP Range for Flat DHCP",
                   "PROMPT"          : "Enter the IP Range for Flat DHCP",
                   "OPTION_LIST"     : ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
                   "VALIDATORS"      : [validators.validate_regexp],
                   "DEFAULT_VALUE"   : "192.168.32.0/22",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_FIXEDRANGE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-floating-range",
                   "USAGE"           : "IP Range for Floating IP's",
                   "PROMPT"          : "Enter the IP Range for Floating IP's",
                   "OPTION_LIST"     : ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
                   "VALIDATORS"      : [validators.validate_regexp],
                   "DEFAULT_VALUE"   : "10.3.4.0/22",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_FLOATRANGE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novasched-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Scheduler service",
                   "PROMPT"          : "Enter the IP address of the Nova Scheduler service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_SCHED_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novasched-cpu-allocation-ratio",
                   "USAGE"           : "The overcommitment ratio for virtual to physical CPUs. "
                                       "Set to 1.0 to disable CPU overcommitment",
                   "PROMPT"          : "Enter the CPU overcommitment ratio. "
                                       "Set to 1.0 to disable CPU overcommitment",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_float],
                   "DEFAULT_VALUE"   : 16.0,
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novasched-ram-allocation-ratio",
                   "USAGE"           : "The overcommitment ratio for virtual to physical RAM. "
                                       "Set to 1.0 to disable RAM overcommitment",
                   "PROMPT"          : "Enter the RAM overcommitment ratio. "
                                       "Set to 1.0 to disable RAM overcommitment",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_float],
                   "DEFAULT_VALUE"   : 1.5,
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]
    groupDict = { "GROUP_NAME"            : "NOVA",
                  "DESCRIPTION"           : "Nova Options",
                  "PRE_CONDITION"         : "CONFIG_NOVA_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}
    controller.addGroup(groupDict, paramsList)
Exemple #14
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject

    paramsList = [
                  {"CMD_OPTION"      : "novaapi-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova API service",
                   "PROMPT"          : "Enter the IP address of the Nova API service",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_API_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacert-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Cert service",
                   "PROMPT"          : "Enter the IP address of the Nova Cert service",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_CERT_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novavncproxy-hosts",
                   "USAGE"           : "The IP address of the server on which to install the Nova VNC proxy",
                   "PROMPT"          : "Enter the IP address of the Nova VNC proxy",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_VNCPROXY_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacompute-hosts",
                   "USAGE"           : "A comma separated list of IP addresses on which to install the Nova Compute services",
                   "PROMPT"          : "Enter a comma separated list of IP addresses on which to install the Nova Compute services",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateMultiSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_COMPUTE_HOSTS", # TO-DO: Create processor for CSV
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novacompute-privif",
                   "USAGE"           : "Private interface for Flat DHCP on the Nova compute servers",
                   "PROMPT"          : "Enter the Private interface for Flat DHCP on the Nova compute servers",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : "eth1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_COMPUTE_PRIVIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Network service",
                   "PROMPT"          : "Enter the IP address of the Nova Network service",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "nova-db-passwd",
                   "USAGE"           : "The password to use for the Nova to access DB",
                   "PROMPT"          : "Enter the password for the Nova DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_NOVA_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "nova-ks-passwd",
                   "USAGE"           : "The password to use for the Nova to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Nova Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_NOVA_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-pubif",
                   "USAGE"           : "Public interface on the Nova network server",
                   "PROMPT"          : "Enter the Public interface on the Nova network server",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : "eth0",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_PUBIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-privif",
                   "USAGE"           : "Private interface for Flat DHCP on the Nova network server",
                   "PROMPT"          : "Enter the Private interface for Flat DHCP on the Nova network server",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateStringNotEmpty,
                   "DEFAULT_VALUE"   : "eth1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_PRIVIF",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-fixed-range",
                   "USAGE"           : "IP Range for Flat DHCP",
                   "PROMPT"          : "Enter the IP Range for Flat DHCP",
                   "OPTION_LIST"     : ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
                   "VALIDATION_FUNC" : validate.validateRe,
                   "DEFAULT_VALUE"   : "192.168.32.0/22",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_FIXEDRANGE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novanetwork-floating-range",
                   "USAGE"           : "IP Range for Floating IP's",
                   "PROMPT"          : "Enter the IP Range for Floating IP's",
                   "OPTION_LIST"     : ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
                   "VALIDATION_FUNC" : validate.validateRe,
                   "DEFAULT_VALUE"   : "10.3.4.0/22",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_NETWORK_FLOATRANGE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "novasched-host",
                   "USAGE"           : "The IP address of the server on which to install the Nova Scheduler service",
                   "PROMPT"          : "Enter the IP address of the Nova Scheduler service",
                   "OPTION_LIST"     : [],
                   "VALIDATION_FUNC" : validate.validateSSH,
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "PROCESSOR_ARGS"  : {"allow_localhost": True},
                   "PROCESSOR_FUNC"  : process.processHost,
                   "PROCESSOR_MSG"   : "WARN_VAL_IS_HOSTNAME",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_NOVA_SCHED_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]
    groupDict = { "GROUP_NAME"            : "NOVA",
                  "DESCRIPTION"           : "Nova Options",
                  "PRE_CONDITION"         : "CONFIG_NOVA_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}
    controller.addGroup(groupDict, paramsList)
Exemple #15
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Keystone configuration")
    paramsList = [
        {
            "CMD_OPTION": "keystone-host",
            "USAGE":
            "The IP address of the server on which to install Keystone",
            "PROMPT": "Enter the IP address of the Keystone server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_KEYSTONE_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "keystone-db-passwd",
            "USAGE": "The password to use for the Keystone to access DB",
            "PROMPT": "Enter the password for the Keystone DB access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_KEYSTONE_DB_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "keystone-admin-token",
            "USAGE": "The token to use for the Keystone service api",
            "PROMPT": "The token to use for the Keystone service api",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex,
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_TOKEN",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "keystone-admin-passwd",
            "USAGE": "The password to use for the Keystone admin user",
            "PROMPT": "Enter the password for the Keystone admin user",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "KEYSTONE",
        "DESCRIPTION": "Keystone Config parameters",
        "PRE_CONDITION": utils.returnYes,
        "PRE_CONDITION_MATCH": "yes",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
Exemple #16
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Cinder configuration")
    paramsList = [
                  {"CMD_OPTION"      : "cinder-host",
                   "USAGE"           : "The IP address of the server on which to install Cinder",
                   "PROMPT"          : "Enter the IP address of the Cinder server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_CINDER_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-db-passwd",
                   "USAGE"           : "The password to use for the Cinder to access DB",
                   "PROMPT"          : "Enter the password for the Cinder DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-ks-passwd",
                   "USAGE"           : "The password to use for the Cinder to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Cinder Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-volumes-create",
                   "USAGE"           : "Create Cinder's volumes group",
                   "PROMPT"          : "Should Cinder's volumes group be created?",
                   "OPTION_LIST"     : ["y", "n"],
                   "VALIDATORS"      : [validate.validate_options],
                   "DEFAULT_VALUE"   : "y",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_VOLUMES_CREATE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "CINDER",
                  "DESCRIPTION"           : "Cinder Config parameters",
                  "PRE_CONDITION"         : "CONFIG_CINDER_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)

    paramsList = [
                  {"CMD_OPTION"      : "cinder-volumes-size",
                   "USAGE"           : "Cinder's volumes group size",
                   "PROMPT"          : "Enter Cinder's volumes group size",
                   "OPTION_LIST"     : [],
                   "VALIDATORS" : [validate.validate_not_empty],
                   "DEFAULT_VALUE"   : "20G",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_VOLUMES_SIZE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "CINDERVOLUMECREATE",
                  "DESCRIPTION"           : "Cinder volume create Config parameters",
                  "PRE_CONDITION"         : "CONFIG_CINDER_VOLUMES_CREATE",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #17
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Keystone configuration")
    paramsList = [
                  {"CMD_OPTION"      : "keystone-host",
                   "USAGE"           : "The IP address of the server on which to install Keystone",
                   "PROMPT"          : "Enter the IP address of the Keystone server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_KEYSTONE_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "keystone-db-passwd",
                   "USAGE"           : "The password to use for the Keystone to access DB",
                   "PROMPT"          : "Enter the password for the Keystone DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_KEYSTONE_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "keystone-admin-token",
                   "USAGE"           : "The token to use for the Keystone service api",
                   "PROMPT"          : "The token to use for the Keystone service api",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex,
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_KEYSTONE_ADMIN_TOKEN",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "keystone-admin-passwd",
                   "USAGE"           : "The password to use for the Keystone admin user",
                   "PROMPT"          : "Enter the password for the Keystone admin user",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_KEYSTONE_ADMIN_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "KEYSTONE",
                  "DESCRIPTION"           : "Keystone Config parameters",
                  "PRE_CONDITION"         : utils.returnYes,
                  "PRE_CONDITION_MATCH"   : "yes",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #18
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Swift configuration")
    paramsList = [
                  {"CMD_OPTION"      : "os-swift-proxy",
                   "USAGE"           : "The IP address on which to install the Swift proxy service",
                   "PROMPT"          : "Enter the IP address of the Swift proxy service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ip, validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_PROXY_HOSTS", #XXX: Shouldn't be here CONFIG_SWIFT_PROXY_HOST?
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-ks-passwd",
                   "USAGE"           : "The password to use for the Swift to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Swift Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_SWIFT_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage",
                   "USAGE"           : "A comma separated list of IP addresses on which to install the Swift Storage services, each entry should take the format <ipaddress>[/dev], for example 127.0.0.1/vdb will install /dev/vdb on 127.0.0.1 as a swift storage device(packstack does not create the filesystem, you must do this first), if /dev is omitted Packstack will create a loopback device for a test setup",
                   "PROMPT"          : "Enter the Swift Storage servers e.g. host/dev,host/dev",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty, validate_storage],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_HOSTS",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-zones",
                   "USAGE"           : "Number of swift storage zones, this number MUST be no bigger than the number of storage devices configured",
                   "PROMPT"          : "Enter the number of swift storage zones, MUST be no bigger than the number of storage devices configured",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_integer],
                   "DEFAULT_VALUE"   : "1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_ZONES",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-replicas",
                   "USAGE"           : "Number of swift storage replicas, this number MUST be no bigger than the number of storage zones configured",
                   "PROMPT"          : "Enter the number of swift storage replicas, MUST be no bigger than the number of storage zones configured",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_integer],
                   "DEFAULT_VALUE"   : "1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_REPLICAS",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-fstype",
                   "USAGE"           : "FileSystem type for storage nodes",
                   "PROMPT"          : "Enter FileSystem type for storage nodes",
                   "OPTION_LIST"     : ['xfs','ext4'],
                   "VALIDATORS"      : [validators.validate_options],
                   "DEFAULT_VALUE"   : "ext4",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_FSTYPE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "OSSWIFT",
                  "DESCRIPTION"           : "OpenStack Swift Config parameters",
                  "PRE_CONDITION"         : "CONFIG_SWIFT_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #19
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Horizon configuration")
    paramsList = [
        {
            "CMD_OPTION": "os-horizon-host",
            "USAGE":
            "The IP address of the server on which to install Horizon",
            "PROMPT": "Enter the IP address of the Horizon server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_HORIZON_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "os-horizon-ssl",
            "USAGE":
            "To set up Horizon communication over https set this to \"y\"",
            "PROMPT":
            "Would you like to set up Horizon communication over https",
            "OPTION_LIST": ["y", "n"],
            "VALIDATORS": [validators.validate_options],
            "DEFAULT_VALUE": "n",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_HORIZON_SSL",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "OSHORIZON",
        "DESCRIPTION": "OpenStack Horizon Config parameters",
        "PRE_CONDITION": "CONFIG_HORIZON_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)

    paramsList = [
        {
            "CMD_OPTION": "os-ssl-cert",
            "USAGE":
            "PEM encoded certificate to be used for ssl on the https server, leave blank if one should be generated, this certificate should not require a passphrase",
            "PROMPT":
            "Enter the path to a PEM encoded certificate to be used on thr https server, leave blank if one should be generated, this certificate should not require a passphrase",
            "OPTION_LIST": [],
            "VALIDATORS": [],
            "DEFAULT_VALUE": '',
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_SSL_CERT",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "os-ssl-key",
            "USAGE":
            "Keyfile corresponding to the certificate if one was entered",
            "PROMPT":
            "Enter the keyfile corresponding to the certificate if one was entered",
            "OPTION_LIST": [],
            "VALIDATORS": [],
            "DEFAULT_VALUE": "",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_SSL_KEY",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "OSSSL",
        "DESCRIPTION": "SSL Config parameters",
        "PRE_CONDITION": "CONFIG_HORIZON_SSL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
Exemple #20
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Horizon configuration")
    paramsList = [
                  {"CMD_OPTION"      : "os-horizon-host",
                   "USAGE"           : "The IP address of the server on which to install Horizon",
                   "PROMPT"          : "Enter the IP address of the Horizon server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_HORIZON_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-horizon-ssl",
                   "USAGE"           : "To set up Horizon communication over https set this to \"y\"",
                   "PROMPT"          : "Would you like to set up Horizon communication over https",
                   "OPTION_LIST"     : ["y", "n"],
                   "VALIDATORS"      : [validators.validate_options],
                   "DEFAULT_VALUE"   : "n",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_HORIZON_SSL",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "OSHORIZON",
                  "DESCRIPTION"           : "OpenStack Horizon Config parameters",
                  "PRE_CONDITION"         : "CONFIG_HORIZON_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)

    paramsList = [
                  {"CMD_OPTION"      : "os-ssl-cert",
                   "USAGE"           : "PEM encoded certificate to be used for ssl on the https server, leave blank if one should be generated, this certificate should not require a passphrase",
                   "PROMPT"          : "Enter the path to a PEM encoded certificate to be used on thr https server, leave blank if one should be generated, this certificate should not require a passphrase",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [],
                   "DEFAULT_VALUE"   : '',
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SSL_CERT",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-ssl-key",
                   "USAGE"           : "Keyfile corresponding to the certificate if one was entered",
                   "PROMPT"          : "Enter the keyfile corresponding to the certificate if one was entered",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [],
                   "DEFAULT_VALUE"   : "",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SSL_KEY",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "OSSSL",
                  "DESCRIPTION"           : "SSL Config parameters",
                  "PRE_CONDITION"         : "CONFIG_HORIZON_SSL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #21
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Cinder configuration")
    paramsList = [
                  {"CMD_OPTION"      : "cinder-host",
                   "USAGE"           : "The IP address of the server on which to install Cinder",
                   "PROMPT"          : "Enter the IP address of the Cinder server",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_CINDER_HOST",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-db-passwd",
                   "USAGE"           : "The password to use for the Cinder to access DB",
                   "PROMPT"          : "Enter the password for the Cinder DB access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_DB_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-ks-passwd",
                   "USAGE"           : "The password to use for the Cinder to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Cinder Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "cinder-volumes-create",
                   "USAGE"           : ("Create Cinder's volumes group. This should only be done for "
                                        "testing on a proof-of-concept installation of Cinder.  This "
                                        "will create a file-backed volume group and is not suitable "
                                        "for production usage."),
                   "PROMPT"          : ("Should Cinder's volumes group be created (for proof-of-concept "
                                        "installation)?"),
                   "OPTION_LIST"     : ["y", "n"],
                   "VALIDATORS"      : [validators.validate_options],
                   "DEFAULT_VALUE"   : "y",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_VOLUMES_CREATE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "CINDER",
                  "DESCRIPTION"           : "Cinder Config parameters",
                  "PRE_CONDITION"         : "CONFIG_CINDER_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)

    def check_options(config):
        return (config.get('CONFIG_CINDER_INSTALL', 'n') ==
                config.get('CONFIG_CINDER_VOLUMES_CREATE', 'n') == 'y')

    paramsList = [
                  {"CMD_OPTION"      : "cinder-volumes-size",
                   "USAGE"           : "Cinder's volumes group size",
                   "PROMPT"          : "Enter Cinder's volumes group size",
                   "OPTION_LIST"     : [],
                   "VALIDATORS" : [validators.validate_not_empty],
                   "DEFAULT_VALUE"   : "20G",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_CINDER_VOLUMES_SIZE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "CINDERVOLUMECREATE",
                  "DESCRIPTION"           : "Cinder volume create Config parameters",
                  "PRE_CONDITION"         : check_options,
                  "PRE_CONDITION_MATCH"   : True,
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)
Exemple #22
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject

    paramsList = [
        {
            "CMD_OPTION": "novaapi-host",
            "USAGE":
            "The IP address of the server on which to install the Nova API service",
            "PROMPT": "Enter the IP address of the Nova API service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ip, validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_API_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novacert-host",
            "USAGE":
            "The IP address of the server on which to install the Nova Cert service",
            "PROMPT": "Enter the IP address of the Nova Cert service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_CERT_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novavncproxy-hosts",
            "USAGE":
            "The IP address of the server on which to install the Nova VNC proxy",
            "PROMPT": "Enter the IP address of the Nova VNC proxy",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_VNCPROXY_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novacompute-hosts",
            "USAGE":
            "A comma separated list of IP addresses on which to install the Nova Compute services",
            "PROMPT":
            "Enter a comma separated list of IP addresses on which to install the Nova Compute services",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_multi_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_COMPUTE_HOSTS",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novacompute-privif",
            "USAGE":
            "Private interface for Flat DHCP on the Nova compute servers",
            "PROMPT":
            "Enter the Private interface for Flat DHCP on the Nova compute servers",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": "eth1",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_COMPUTE_PRIVIF",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-host",
            "USAGE":
            "The IP address of the server on which to install the Nova Network service",
            "PROMPT": "Enter the IP address of the Nova Network service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ip, validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novaconductor-host",
            "USAGE":
            "The IP address of the server on which to install the Nova Conductor service",
            "PROMPT": "Enter the IP address of the Nova Conductor service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ip, validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_CONDUCTOR_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "nova-db-passwd",
            "USAGE": "The password to use for the Nova to access DB",
            "PROMPT": "Enter the password for the Nova DB access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_NOVA_DB_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "nova-ks-passwd",
            "USAGE":
            "The password to use for the Nova to authenticate with Keystone",
            "PROMPT": "Enter the password for the Nova Keystone access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_NOVA_KS_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-pubif",
            "USAGE": "Public interface on the Nova network server",
            "PROMPT": "Enter the Public interface on the Nova network server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": "eth0",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_PUBIF",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-privif",
            "USAGE":
            "Private interface for Flat DHCP on the Nova network server",
            "PROMPT":
            "Enter the Private interface for Flat DHCP on the Nova network server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": "eth1",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_PRIVIF",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-fixed-range",
            "USAGE": "IP Range for Flat DHCP",
            "PROMPT": "Enter the IP Range for Flat DHCP",
            "OPTION_LIST": ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
            "VALIDATORS": [validators.validate_regexp],
            "DEFAULT_VALUE": "192.168.32.0/22",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_FIXEDRANGE",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-floating-range",
            "USAGE": "IP Range for Floating IP's",
            "PROMPT": "Enter the IP Range for Floating IP's",
            "OPTION_LIST": ["^([\d]{1,3}\.){3}[\d]{1,3}/\d\d?$"],
            "VALIDATORS": [validators.validate_regexp],
            "DEFAULT_VALUE": "10.3.4.0/22",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_FLOATRANGE",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-default-floating-pool",
            "USAGE":
            "Name of the default floating pool to which the specified floating ranges are added to",
            "PROMPT": "What should the default floating pool be called?",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": "nova",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_DEFAULTFLOATINGPOOL",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novanetwork-auto-assign-floating-ip",
            "USAGE": "Automatically assign a floating IP to new instances",
            "PROMPT":
            "Should new instances automatically have a floating IP assigned?",
            "OPTION_LIST": ["y", "n"],
            "VALIDATORS": [validators.validate_options],
            "DEFAULT_VALUE": "n",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_NOVA_NETWORK_AUTOASSIGNFLOATINGIP",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novasched-host",
            "USAGE":
            "The IP address of the server on which to install the Nova Scheduler service",
            "PROMPT": "Enter the IP address of the Nova Scheduler service",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_SCHED_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novasched-cpu-allocation-ratio",
            "USAGE": "The overcommitment ratio for virtual to physical CPUs. "
            "Set to 1.0 to disable CPU overcommitment",
            "PROMPT": "Enter the CPU overcommitment ratio. "
            "Set to 1.0 to disable CPU overcommitment",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_float],
            "DEFAULT_VALUE": 16.0,
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "novasched-ram-allocation-ratio",
            "USAGE": "The overcommitment ratio for virtual to physical RAM. "
            "Set to 1.0 to disable RAM overcommitment",
            "PROMPT": "Enter the RAM overcommitment ratio. "
            "Set to 1.0 to disable RAM overcommitment",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_float],
            "DEFAULT_VALUE": 1.5,
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]
    groupDict = {
        "GROUP_NAME": "NOVA",
        "DESCRIPTION": "Nova Options",
        "PRE_CONDITION": "CONFIG_NOVA_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }
    controller.addGroup(groupDict, paramsList)
Exemple #23
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Cinder configuration")
    paramsList = [
        {
            "CMD_OPTION": "cinder-host",
            "USAGE": "The IP address of the server on which to install Cinder",
            "PROMPT": "Enter the IP address of the Cinder server",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_ssh],
            "DEFAULT_VALUE": utils.getLocalhostIP(),
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": True,
            "CONF_NAME": "CONFIG_CINDER_HOST",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "cinder-db-passwd",
            "USAGE": "The password to use for the Cinder to access DB",
            "PROMPT": "Enter the password for the Cinder DB access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_CINDER_DB_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION": "cinder-ks-passwd",
            "USAGE":
            "The password to use for the Cinder to authenticate with Keystone",
            "PROMPT": "Enter the password for the Cinder Keystone access",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": uuid.uuid4().hex[:16],
            "MASK_INPUT": True,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_CINDER_KS_PW",
            "USE_DEFAULT": True,
            "NEED_CONFIRM": True,
            "CONDITION": False
        },
        {
            "CMD_OPTION":
            "cinder-volumes-create",
            "USAGE":
            ("Create Cinder's volumes group. This should only be done for "
             "testing on a proof-of-concept installation of Cinder.  This "
             "will create a file-backed volume group and is not suitable "
             "for production usage."),
            "PROMPT":
            ("Should Cinder's volumes group be created (for proof-of-concept "
             "installation)?"),
            "OPTION_LIST": ["y", "n"],
            "VALIDATORS": [validators.validate_options],
            "DEFAULT_VALUE":
            "y",
            "MASK_INPUT":
            False,
            "LOOSE_VALIDATION":
            False,
            "CONF_NAME":
            "CONFIG_CINDER_VOLUMES_CREATE",
            "USE_DEFAULT":
            False,
            "NEED_CONFIRM":
            False,
            "CONDITION":
            False
        },
    ]

    groupDict = {
        "GROUP_NAME": "CINDER",
        "DESCRIPTION": "Cinder Config parameters",
        "PRE_CONDITION": "CONFIG_CINDER_INSTALL",
        "PRE_CONDITION_MATCH": "y",
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)

    def check_options(config):
        return (config.get('CONFIG_CINDER_INSTALL', 'n') == config.get(
            'CONFIG_CINDER_VOLUMES_CREATE', 'n') == 'y')

    paramsList = [
        {
            "CMD_OPTION": "cinder-volumes-size",
            "USAGE": "Cinder's volumes group size",
            "PROMPT": "Enter Cinder's volumes group size",
            "OPTION_LIST": [],
            "VALIDATORS": [validators.validate_not_empty],
            "DEFAULT_VALUE": "20G",
            "MASK_INPUT": False,
            "LOOSE_VALIDATION": False,
            "CONF_NAME": "CONFIG_CINDER_VOLUMES_SIZE",
            "USE_DEFAULT": False,
            "NEED_CONFIRM": False,
            "CONDITION": False
        },
    ]

    groupDict = {
        "GROUP_NAME": "CINDERVOLUMECREATE",
        "DESCRIPTION": "Cinder volume create Config parameters",
        "PRE_CONDITION": check_options,
        "PRE_CONDITION_MATCH": True,
        "POST_CONDITION": False,
        "POST_CONDITION_MATCH": True
    }

    controller.addGroup(groupDict, paramsList)
Exemple #24
0
def initConfig(controllerObject):
    global controller
    controller = controllerObject
    logging.debug("Adding OpenStack Swift configuration")
    paramsList = [
                  {"CMD_OPTION"      : "os-swift-proxy",
                   "USAGE"           : "The IP address on which to install the Swift proxy service",
                   "PROMPT"          : "Enter the IP address of the Swift proxy service",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_ip, validate.validate_ssh],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_PROXY_HOSTS", #XXX: Shouldn't be here CONFIG_SWIFT_PROXY_HOST?
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-ks-passwd",
                   "USAGE"           : "The password to use for the Swift to authenticate with Keystone",
                   "PROMPT"          : "Enter the password for the Swift Keystone access",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_not_empty],
                   "DEFAULT_VALUE"   : uuid.uuid4().hex[:16],
                   "MASK_INPUT"      : True,
                   "LOOSE_VALIDATION": False,
                   "CONF_NAME"       : "CONFIG_SWIFT_KS_PW",
                   "USE_DEFAULT"     : True,
                   "NEED_CONFIRM"    : True,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage",
                   "USAGE"           : "A comma separated list of IP addresses on which to install the Swift Storage services, each entry should take the format <ipaddress>[/dev], for example 127.0.0.1/vdb will install /dev/vdb on 127.0.0.1 as a swift storage device(packstack does not create the filesystem, you must first do this first), if /dev is omitted Packstack will create a loopback device for a test setup",
                   "PROMPT"          : "Enter the Swift Storage servers e.g. host/dev,host/dev",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_not_empty, validate_storage],
                   "DEFAULT_VALUE"   : utils.getLocalhostIP(),
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_HOSTS",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-zones",
                   "USAGE"           : "Number of swift storage zones, this number MUST be no bigger than the number of storage devices configured",
                   "PROMPT"          : "Enter the number of swift storage zones, MUST be no bigger than the number of storage devices configured",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_integer],
                   "DEFAULT_VALUE"   : "1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_ZONES",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-replicas",
                   "USAGE"           : "Number of swift storage replicas, this number MUST be no bigger than the number of storage zones configured",
                   "PROMPT"          : "Enter the number of swift storage replicas, MUST be no bigger than the number of storage zones configured",
                   "OPTION_LIST"     : [],
                   "VALIDATORS"      : [validate.validate_integer],
                   "DEFAULT_VALUE"   : "1",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_REPLICAS",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                  {"CMD_OPTION"      : "os-swift-storage-fstype",
                   "USAGE"           : "FileSystem type for storage nodes",
                   "PROMPT"          : "Enter FileSystem type for storage nodes",
                   "OPTION_LIST"     : ['xfs','ext4'],
                   "VALIDATORS"      : [validate.validate_options],
                   "DEFAULT_VALUE"   : "ext4",
                   "MASK_INPUT"      : False,
                   "LOOSE_VALIDATION": True,
                   "CONF_NAME"       : "CONFIG_SWIFT_STORAGE_FSTYPE",
                   "USE_DEFAULT"     : False,
                   "NEED_CONFIRM"    : False,
                   "CONDITION"       : False },
                 ]

    groupDict = { "GROUP_NAME"            : "OSSWIFT",
                  "DESCRIPTION"           : "OpenStack Swift Config parameters",
                  "PRE_CONDITION"         : "CONFIG_SWIFT_INSTALL",
                  "PRE_CONDITION_MATCH"   : "y",
                  "POST_CONDITION"        : False,
                  "POST_CONDITION_MATCH"  : True}

    controller.addGroup(groupDict, paramsList)