Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
EGA
ega-data-api
Commits
db6911fc
Unverified
Commit
db6911fc
authored
May 13, 2022
by
Emilio Garcia
Committed by
GitHub
May 13, 2022
Browse files
Merge pull request #213 from EGA-archive/bugfix/EE-2415
Bugfix/EE-2415
parents
829a4424
447ec377
Pipeline
#297424
passed with stages
in 4 minutes and 36 seconds
Changes
6
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
2 deletions
+143
-2
.gitignore
.gitignore
+2
-0
ega-data-api-dataedge/src/main/java/eu/elixir/ega/ebi/dataedge/rest/FileController.java
.../java/eu/elixir/ega/ebi/dataedge/rest/FileController.java
+3
-0
ega-data-api-dataedge/src/main/java/eu/elixir/ega/ebi/dataedge/service/internal/RemoteFileServiceImpl.java
.../ebi/dataedge/service/internal/RemoteFileServiceImpl.java
+3
-0
ega-data-api-res/pom.xml
ega-data-api-res/pom.xml
+16
-2
ega-data-api-res/src/main/java/eu/elixir/ega/ebi/reencryptionmvc/rest/FileController.java
...u/elixir/ega/ebi/reencryptionmvc/rest/FileController.java
+3
-0
startall.sh
startall.sh
+116
-0
No files found.
.gitignore
View file @
db6911fc
...
@@ -46,3 +46,5 @@ __pycache__
...
@@ -46,3 +46,5 @@ __pycache__
# Personal files
# Personal files
personal
personal
local_run
config-map
ega-data-api-dataedge/src/main/java/eu/elixir/ega/ebi/dataedge/rest/FileController.java
View file @
db6911fc
...
@@ -22,7 +22,9 @@ import eu.elixir.ega.ebi.commons.shared.service.AuthenticationService;
...
@@ -22,7 +22,9 @@ import eu.elixir.ega.ebi.commons.shared.service.AuthenticationService;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
eu.elixir.ega.ebi.dataedge.service.FileService
;
import
eu.elixir.ega.ebi.dataedge.service.FileService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.Authentication
;
...
@@ -39,6 +41,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.*;
...
@@ -39,6 +41,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.*;
* @author asenf
* @author asenf
*/
*/
@RestController
@RestController
@Scope
(
value
=
ConfigurableBeanFactory
.
SCOPE_PROTOTYPE
)
@EnableDiscoveryClient
@EnableDiscoveryClient
@Slf4j
@Slf4j
@RequestMapping
(
"/files"
)
@RequestMapping
(
"/files"
)
...
...
ega-data-api-dataedge/src/main/java/eu/elixir/ega/ebi/dataedge/service/internal/RemoteFileServiceImpl.java
View file @
db6911fc
...
@@ -56,9 +56,11 @@ import okhttp3.OkHttpClient;
...
@@ -56,9 +56,11 @@ import okhttp3.OkHttpClient;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerClient
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerClient
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
@@ -89,6 +91,7 @@ import static eu.elixir.ega.ebi.commons.config.Constants.RES_SERVICE;
...
@@ -89,6 +91,7 @@ import static eu.elixir.ega.ebi.commons.config.Constants.RES_SERVICE;
import
static
org
.
apache
.
catalina
.
connector
.
OutputBuffer
.
DEFAULT_BUFFER_SIZE
;
import
static
org
.
apache
.
catalina
.
connector
.
OutputBuffer
.
DEFAULT_BUFFER_SIZE
;
@Service
@Service
@Scope
(
value
=
ConfigurableBeanFactory
.
SCOPE_PROTOTYPE
)
@EnableDiscoveryClient
@EnableDiscoveryClient
@Slf4j
@Slf4j
public
class
RemoteFileServiceImpl
implements
FileService
{
public
class
RemoteFileServiceImpl
implements
FileService
{
...
...
ega-data-api-res/pom.xml
View file @
db6911fc
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
<artifactId>
spring-boot-starter-aop
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
log4j-over-slf4j
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
...
@@ -37,7 +43,7 @@
...
@@ -37,7 +43,7 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
<artifactId>
spring-context-support
</artifactId>
...
@@ -154,12 +160,20 @@
...
@@ -154,12 +160,20 @@
<groupId>
com.github.uio-bmi
</groupId>
<groupId>
com.github.uio-bmi
</groupId>
<artifactId>
crypt4gh
</artifactId>
<artifactId>
crypt4gh
</artifactId>
<version>
v1.2.1
</version>
<version>
v1.2.1
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-jdk14
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.minio
</groupId>
<groupId>
io.minio
</groupId>
<artifactId>
minio
</artifactId>
<artifactId>
minio
</artifactId>
<version>
5.0.1
</version>
<version>
5.0.1
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
uk.ac.ebi.ega
</groupId>
<groupId>
uk.ac.ebi.ega
</groupId>
<artifactId>
fire-v3-core
</artifactId>
<artifactId>
fire-v3-core
</artifactId>
...
@@ -171,7 +185,7 @@
...
@@ -171,7 +185,7 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- Test -->
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
...
ega-data-api-res/src/main/java/eu/elixir/ega/ebi/reencryptionmvc/rest/FileController.java
View file @
db6911fc
...
@@ -24,7 +24,9 @@ import htsjdk.samtools.seekablestream.ebi.BufferedBackgroundInputStream;
...
@@ -24,7 +24,9 @@ import htsjdk.samtools.seekablestream.ebi.BufferedBackgroundInputStream;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.ServletContext
;
import
javax.servlet.ServletContext
;
...
@@ -46,6 +48,7 @@ import java.util.stream.StreamSupport;
...
@@ -46,6 +48,7 @@ import java.util.stream.StreamSupport;
* @author asenf
* @author asenf
*/
*/
@RestController
@RestController
@Scope
(
value
=
ConfigurableBeanFactory
.
SCOPE_PROTOTYPE
)
@EnableDiscoveryClient
@EnableDiscoveryClient
@Slf4j
@Slf4j
@RequestMapping
(
"/file"
)
@RequestMapping
(
"/file"
)
...
...
startall.sh
0 → 100755
View file @
db6911fc
#!/bin/bash
## This script will launch the main components for data-api (config, eureka, key, filedatabase)
## Please run the following components in debug mode: res, data-edge, htsget
#Save current dir for future usage
DIR
=
$(
pwd
)
RUNDIR
=
$DIR
/local_run
LOG_DIR
=
$RUNDIR
/logs
VERSION
=
1.2.1-SNAPSHOT
mkdir
-p
$LOG_DIR
echo
"Building project with maven in background..."
mvn clean
install
>
/dev/null
echo
"Done compiling."
#-------------------------------
echo
"Launching config server..."
cd
ega-data-api-netflix/ega-data-api-config
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-netflix/ega-data-api-config/target/ega-data-api-config-
$VERSION
.jar
>
$LOG_DIR
/config.logs 2>&1 &
echo
"config:
$!
"
>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching eureka server..."
cd
ega-data-api-netflix/ega-data-api-eureka
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-netflix/ega-data-api-eureka/target/ega-data-api-eureka-
$VERSION
.jar
>
$LOG_DIR
/eureka.logs 2>&1 &
echo
"eureka:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching key server..."
cd
ega-data-api-key
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-key/target/ega-data-api-key-
$VERSION
.jar
>
$LOG_DIR
/key.logs 2>&1 &
echo
"key:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching file-database server..."
cd
ega-data-api-filedatabase
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-filedatabase/target/ega-data-api-filedatabase-
$VERSION
.jar
>
$LOG_DIR
/file.logs 2>&1 &
echo
"filedatabase:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching res server..."
cd
ega-data-api-res
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-res/target/ega-data-api-res-
$VERSION
.jar
>
$LOG_DIR
/res.logs 2>&1 &
echo
"res:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching dataedge server..."
cd
ega-data-api-dataedge
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-dataedge/target/ega-data-api-dataedge-
$VERSION
.jar
>
$LOG_DIR
/dataedge.logs 2>&1 &
echo
"dataedge:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
"Launching htsget server..."
cd
ega-data-api-htsget
mvn package spring-boot:repackage
>
/dev/null
cd
$DIR
nohup
java
-jar
ega-data-api-htsget/target/ega-data-api-htsget-
$VERSION
.jar
>
$LOG_DIR
/htsget.logs 2>&1 &
echo
"htsget:
$!
"
>>
$RUNDIR
/process_ids.txt
#-------------------------------
echo
""
echo
"All processes started (Name: PID)"
cat
$RUNDIR
/process_ids.txt
echo
""
echo
"Logs:
$LOG_DIR
"
ls
-ltrh
$LOG_DIR
echo
""
read
-n
1
-r
-s
-p
$'Press enter to exit...'
#-------------------------------
echo
"Killing all processes:"
PIDS
=
"
$(
cat
$RUNDIR
/process_ids.txt |
awk
-F
' '
'{print $2}'
|
paste
-s
-d
' '
)
"
KILL_COMMAND
=
"kill -9
$PIDS
"
echo
" ->
$KILL_COMMAND
"
eval
$KILL_COMMAND
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment