コード例 #1
0
ファイル: java.py プロジェクト: eamonnmag/projects
def install_jboss(base_dir):
    version = "5.1.0"
    url = "http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-%s.GA/jboss-%s.GA.zip" % \
          (version, version)
    java_dir = _java_dir(base_dir)
    with cd(java_dir):
        jboss_dir = _fetch_and_unpack(url)
    return os.path.join(java_dir, jboss_dir)
コード例 #2
0
ファイル: scde_fabfile.py プロジェクト: eamonnmag/projects
def _install_galaxy_search(dirs, config):
    """Full text search capability with Lucene.
    """
    search_url = "git clone git://github.com/chapmanb/kwd-doc-find.git"
    with cd(dirs["base"]):
        lucene_dir = _fetch_and_unpack(search_url)
    lucene_dir = os.path.join(dirs["base"], lucene_dir)
    return ("fulltext_search", lucene_dir, "lein deps && lein run :web 8081",
            "run :web 8081", False)
コード例 #3
0
ファイル: java.py プロジェクト: eamonnmag/projects
def install_maven(base_dir):
    version = "2.2.1"
    mirror = "mirror.cc.columbia.edu/pub/software/apache"
    java_dir = _java_dir(base_dir)
    url = "http://%s/maven/binaries/apache-maven-%s-bin.tar.gz" % ( mirror, version)
    with cd(java_dir):
        mvn_dir = _fetch_and_unpack(url)
    install_mvn = os.path.join(base_dir, "bin", "mvn")
    dl_mvn = os.path.join(java_dir, mvn_dir, "bin", "mvn")
    sudo("ln -s %s %s" % (dl_mvn, install_mvn))
コード例 #4
0
def _get_isatab_config(dirs, config):
    """Retrieve ISA-tab configuration files.

    Need to add SCDE configurations to GitHub repo.
    """
    config_git = "git clone git://github.com/ISA-tools/Configuration-Files.git"
    with cd(dirs["base"]):
        config_dir = _fetch_and_unpack(config_git)
    our_config_dir = os.path.join(dirs["base"], config_dir, config["isatab_config"])
    assert exists(our_config_dir), our_config_dir
    dirs["config"] = our_config_dir
    return dirs
コード例 #5
0
def _download_isatab_s3(name, perm_type, bucket, dirs):
    """Download an ISA-tab data file from the S3 bucket.
    """
    s3_key = bucket.get_key("%s.tar.gz" % name)
    assert s3_key is not None, name
    url = s3_key.generate_url(expires_in=60)
    out_dir = os.path.join(dirs["isatab"], perm_type)
    if not exists(out_dir):
        run("mkdir -p %s" % out_dir)
    with cd(out_dir):
        cur_dir = _fetch_and_unpack(url)
    return os.path.join(out_dir, cur_dir)
コード例 #6
0
ファイル: scde_fabfile.py プロジェクト: eamonnmag/projects
def _install_bii_tools(config):
    bii_git = "git clone git://github.com/ISA-tools/BioInvIndex.git"
    mgr_git = "git clone git://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager.git"
    base_dir = os.path.join(config["base_install"], config["bii_dirname"])
    if not exists(base_dir):
        sudo("mkdir -p %s" % base_dir)
        sudo("chown %s %s" % (env.user, base_dir))
    with cd(base_dir):
        bii_dir = _fetch_and_unpack(bii_git)
        bii_dir = os.path.join(base_dir, bii_dir)
    with cd(base_dir):
        mgr_base_dir = _fetch_and_unpack(mgr_git)
        mgr_build_dir = "val_conv_manager_gui"
        with cd(os.path.join(mgr_base_dir, mgr_build_dir)):
            target_dir = "target"
            if not exists(target_dir):
                # need artifacts from BII for tool build
                with cd(bii_dir):
                    run("mvn clean install -Dmaven.test.skip=true")
                    run("rm -rf ear/target")
                # now build BII data manager
                run("sh package.sh")
                with cd(target_dir):
                    run("unzip BII-data-mgr-*.zip")
    mgr_dir = os.path.join(base_dir, mgr_base_dir, mgr_build_dir, target_dir)
    with cd(mgr_dir):
        with settings(hide("everything"), warn_only=True):
            result = run("ls -1d BII-data-mgr-*")
        data_mgr_dir = result.split()[0].strip()
    mgr_dir = os.path.join(mgr_dir, data_mgr_dir)
    index_dir = os.path.join(base_dir, config["bii_lucene_index"])
    if not exists(index_dir):
        run("mkdir -p %s" % index_dir)
    bii_data_dir = os.path.join(base_dir, config["bii_data_dirname"])
    if not exists(bii_data_dir):
        run("mkdir -p %s" % bii_data_dir)
    return dict(base=base_dir, bii=bii_dir, mgr=mgr_dir, index=index_dir,
                bii_data=bii_data_dir)
コード例 #7
0
ファイル: scde_fabfile.py プロジェクト: eamonnmag/projects
def _install_galaxy_code(dirs, config):
    with cd(dirs["base"]):
        code_dir = _fetch_and_unpack("hg clone %s" % config["galaxy_repo"])
    code_dir = os.path.join(dirs["base"], code_dir)
    library_dir = os.path.join(dirs["base"], config["galaxy_datalib"])
    config_file = "universe_wsgi.ini"
    remote_config = os.path.join(code_dir, config_file)
    if not exists(remote_config):
        local_config = os.path.join(config["fab_base_dir"], "install_files",
                                    config_file)
        origs = ["DBUSER", "DBPASSWD", "DBNAME", "ADMINUSERS", "LIBRARYDIR"]
        vals = [config["db_user"], config["db_pass"], config["galaxy_dbname"],
                config["galaxy_adminusers"], library_dir]
        put(local_config, remote_config)
        for old, new in zip(origs, vals):
            sed(remote_config, old, new)
    return ("galaxy", code_dir, "sh run.sh",
            "paster.py serve universe_wsgi.ini", False)