def setup_cmd(awsparser): parser_sub_c = awsparser.add_parser("config", help="Define configuration details for running a cluster") parser_c = parser_sub_c.add_subparsers(title="[configuration specific actions]") parser = parser_c.add_parser("edit", help="Edit cluster configuration") parser.set_defaults(func=run_edit) parser = common.add_default_ec_args(parser)
def setup_cmd(awsparser): parser_sub_b = awsparser.add_parser("cluster", help="Run and manage AWS clusters") parser_b = parser_sub_b.add_subparsers(title="[cluster specific actions]") parser = parser_b.add_parser("bootstrap", help="Update a bcbio AWS system with " "the latest code and tools", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-R", "--no-reboot", default=False, action="store_true", help="Don't upgrade the cluster host OS and reboot") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=bootstrap_cluster) parser = parser_b.add_parser("command", help="Run a script on the bcbio frontend " "node inside a screen session", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("script", metavar="SCRIPT", help="Local path of the script to run. The screen " "session name is the basename of the script.") parser.set_defaults(func=run_remote) parser = parser_b.add_parser("ssh", help="SSH to a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument("args", metavar="ARG", nargs="*", help="Execute the following command on the remote " "machine instead of opening an interactive shell.") parser.set_defaults(func=ssh) parser = parser_b.add_parser("start", help="Start a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-R", "--no-reboot", default=False, action="store_true", help="Don't upgrade the cluster host OS and reboot") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=start) parser = parser_b.add_parser("setup", help="Rerun cluster configuration steps", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=setup) parser = parser_b.add_parser("stop", help="Stop a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=stop)
def setup_cmd(awsparser): parser = awsparser.add_parser("info", help="Information on existing AWS clusters") parser.set_defaults(func=print_info) common.add_default_ec_args(parser)
def setup_cmd(awsparser): parser_sub_b = awsparser.add_parser("cluster", help="Run and manage AWS clusters") parser_b = parser_sub_b.add_subparsers(title="[cluster specific actions]") parser = parser_b.add_parser( "bootstrap", help="Update a bcbio AWS system with " "the latest code and tools", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-R", "--no-reboot", default=False, action="store_true", help="Don't upgrade the cluster host OS and reboot") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=bootstrap_cluster) parser = parser_b.add_parser( "command", help="Run a script on the bcbio frontend " "node inside a screen session", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("script", metavar="SCRIPT", help="Local path of the script to run. The screen " "session name is the basename of the script.") parser.set_defaults(func=run_remote) parser = parser_b.add_parser( "ssh", help="SSH to a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument("args", metavar="ARG", nargs="*", help="Execute the following command on the remote " "machine instead of opening an interactive shell.") parser.set_defaults(func=ssh) parser = parser_b.add_parser( "start", help="Start a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-R", "--no-reboot", default=False, action="store_true", help="Don't upgrade the cluster host OS and reboot") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=start) parser = parser_b.add_parser( "setup", help="Rerun cluster configuration steps", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=setup) parser = parser_b.add_parser( "stop", help="Stop a bcbio cluster", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.set_defaults(func=stop)
def setup_cmd(awsparser): parser_c = awsparser.add_parser( "icel", help="Create scratch filesystem using Intel Cloud Edition for Lustre") icel_parser = parser_c.add_subparsers(title="[icel create]") # ## Create parser = icel_parser.add_parser( "create", help="Create scratch filesystem using Intel Cloud Edition for Lustre", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("--recreate", action="store_true", default=False, help="Remove and recreate the stack, " "destroying all data stored on it") parser.add_argument("--setup", action="store_true", default=False, help="Rerun configuration steps") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument("-s", "--size", type=int, default="2048", help="Size of the Lustre filesystem, in gigabytes") parser.add_argument("-o", "--oss-count", type=int, default="4", help="Number of OSS nodes") parser.add_argument("-l", "--lun-count", type=int, default="4", help="Number of EBS LUNs per OSS") parser.add_argument("-n", "--network", metavar="NETWORK", dest="network", help="Network (in CIDR notation, a.b.c.d/e) to " "place Lustre servers in") parser.add_argument( "-b", "--bucket", default="bcbio-lustre-%s" % getpass.getuser(), help="bucket to store generated ICEL template for CloudFormation") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=create) # ## Spec parser = icel_parser.add_parser( "fs_spec", help="Get the filesystem spec for a running filesystem", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the stack") parser.set_defaults(func=fs_spec) # ## Mount parser = icel_parser.add_parser( "mount", help="Mount Lustre filesystem on all cluster nodes", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=mount) # ## Unmount parser = icel_parser.add_parser( "unmount", help="Unmount Lustre filesystem on all cluster nodes", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=unmount) # ## Stop parser = icel_parser.add_parser( "stop", help="Stop the running Lustre filesystem and clean up resources", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=stop)
def setup_cmd(awsparser): parser_c = awsparser.add_parser("icel", help="Create scratch filesystem using Intel Cloud Edition for Lustre") icel_parser = parser_c.add_subparsers(title="[icel create]") # ## Create parser = icel_parser.add_parser("create", help="Create scratch filesystem using Intel Cloud Edition for Lustre", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("--recreate", action="store_true", default=False, help="Remove and recreate the stack, " "destroying all data stored on it") parser.add_argument("--setup", action="store_true", default=False, help="Rerun configuration steps") parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument("-s", "--size", type=int, default="2048", help="Size of the Lustre filesystem, in gigabytes") parser.add_argument("-o", "--oss-count", type=int, default="4", help="Number of OSS nodes") parser.add_argument("-l", "--lun-count", type=int, default="4", help="Number of EBS LUNs per OSS") parser.add_argument("-n", "--network", metavar="NETWORK", dest="network", help="Network (in CIDR notation, a.b.c.d/e) to " "place Lustre servers in") parser.add_argument("-b", "--bucket", default="bcbio-lustre-%s" % getpass.getuser(), help="bucket to store generated ICEL template for CloudFormation") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=create) # ## Spec parser = icel_parser.add_parser("fs_spec", help="Get the filesystem spec for a running filesystem", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the stack") parser.set_defaults(func=fs_spec) # ## Mount parser = icel_parser.add_parser("mount", help="Mount Lustre filesystem on all cluster nodes", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=mount) # ## Unmount parser = icel_parser.add_parser("unmount", help="Unmount Lustre filesystem on all cluster nodes", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument("-q", "--quiet", dest="verbose", action="store_false", default=True, help="Quiet output when running Ansible playbooks") parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=unmount) # ## Stop parser = icel_parser.add_parser("stop", help="Stop the running Lustre filesystem and clean up resources", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = common.add_default_ec_args(parser) parser.add_argument(metavar="STACK_NAME", dest="stack_name", nargs="?", default="bcbiolustre", help="CloudFormation name for the new stack") parser.set_defaults(func=stop)