Skip to content

Commit

Permalink
Preparing version 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fikipollo committed Nov 7, 2017
1 parent 3c825e4 commit 9056629
Show file tree
Hide file tree
Showing 13 changed files with 288 additions and 694 deletions.
696 changes: 21 additions & 675 deletions LICENSE

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@

**STATegra EMS** was published at **BMC Systems Biology** on March 2014, you can find an open-access version for the article here.

*STATegra EMS: an experiment management system for complex next-generation omics experiments.*
Hernández R, Boix-Chova N, Gómez-Cabrero D, Tegner J, Abugessaisa I, Conesa A
BMC Syst Biol 2014, 8(Suppl 2):S9. [[Link]](http://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-8-S2-S9)
- 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.

## How to install
Since version 0.6, the STATegra EMS includes an auto-installer script which makes easier to deploy and configure the the system. Please visit the STATegra EMS documentation for [more information](http://stategraems.readthedocs.io/en/latest/installation/install/).

#### Docker for STATegra EMS
The STATegra EMS Docker Image is an easy distributable full-fledged STATegra EMS installation. Using dockers you can easily deploy your own instance of STATegra EMS in few seconds. [Read more](https://github.com/fikipollo/stategraems-docker)

The STATegra EMS Docker Image is an easy distributable full-fledged STATegra EMS installation. Using dockers you can easily deploy your own instance of STATegra EMS in few seconds. [Read more](tree/master/docker)

## Documentation
A complete documentation is available at the [**readthedocs** platform](http://stategraems.readthedocs.io/en/latest/).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
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 modified dist/stategraems.war
Binary file not shown.
35 changes: 35 additions & 0 deletions docker/Dockerfile
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/"]
21 changes: 21 additions & 0 deletions docker/LICENSE
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.
82 changes: 82 additions & 0 deletions docker/README.md
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.
56 changes: 56 additions & 0 deletions docker/docker-compose-template.yml
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
40 changes: 40 additions & 0 deletions docker/docker-compose.yml
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
32 changes: 22 additions & 10 deletions docs/about/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@
<img src="../img/stategraems_logo.png" title="STATegra EMS LOGO."/>
</div>

The **STATegra EMS** application is distributed under **GNU General Public License, Version 3**.
<div class="imageContainer" style="text-align:center; font-size:10px; color:#898989" >
<img src="../img/gplv3-127x51.png" title="GNU GENERAL PUBLIC LICENSE Version 3 logo."/>
</div>

This program is **free software**; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but **WITHOUT ANY WARRANTY**; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses](http://www.gnu.org/licenses).
The **STATegra EMS** application is distributed under **MIT License**.
MIT License

Copyright (c) 2017 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.


**STATegra EMS** is part of the [STATegra Project](http://stategra.eu) and was developed by the [Genomics of Gene Expression Lab](http://bioinfo.cipf.es/aconesawp/) at [Príncipe Felipe Research Centre](http://www.cipf.es/).
Expand Down
2 changes: 1 addition & 1 deletion src/java/conf/data_location.properties
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
2 changes: 1 addition & 1 deletion src/java/conf/version.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
STATegra EMS
v0.9
May 2017
Nov 2017
4 changes: 2 additions & 2 deletions web/app/admin/admin.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="col-md-12" style="margin-top:20px;text-align: center;">
<h1 class="form_title" style=" text-align: center; font-size: 45px;">STATegra EMS settings</h1>
<div class="panel panel-container">
<a class="btn btn-default homeMainButton" >
<i class="fa fa-database fa-5" aria-hidden="true" ng-click="controller.sendBackupRequestHandler()"></i><p>Backup DB</p>
<a class="btn btn-default homeMainButton" ng-click="controller.sendBackupRequestHandler()">
<i class="fa fa-database fa-5" aria-hidden="true" ></i><p>Backup DB</p>
</a>
<h4>Please choose an option below to start working</h4>
</div>
Expand Down

0 comments on commit 9056629

Please sign in to comment.