Exemplo n.º 1
0
def start():
    config = configparser.ConfigParser()
    config.read(basedir + '/cfg/config.ini')
    master_nums = int(config['MASTER']['nums'])

    if master_nums == 1:
        start_ansible()
        start_ansible_hosts()
        start_cert()
        gencerts('master')

        initenv('master')
        copycerts('master')
        start_master()
    else:
        start_ansible()
        start_ansible_hosts()
        start_cert()
        gencerts('master')

        start_haproxy_cfg()
        start_haproxy()
        start_keepalived_cfg()
        start_keepalived()

        initenv('master')
        copycerts('master')
        start_master()
Exemplo n.º 2
0
def start():
    start_ansible()
    start_ansible_hosts()
    start_cert()
    start_network()
    gencerts('etcd')
    initenv('etcd')
    start_etcd()
Exemplo n.º 3
0
def start():
    start_nodes_cfg()
    start_ansible_hosts()
    gennodescfg()

    start_flanneld_cfg()
    initenv('nodes')
    dockerdep()
    start_flanneld()

    start_nodes()

    time.sleep(3)
    start_write_nodes_master()
    start_csr()
    start_distribute_img()
    start_labels_nodes()
Exemplo n.º 4
0
def start():
    start_harbor_yaml()
    start_ansible_hosts()
    initenv('harbor')
    start_harbor()