-
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.
- Loading branch information
Showing
13 changed files
with
288 additions
and
694 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
STATegra EMS v0.9 May 2017 | ||
STATegra EMS v0.9 Nov 2017 |
Binary file not shown.
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,35 @@ | ||
############################################################ | ||
# Dockerfile to build STATegra EMS container images | ||
# Based on tomcat | ||
############################################################ | ||
|
||
# Set the base image to official Tomcat | ||
FROM tomcat | ||
|
||
# File Author / Maintainer | ||
MAINTAINER Rafa Hernandez <https://github.com/fikipollo> | ||
|
||
################## BEGIN INSTALLATION ###################### | ||
# Install MySQL client for connecting to the MySQL component | ||
RUN apt-get update && apt-get install -y mysql-client | ||
|
||
# Download the lastest image of STATegra EMS | ||
RUN wget -O /tmp/stategraems.zip https://github.com/fikipollo/stategraems/archive/develop.zip \ | ||
#RUN wget -O /tmp/stategraems.zip https://github.com/fikipollo/stategraems/archive/v0.8.zip \ | ||
&& unzip /tmp/stategraems.zip -d /tmp/stategraems \ | ||
&& cp /tmp/stategraems/*/dist/stategraems.war /usr/local/tomcat/webapps/ \ | ||
&& rm -r /tmp/stategraems \ | ||
&& rm -r /tmp/stategraems.zip \ | ||
&& sleep 10 \ | ||
&& rm -r /usr/local/tomcat/webapps/ROOT \ | ||
&& ln -s /usr/local/tomcat/webapps/stategraems /usr/local/tomcat/webapps/ROOT \ | ||
&& echo "export is_docker=true" >> /usr/local/tomcat/bin/setenv.sh \ | ||
&& chmod +x /usr/local/tomcat/bin/setenv.sh | ||
|
||
##################### INSTALLATION END ##################### | ||
|
||
# Expose port 8080 (tomcat) | ||
EXPOSE :80 | ||
|
||
# Mark folders as imported from the host. | ||
VOLUME ["/data/"] |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Rafa Hernandez <https://github.com/fikipollo> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,82 @@ | ||
STATegra EMS Docker Image | ||
=================== | ||
The [STATegra EMS](https://github.com/fikipollo/stategraems) [Docker](http://www.docker.io) Image is an easy distributable full-fledged STATegra EMS installation. | ||
|
||
STATegra EMS is an *Experiment Management System* (EMS) for omics experiments that supports different types of sequencing-based assays, proteomics and metabolomics data. STATegra EMS was developed as part of the [STATegra Project](http://www.stategra.eu), which has received funding from the European Union’s FP7 research and innovation programme. | ||
|
||
- Citation: | ||
> Hernández-de-Diego R, Boix-Chova N, Gómez-Cabrero D, Tegner J, Abugessaisa I, and Conesa A. STATegra EMS: an Experiment Management System for complex next-generation omics experiments. BMC Syst Biol. 2014;8 Suppl 2:S9. doi: 10.1186/1752-0509-8-S2-S9. | ||
# Build the image | ||
The docker image for STATegra EMS can be found in the [docker hub](https://hub.docker.com/r/fikipollo/stategraems/). However, you can rebuild is manually by running **docker build**. | ||
|
||
```sh | ||
sudo docker build -t stategraems . | ||
``` | ||
Note that the current working directory must contain the Dockerfile file. | ||
|
||
## Running the Container | ||
The recommended way for running your STATegra EMS docker is using the provided **docker-compose** script that resolves the dependencies and make easier to customize your instance. Alternatively you can run the docker manually. In both cases the first time that you access to your STATegra EMS instance the system will be auto-installed. You can easily customize the installation by changing some system variables, you can find the list of available variables in the next section. | ||
|
||
## Quickstart | ||
This procedure starts STATegra EMS in a standard virtualised environment. | ||
|
||
- Install [docker](https://docs.docker.com/engine/installation/) for your system if not previously done. | ||
- `docker run -it -p 8080:80 fikipollo/stategraems` | ||
- STATegra EMS will be available at [http://localhost:8080/](http://localhost:8080/) | ||
|
||
## Using the docker-compose file | ||
Launching your STATegra EMS docker is really easy using docker-compose. Just download the *docker-compose.yml* file and customize the content according to your needs. There are few settings that should be change in the file, follow the instructions in the file to configure your container. | ||
To launch the container, type: | ||
```sh | ||
sudo docker-compose up | ||
``` | ||
Using the *-d* flag you can launch the containers in background. | ||
|
||
In case you do not have the Container stored locally, docker will download it for you. | ||
|
||
## Run manually | ||
You can run manually your containers using the following commands: | ||
|
||
```sh | ||
sudo docker run --name stategraems-mysql -v /your/data/location/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=yoursecretpass -d mysql | ||
sudo docker run --name stategraems-tomcat -e MYSQL_ROOT_PASSWORD=yoursecretpass --link stategraems-mysql -v /your/data/location:/data -p 8080:8080 -d fikipollo/stategraems | ||
``` | ||
|
||
In case you do not have the Container stored locally, docker will download it for you. | ||
|
||
A short description of the parameters would be: | ||
- `docker run` will run the container for you. | ||
|
||
- `-p 8080:8080` will make the port 8080 (inside of the container) available on port 8080 on your host. | ||
Inside the container an Tomcat Webserver is running on port 8080 and that port can be bound to a local port on your host computer. | ||
With this parameter you can access to the STATegraEMS instance via `http://localhost:8080` immediately after executing the command above. | ||
|
||
- `fikipollo/stategraems` is the Image name, which can be found in the [docker hub](https://hub.docker.com/r/fikipollo/stategraems/). | ||
|
||
- `-d` will start the docker container in daemon mode. | ||
|
||
- `-e VARIABLE_NAME=VALUE` changes the default value for a system variable. | ||
The STATegra EMS docker accepts the following variables that modify the **INSTALLATION** of the system in the docker. | ||
Note that all the values are optional but the **MYSQL_ROOT_PASSWORD** which must be the same password for the MySQL container. | ||
|
||
- **EMS_ADMIN_USER**, the email for the admin account (default value is *[email protected]*). | ||
- **EMS_ADMIN_PASSWORD**, the password for the admin account (default value is *[email protected]*). | ||
- **MYSQL_ROOT_USER**, the root user for the MySQL instance (default value is *root*). | ||
- **MYSQL_ROOT_PASSWORD**, the password for the MySQL root user (**mandatory**). | ||
- **MYSQL_DATABASE_NAME**, the name for the MySQL database (default value is *STATegraDB*). | ||
- **MYSQL_HOST**, the name for the MySQL container (default value is *stategraems-mysql*). | ||
- **MYSQL_EMS_USER**, the name for the MySQL user that will be used for administrate the databases (default value is *emsuser*). | ||
- **MYSQL_EMS_PASS**, the password for the MySQL user (default value is autogenerated). | ||
|
||
For an interactive session, you can execute : | ||
|
||
```sh | ||
sudo docker exec -it stategraems-tomcat bash | ||
``` | ||
|
||
# First configuration for STATegra EMS | ||
The first time that you access to your STATegra EMS instance you will need to configure some of the main settings. | ||
|
||
# Version log | ||
- v0.8 March 2017: First version of the docker. |
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,56 @@ | ||
############################################################ | ||
# Launcher for STATegraEMS container | ||
# This is a template, the following values must be replaced: | ||
# - $${INSTANCE_NAME}, name for the instance | ||
# - $${INSTANCE_PORT_1}, port number for STATegraEMS instance | ||
# - $${ADMIN_USER}, email for admin user | ||
# - $${ADMIN_PASS}, password for admin user | ||
# - $${MYSQL_ROOT_PASSWORD}, password for the mysql server | ||
# Optional params, Uncomment theM and change the values to not use default values. | ||
# - $${MYSQL_ROOT_USER}, root user for the mysql server | ||
# - $${MYSQL_DATABASE_NAME}, database name for the mysql server | ||
# - $${MYSQL_HOST}, host for the mysql server | ||
# - $${MYSQL_EMS_USER}, name for the mysql user for the EMS database | ||
# - $${MYSQL_EMS_PASS}, password for the mysql user for the EMS database | ||
############################################################ | ||
|
||
version: '2' | ||
services: | ||
|
||
$${INSTANCE_NAME}-ems: | ||
image: fikipollo/stategraems | ||
container_name: $${INSTANCE_NAME}-ems | ||
environment: | ||
- EMS_ADMIN_USER=$${ADMIN_USER} | ||
- EMS_ADMIN_PASSWORD=$${ADMIN_PASS} | ||
- MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD} | ||
##OPTIONAL PARAMS (DEFAULT VALUES IF REMOVED) | ||
#- MYSQL_ROOT_USER=$${MYSQL_ROOT_USER} | ||
#- MYSQL_DATABASE_NAME=$${MYSQL_DATABASE_NAME} | ||
#- MYSQL_HOST=$${MYSQL_HOST} | ||
#- MYSQL_EMS_USER=$${MYSQL_EMS_USER} | ||
links: | ||
- $${INSTANCE_NAME}-mysql:stategraems-mysql | ||
depends_on: | ||
- $${INSTANCE_NAME}-mysql | ||
volumes_from: | ||
- $${INSTANCE_NAME}-data | ||
ports: | ||
- "$${INSTANCE_PORT_1}:8080" | ||
|
||
$${INSTANCE_NAME}-mysql: | ||
image: mysql:5.7 | ||
container_name: $${INSTANCE_NAME}-mysql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD} | ||
depends_on: | ||
- $${INSTANCE_NAME}-data | ||
volumes_from: | ||
- $${INSTANCE_NAME}-data | ||
|
||
$${INSTANCE_NAME}-data: | ||
image: busybox | ||
container_name: $${INSTANCE_NAME}-data | ||
volumes: | ||
- /data/$${INSTANCE_NAME}-data/mysql:/var/lib/mysql | ||
- /data/$${INSTANCE_NAME}-data/data:/data |
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,40 @@ | ||
version: '2' | ||
services: | ||
|
||
instance1-ems: | ||
image: fikipollo/stategraems | ||
container_name: instance1-ems | ||
environment: | ||
- [email protected] | ||
- EMS_ADMIN_PASSWORD=supersecret | ||
- MYSQL_ROOT_PASSWORD=supersupersecret | ||
##OPTIONAL PARAMS (DEFAULT VALUES IF REMOVED) | ||
#- MYSQL_ROOT_USER=root | ||
#- MYSQL_DATABASE_NAME=STATegraDB | ||
#- MYSQL_HOST=stategraems-mysql | ||
#- MYSQL_EMS_USER=emsuser | ||
links: | ||
- instance1-mysql:stategraems-mysql | ||
depends_on: | ||
- instance1-mysql | ||
volumes_from: | ||
- instance1-data | ||
ports: | ||
- "8080:8080" | ||
|
||
instance1-mysql: | ||
image: mysql:5.7 | ||
container_name: instance1-mysql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=supersupersecret | ||
depends_on: | ||
- instance1-data | ||
volumes_from: | ||
- instance1-data | ||
|
||
instance1-data: | ||
image: busybox | ||
container_name: instance1-data | ||
volumes: | ||
- /data/instance1-data/mysql:/var/lib/mysql | ||
- /data/instance1-data/data:/data |
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,3 +1,3 @@ | ||
# SET THE LOCATION FOR THE DATA OF THE APPLICATION | ||
data_location=/data/stategraems_app_data | ||
debugging_mode=true | ||
debugging_mode=false |
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,3 +1,3 @@ | ||
STATegra EMS | ||
v0.9 | ||
May 2017 | ||
Nov 2017 |
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