a
This commit is contained in:
parent
f784e50dd9
commit
f4efad8ae2
2 changed files with 11 additions and 6 deletions
|
@ -70,4 +70,5 @@ def setup(path, auth_name, auth_seed, auth_realm,
|
|||
)
|
||||
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
||||
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
||||
op.add(PipenvOperation.install, path="ucloud-api")
|
||||
|
||||
op.add(PipenvOperation.install, path=repo_name)
|
||||
|
|
14
app/host.py
14
app/host.py
|
@ -1,6 +1,7 @@
|
|||
import click
|
||||
import subprocess
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from app.helper import (
|
||||
clone,
|
||||
|
@ -22,9 +23,9 @@ def host():
|
|||
@click.option("--ssh_username", required=True)
|
||||
@click.option("--ssh_key_path", required=True, help="For Example, ~/.ssh/id_rsa")
|
||||
@click.option("--ssh_key_pass", required=True)
|
||||
@click.option("--etcd_host", required=True)
|
||||
@click.option("--etcd_port", required=True)
|
||||
def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_host, etcd_port):
|
||||
@click.option("--etcd_url", required=True)
|
||||
@click.option("--etcd_password", required=True)
|
||||
def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, etcd_password):
|
||||
os.chdir(path)
|
||||
|
||||
repo_name = "ucloud-vm"
|
||||
|
@ -37,8 +38,8 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_host, etcd_port):
|
|||
f"ssh_username={ssh_username}\n"
|
||||
f"ssh_pkey={ssh_key_path}\n"
|
||||
f"ssh_private_key_password={ssh_key_pass}\n"
|
||||
f"ETCD_HOST={etcd_host}\n"
|
||||
f"ETCD_PORT={etcd_port}\n"
|
||||
f"ETCD_URL={etcd_url}\n"
|
||||
f"ETCD_PASSWORD={etcd_password}\n"
|
||||
)
|
||||
|
||||
op_result.add(
|
||||
|
@ -57,4 +58,7 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_host, etcd_port):
|
|||
url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper",
|
||||
)
|
||||
|
||||
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
||||
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
||||
|
||||
op_result.add(PipenvOperation.install, path=repo_name)
|
||||
|
|
Loading…
Reference in a new issue