예제 #1
0
def setup_controller():
    conf = Controller.get().CONF
    if util.str2bool(conf['CONFIG_CLEAN_CONTROLLER_HOST']):
        try:
            utils.run_recipe("{0}".format("controller_cleanup.sh"),
                             utils.get_template("controller_cleanup.sh"),
                             [conf["CONFIG_CONTROLLER_HOST"]])
        except:
            pass

    template = "pre_controller.sh"
    recipe = utils.get_template(template)
    return utils.run_recipe("{0}".format(template), recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #2
0
def setup_computes():
    conf = Controller.get().CONF
    if util.str2bool(conf['CONFIG_CLEAN_COMPUTE_HOSTS']):
        try:
            utils.run_recipe("{0}".format("compute_cleanup.sh"),
                             utils.get_template("compute_cleanup.sh"),
                             conf["CONFIG_COMPUTE_HOSTS"].split(','))
        except:
            pass

    template = "pre_compute.sh"
    recipe = utils.get_template(template)
    return utils.run_recipe("{0}".format(template), recipe,
                            conf["CONFIG_COMPUTE_HOSTS"].split(','))
예제 #3
0
def setup_controller():
    conf = Controller.get().CONF
    templates = ['provision']
    recipe = ""
    for template in templates:
        recipe += utils.get_template(template)

    return utils.run_recipe("provision.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #4
0
def setup_keystone():
    conf = Controller.get().CONF
    recipe = utils.get_template('keystone')
    return utils.run_recipe("keystone.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #5
0
def setup_mariadb(template):
    conf = Controller.get().CONF
    recipe = utils.get_template(template)
    return utils.run_recipe("{0}.py".format(template), recipe,
                            [conf["CONFIG_MARIADB_HOST"]])
예제 #6
0
def setup_computes():
    conf = Controller.get().CONF
    recipe = utils.get_template('nova_compute')
    return utils.run_recipe("nova_compute.py", recipe,
                            conf["CONFIG_COMPUTE_HOSTS"].split(','))
예제 #7
0
def setup_controller():
    conf = Controller.get().CONF
    recipe = utils.get_template('nova')
    return utils.run_recipe("nova.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #8
0
def setup_sahara():
    conf = Controller.get().CONF
    recipe = utils.get_template("sahara")
    return utils.run_recipe("sahara.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #9
0
def setup_rabbit():
    conf = Controller.get().CONF
    recipe = utils.get_template("rabbitmq")
    return utils.run_recipe("rabbitmq.py", recipe, [conf["CONFIG_AMQP_HOST"]])
예제 #10
0
def setup_mongodb():
    conf = Controller.get().CONF
    recipe = utils.get_template('mongodb')
    return utils.run_recipe("mongodb.py", recipe,
                            [conf["CONFIG_MONGODB_HOST"]])
예제 #11
0
def setup_ceilometer():
    conf = Controller.get().CONF
    recipe = utils.get_template("ceilometer")
    return utils.run_recipe("ceilometer.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #12
0
def setup_glance():
    conf = Controller.get().CONF
    recipe = utils.get_template("glance")
    return utils.run_recipe("glance.py", recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])
예제 #13
0
def setup_horizon():
    template = "horizon"
    conf = Controller.get().CONF
    recipe = utils.get_template(template)
    return utils.run_recipe("{0}.py".format(template), recipe,
                            [conf["CONFIG_CONTROLLER_HOST"]])