Exemple #1
0
def write_to_ct(port, service_name, project_name, username):
    machines = database_update.get_machines()
    for machine in machines:
        cli = Client(machine, config.c_version).client
        tt = cli.exec_create(container='nginx',
                             cmd='/bin/bash -c \"cd /etc/consul-templates && sh refresh.sh %s %s %s %s\"' % (
                                 port, service_name, project_name, username))
        cli.exec_start(exec_id=tt, detach=True)
Exemple #2
0
def delete_from_ct(project_name, username):
    machines = database_update.get_machines()
    for machine in machines:
        cli = Client(machine, config.c_version).client
        tt = cli.exec_create(container='nginx',
                             cmd='/bin/bash -c \"cd /etc/consul-templates && bash delete.sh %s-%s\"' % (
                                 project_name, username))
        cli.exec_start(exec_id=tt, detach=True)
Exemple #3
0
def write_to_ct(port, service_name, project_name, username):
    machines = database_update.get_machines()
    for machine in machines:
        cli = Client(machine, config.c_version).client
        tt = cli.exec_create(
            container='nginx',
            cmd=
            '/bin/bash -c \"cd /etc/consul-templates && sh refresh.sh %s %s %s %s\"'
            % (port, service_name, project_name, username))
        cli.exec_start(exec_id=tt, detach=True)
Exemple #4
0
def delete_from_ct(project_name, username):
    machines = database_update.get_machines()
    for machine in machines:
        cli = Client(machine, config.c_version).client
        tt = cli.exec_create(
            container='nginx',
            cmd=
            '/bin/bash -c \"cd /etc/consul-templates && bash delete.sh %s-%s\"'
            % (project_name, username))
        cli.exec_start(exec_id=tt, detach=True)