def deploy(): """deploys the system on supported distributions""" # download() print "version_info", sys.version_info print "sys.prefix", sys.prefix if is_ubuntu(): ubuntu() elif is_centos(): centos() elif is_osx(): osx() else: print "OS distribution not supported; please see documatation for manual installation instructions." sys.exit()
def install_command(args): """ Usage: install -h | --help install --version install cloudmesh install delete_yaml install system install query install new install apply_credentials install vagrant install rc fetch [--username=<username>] [--outdir=<outdir>] install rc fill install rc login [--username=<username>] """ arguments = docopt(install_command.__doc__, args) if arguments["cloudmesh"]: deploy() elif arguments["new"]: new_cloudmesh_yaml() elif arguments["delete_yaml"]: answer = yn_choice("THIS COMMAND IS REAL DANGEROUS AND WILL DELETE ALL YOUR YAML FILE. Proceed", default='y') if answer: print "You fool we just deleted your yaml files" cp("etc/*.yaml", "~/.futuregrid/") else: print "puuh you interrupted" pass elif arguments["system"]: banner("Installing Ubuntu System Requirements") if is_ubuntu(): ubuntu() elif is_osx(): osx() elif is_centos(): centos() elif arguments["query"]: import platform print "System: ", platform.system() # print "Uname: ", platform.uname() print "Machine: ", platform.machine() print "Processor: ", platform.processor() print "Platform: ", platform.platform() print "Python: ", platform.python_version() print "Virtualenv:", hasattr(sys, 'real_prefix') elif arguments["vagrant"]: vagrant() elif arguments["rc"] and arguments["fetch"]: fetchrc(arguments["--username"], arguments["--outdir"]) elif arguments["rc"] and arguments["fill"]: get_fg_username_password_from_rcfiles() elif arguments["rc"] and arguments["login"]: verify_ssh_login(arguments["--username"])
def install_command(args): """ Usage: install -h | --help install --version install cloudmesh install delete_yaml install system install query install new install apply_credentials install vagrant install rc fetch [--username=<username>] [--outdir=<outdir>] install rc fill install rc login [--username=<username>] """ arguments = docopt(install_command.__doc__, args) if arguments["cloudmesh"]: deploy() elif arguments["new"]: new_cloudmesh_yaml() elif arguments["delete_yaml"]: answer = yn_choice( "THIS COMMAND IS REAL DANGEROUS AND WILL DELETE ALL YOUR YAML FILE. Proceed", default='y') if answer: print "You fool we just deleted your yaml files" cp("etc/*.yaml", "~/.futuregrid/") else: print "puuh you interrupted" pass elif arguments["system"]: banner("Installing Ubuntu System Requirements") if is_ubuntu(): ubuntu() elif is_osx(): osx() elif is_centos(): centos() elif arguments["query"]: import platform print "System: ", platform.system() # print "Uname: ", platform.uname() print "Machine: ", platform.machine() print "Processor: ", platform.processor() print "Platform: ", platform.platform() print "Python: ", platform.python_version() print "Virtualenv:", hasattr(sys, 'real_prefix') elif arguments["vagrant"]: vagrant() elif arguments["rc"] and arguments["fetch"]: fetchrc(arguments["--username"], arguments["--outdir"]) elif arguments["rc"] and arguments["fill"]: get_fg_username_password_from_rcfiles() elif arguments["rc"] and arguments["login"]: verify_ssh_login(arguments["--username"])