Beispiel #1
0
def do_builds(args):
    for spec_key in args:
        fullname = _horton.namespace + spec_key
        if isinstance(_horton.specs[fullname], _cb.StackV2Request):  # Cloudbreak only Type
            deploy.create_stack(
                fullname,
                purge=False
            )
            deploy.wait_for_event(
                fullname,
                'event_type',
                'BILLING_STARTED',
                _datetime.utcnow(),
                600
            )
        elif 'cdh_ver' in _horton.specs[fullname]:
            # Using Director
            director.chain_deploy(
                cdh_ver=str(_horton.specs[fullname]['cdh_ver']),
                dep_name=fullname,
                services=_horton.specs[fullname]['services'],
                tls_start=_horton.specs[fullname]['tls_start'],
            )
        else:
            raise ValueError("Orchestrator not supported")
Beispiel #2
0
def wait_event(args):
    def_key = args[0]
    spec_key = args[1]
    fullname = _horton.namespace + spec_key
    field = args[2]
    state = args[3]
    deploy.wait_for_event(fullname, field, state, _datetime.utcnow(),
                          _horton.defs[def_key]['deploywait'])
Beispiel #3
0
def do_builds(args):
    for spec_key in args:
        fullname = _horton.namespace + spec_key
        deploy.create_stack(fullname, purge=False)
        deploy.wait_for_event(fullname, 'event_type', 'BILLING_STARTED',
                              _datetime.utcnow(), 600)