diff --git a/.env b/.env deleted file mode 100644 index f3a17455e..000000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -COMPOSE_PROJECT_NAME=song - diff --git a/Dockerfile b/Dockerfile index a1de5ea87..c09a81a98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,7 @@ FROM openjdk:11-jre-stretch as client ENV SONG_CLIENT_HOME /song-client ENV CLIENT_DIST_DIR /song-client-dist - -ENV TARBALL $DCC_HOME/download.tar.gz +ENV PATH /usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SONG_CLIENT_HOME/bin COPY --from=builder /srv/song-client/target/song-client-*-dist.tar.gz /song-client.tar.gz diff --git a/Dockerfile.dev b/Dockerfile.dev index 8939cc2ee..c1ee811be 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -5,6 +5,7 @@ FROM openjdk:11-jre-stretch as client ENV SONG_CLIENT_HOME /song-client ENV CLIENT_DIST_DIR /song-client-dist +ENV PATH /usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SONG_CLIENT_HOME/bin COPY song-client/target/song-client-*-dist.tar.gz /song-client.tar.gz RUN tar zxvf song-client.tar.gz -C /tmp \ diff --git a/Makefile b/Makefile index fb3af24e7..7b6250493 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ LOG_DIRS := $(SCORE_SERVER_LOGS_DIR) $(SCORE_CLIENT_LOGS_DIR) $(SONG_SERVER_LOGS DOCKER_COMPOSE_CMD := echo "*********** DEMO_MODE = $(DEMO_MODE) **************" \ && echo "*********** FORCE = $(FORCE) **************" \ && DOCKERFILE_NAME=$(DOCKERFILE_NAME) MY_UID=$(MY_UID) MY_GID=$(MY_GID) $(DOCKER_COMPOSE_EXE) -f $(ROOT_DIR)/docker-compose.yml -SONG_CLIENT_CMD := $(DOCKER_COMPOSE_CMD) run --rm -u $(THIS_USER) song-client bin/sing +SONG_CLIENT_CMD := $(DOCKER_COMPOSE_CMD) run --rm -u $(THIS_USER) song-client sing SCORE_CLIENT_CMD := $(DOCKER_COMPOSE_CMD) run --rm -u $(THIS_USER) score-client bin/score-client DC_UP_CMD := $(DOCKER_COMPOSE_CMD) up -d --build MVN_CMD := $(MVN_EXE) -f $(ROOT_DIR)/pom.xml @@ -238,8 +238,8 @@ get-analysis-id: test-submit: start-song-server _ping_song_server @echo $(YELLOW)$(INFO_HEADER) "Submitting payload /data/submit/exampleVariantCall.json" $(END) @$(SONG_CLIENT_CMD) submit -f /data/submit/exampleVariantCall.json | tee $(SONG_CLIENT_SUBMIT_RESPONSE_FILE) - @cat $(SONG_CLIENT_SUBMIT_RESPONSE_FILE) | grep analysisId | sed 's/.*://' | sed 's/"\|,//g' > $(SONG_CLIENT_ANALYSIS_ID_FILE) - @echo $(YELLOW)$(INFO_HEADER) "Successfully submitted. Cached analysisId: " $$($(GET_ANALYSIS_ID_CMD)) $(END) + @cat $(SONG_CLIENT_SUBMIT_RESPONSE_FILE) | grep analysisId | sed -e 's#.*:[^"]*"\([^"]*\)".*#\1#' > $(SONG_CLIENT_ANALYSIS_ID_FILE) + @echo $(YELLOW)$(INFO_HEADER) "Successfully submitted. Cached analysisId: '"$$($(GET_ANALYSIS_ID_CMD))"'" $(END) test-manifest: test-submit @echo $(YELLOW)$(INFO_HEADER) "Creating manifest at /song-client/output" $(END) diff --git a/docker-compose.yml b/docker-compose.yml index 491c88c6f..24401dd15 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,7 @@ services: - "./docker/scratch/score-client-logs:/score-client/logs" - "./docker/scratch/song-client-output:/song-client/output" command: bin/score-client + user: "$MY_UID:$MY_GID" song-db: image: "postgres:9.6" environment: @@ -123,6 +124,7 @@ services: - "./docker/scratch/song-client-logs:/song-client/logs" - "./docker/scratch/song-client-output:/song-client/output" command: bin/sing + user: "$MY_UID:$MY_GID" song-server: build: context: ./ diff --git a/docker/tools/song-client-demo b/docker/tools/song-client-demo index d30d7af94..0e70ed3d8 100755 --- a/docker/tools/song-client-demo +++ b/docker/tools/song-client-demo @@ -8,4 +8,4 @@ DOCKERFILE_NAME=Dockerfile \ MY_GID=$(id -g) \ docker-compose \ -f ${BASH_SCRIPT_DIR}/../../docker-compose.yml \ - run --rm song-client bin/sing $@ + run --rm song-client sing $@ diff --git a/docker/tools/song-client-dev b/docker/tools/song-client-dev index 6e5f9f1a2..6e179e667 100755 --- a/docker/tools/song-client-dev +++ b/docker/tools/song-client-dev @@ -8,4 +8,4 @@ DOCKERFILE_NAME=Dockerfile.dev \ MY_GID=$(id -g) \ docker-compose \ -f ${BASH_SCRIPT_DIR}/../..//docker-compose.yml \ - run --rm song-client bin/sing $@ + run --rm song-client sing $@ diff --git a/pom.xml b/pom.xml index 18d2c84fc..aab5813df 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ bio.overture song pom - 3.1.0 + 3.1.1 song-core song-java-sdk diff --git a/song-client/pom.xml b/song-client/pom.xml index fdd96a774..d6ebc6a3f 100644 --- a/song-client/pom.xml +++ b/song-client/pom.xml @@ -18,7 +18,7 @@ song bio.overture - 3.1.0 + 3.1.1 4.0.0 @@ -35,12 +35,12 @@ bio.overture song-java-sdk - 3.1.0 + 3.1.1 bio.overture song-core - 3.1.0 + 3.1.1 diff --git a/song-client/src/main/bin/sing b/song-client/src/main/bin/sing index cbd6ece6c..968926fc6 100755 --- a/song-client/src/main/bin/sing +++ b/song-client/src/main/bin/sing @@ -29,7 +29,7 @@ elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then # echo Found Java in JAVA_HOME _java="$JAVA_HOME/bin/java" else - echo "Java not found. Sing requires JDK 1.8" + echo "Java not found. Sing requires Java 11." exit 1 fi @@ -42,11 +42,13 @@ if [[ "$_java" ]]; then fi fi -current_dir=$PWD -fn=$0 -sing_home=$current_dir/`dirname $fn`/../ - -# -Dspring.config.location="$sing_home/conf/" \ +here=$(dirname $0) +if [ "$here" == "." ]; then + # This is the case, when the user runs this script from the ./bin directory + sing_home=../ +else + sing_home=${here%/bin} +fi java --illegal-access=deny \ -Dlog.name=song \ diff --git a/song-core/pom.xml b/song-core/pom.xml index 14fe5f6f3..db8c0de73 100644 --- a/song-core/pom.xml +++ b/song-core/pom.xml @@ -19,7 +19,7 @@ song bio.overture - 3.1.0 + 3.1.1 4.0.0 diff --git a/song-java-sdk/pom.xml b/song-java-sdk/pom.xml index 4b0250c72..fa2ebd095 100644 --- a/song-java-sdk/pom.xml +++ b/song-java-sdk/pom.xml @@ -18,7 +18,7 @@ song bio.overture - 3.1.0 + 3.1.1 4.0.0 diff --git a/song-server/pom.xml b/song-server/pom.xml index 04c99d2b9..5a41dfa7a 100644 --- a/song-server/pom.xml +++ b/song-server/pom.xml @@ -19,7 +19,7 @@ song bio.overture - 3.1.0 + 3.1.1 4.0.0 @@ -37,7 +37,7 @@ bio.overture song-core - 3.1.0 + 3.1.1