diff --git a/app/host.py b/app/host.py index c1455ed..7018887 100644 --- a/app/host.py +++ b/app/host.py @@ -17,7 +17,8 @@ def host(): @click.option("--ssh_key_path", required=True, help="For Example, ~/.ssh/id_rsa") @click.option("--ssh_key_pass", required=True) @click.option("--etcd_url", required=True) -def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url): +@click.option("--without_ceph", default=False, type=bool) +def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, without_ceph): os.chdir(path) repo_name = "ucloud-vm" @@ -34,6 +35,7 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url): f"ssh_pkey={ssh_key_path}\n" f"ssh_private_key_password={ssh_key_pass}\n" f"ETCD_URL={etcd_url}\n" + f"WITHOUT_CEPH={without_ceph}\n" ) f.writelines(content) diff --git a/app/image.py b/app/image.py index 8771617..c1df50a 100644 --- a/app/image.py +++ b/app/image.py @@ -13,7 +13,8 @@ def image(): @click.option("--path", required=True) @click.option("--base_dir", required=True) @click.option("--etcd_url", required=True) -def setup(path, base_dir, etcd_url): +@click.option("--without_ceph", default=False, type=bool) +def setup(path, base_dir, etcd_url, without_ceph): os.chdir(path) repo_name = "ucloud-image-scanner" @@ -28,6 +29,7 @@ def setup(path, base_dir, etcd_url): content = ( f"BASE_DIR={base_dir}\n" f"ETCD_URL={etcd_url}\n" + f"WITHOUT_CEPH={without_ceph}" ) f.writelines(content)