-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from BD2KGenomics/feature#1/ManifestDownload
Feature#1/manifest download
- Loading branch information
Showing
6 changed files
with
110 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Usage: icgc-download.sh object-manifest output-dir | ||
# | ||
|
||
: "${DCC_HOME:?Need to set environment variable DCC_HOME}" | ||
: "${ACCESS_TOKEN:?Need to set environment variable ACCESS_TOKEN}" | ||
: "${REDWOOD_ENDPOINT:?Set environment variable REDWOOD_ENDPOINT to e.g. storage.ucsc-cgl.org}" | ||
: "${UCSC_STORAGE_TRUSTSTORE_PASSWORD:?Need to set environment variable UCSC_STORAGE_TRUSTSTORE_PASSWORD}" | ||
|
||
# config | ||
accessToken=${ACCESS_TOKEN} | ||
metadata_server_url=https://${REDWOOD_ENDPOINT}:8444 | ||
storage_server_url=https://${REDWOOD_ENDPOINT}:5431 | ||
trust_store_path=${DCC_HOME}/cert/clientcacerts | ||
trust_store_pass=${UCSC_STORAGE_TRUSTSTORE_PASSWORD} | ||
|
||
# setup | ||
object=$1 | ||
download=$2 | ||
|
||
#download files in a manifest | ||
java -Djavax.net.ssl.trustStore=${trust_store_path} -Djavax.net.ssl.trustStorePassword=${trust_store_pass} -Dmetadata.url=${metadata_server_url} -Dmetadata.ssl.enabled=true -Dclient.ssl.custom=false -Dstorage.url=${storage_server_url} -DaccessToken=${accessToken} -jar ${DCC_HOME}/lib/icgc-storage-client-1.0.14-SNAPSHOT/lib/icgc-storage-client.jar download --output-dir ${download} --output-layout bundle --manifest ${object} --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -x | ||
# | ||
# Usage: ucsc-upload.sh dataFile... | ||
# | ||
|
||
: "${DCC_HOME:?Set DCC_HOME to directory containing ucsc-storage-client}" | ||
: "${ACCESS_TOKEN:?Need to set environment variable ACCESS_TOKEN}" | ||
: "${REDWOOD_ENDPOINT:?Need to set environment variable REDWOOD_ENDPOINT to e.g. storage.ucsc-cgl.org}" | ||
: "${UCSC_STORAGE_TRUSTSTORE_PASSWORD:?Need to set environment variable UCSC_STORAGE_TRUSTSTORE_PASSWORD}" | ||
|
||
#config | ||
accessToken=${ACCESS_TOKEN} | ||
metadata_server_url=https://${REDWOOD_ENDPOINT}:8444 | ||
storage_server_url=https://${REDWOOD_ENDPOINT}:5431 | ||
tsv_file=$1 | ||
|
||
#Go to the right directory and execute the script | ||
cd ${DCC_HOME}/dcc-spinnaker-client | ||
python spinnaker.py \ | ||
--input-metadata-schema schemas/input_metadata.json \ | ||
--metadata-schema schemas/metadata_schema.json \ | ||
--output-dir ../data/spinnaker/output_metadata \ | ||
--receipt-file receipt.tsv \ | ||
--storage-client-path ${DCC_HOME}/dcc-spinnaker-client/ucsc-storage-client \ | ||
--force-upload \ | ||
--storage-access-token ${ACCESS_TOKEN} \ | ||
${tsv_file} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM ubuntu:latest | ||
MAINTAINER Carlos Espinosa <[email protected]> | ||
|
||
# install oracle java | ||
RUN apt-get update | ||
|
@@ -8,7 +9,29 @@ RUN apt-get update | |
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | ||
RUN apt-get install -y oracle-java8-installer | ||
|
||
RUN apt-get update && apt-get install -y uuid-runtime | ||
#Setting up the spinnaker client | ||
RUN apt-get update && apt-get install -y --force-yes \ | ||
python-dev \ | ||
python-pip \ | ||
build-essential \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
lib32z1-dev \ | ||
python-setuptools \ | ||
git \ | ||
uuid-runtime | ||
|
||
RUN easy_install pip | ||
|
||
RUN pip install \ | ||
jsonschema \ | ||
jsonmerge \ | ||
openpyxl \ | ||
sets \ | ||
json-spec \ | ||
elasticsearch \ | ||
semver \ | ||
luigi | ||
|
||
# add dcc files | ||
ENV DCC_HOME /dcc | ||
|
@@ -18,6 +41,14 @@ ADD bin ${DCC_HOME}/bin | |
ADD cert ${DCC_HOME}/cert | ||
ADD lib ${DCC_HOME}/lib | ||
|
||
# install spinnaker | ||
RUN git clone -b release/1.0.0 --single-branch https://github.com/BD2KGenomics/dcc-spinnaker-client.git ${DCC_HOME}/dcc-spinnaker-client/ | ||
RUN cd ${DCC_HOME}/dcc-spinnaker-client/ && wget https://s3-us-west-2.amazonaws.com/beni-dcc-storage-dev/20161216_ucsc-storage-client.tar.gz && tar zxf 20161216_ucsc-storage-client.tar.gz && rm -f 20161216_ucsc-storage-client.tar.gz | ||
|
||
# make everything runnable | ||
RUN chmod a+x ${DCC_HOME}/bin/* | ||
|
||
#Set environment variables | ||
ENV PATH ${DCC_HOME}/bin:$PATH | ||
ENV REDWOOD_ENDPOINT storage.ucsc-cgl.org | ||
ENV UCSC_STORAGE_TRUSTSTORE_PASSWORD=changeit |