예제 #1
0
def install_package(package):
    if is_ubuntu():
        local ("sudo apt-get -y install {0}".format(package))
    if is_centos():
        local("sudo yum -y install {0}".format(package))
    elif sys.platform == "darwin":
        print "Not yet supported"
        sys.exit()
    elif sys.platform == "win32":
        print "Windows is not supported"
        print "Use Linux instead"
        sys.exit()
예제 #2
0
def install_package(package):
    if is_ubuntu():
        local("sudo apt-get -y install {0}".format(package))
    if is_centos():
        local("sudo yum -y install {0}".format(package))
    elif sys.platform == "darwin":
        print "Not yet supported"
        sys.exit()
    elif sys.platform == "win32":
        print "Windows is not supported"
        print "Use Linux instead"
        sys.exit()
예제 #3
0
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()
예제 #4
0
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()
예제 #5
0
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"])
예제 #6
0
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"])