Commit 75aaec61 authored by Matija Obreza's avatar Matija Obreza

Preparing 2.1 release

parent 15aa2b70
variables:
GENESYS_VERSION: "2.0"
GENESYS_VERSION: "2.1"
DOCKER_HOST: genesys1.swarm.genesys-pgr.org
DOCKER_VERSION: latest
......@@ -17,6 +17,8 @@ compile and test:
- production
- tags
script:
- echo "CI_COMMIT_REF_SLUG ${CI_COMMIT_REF_SLUG}"
- echo "CI_ENVIRONMENT_SLUG ${CI_ENVIRONMENT_SLUG}"
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn compile test -B
.package_template: &maven_package
......
# Genesys PGR - Gateway to genetic resources
**Note:** This is the source code of the Genesys PGR Portal implementation running
at https://www.genesys-pgr.org
**Note:** This is the source code of the Genesys PGR Portal implementation running at <https://www.genesys-pgr.org>
These instructions will help you run a copy of the Genesys portal (without the data) for testing and development purposes.
## Running genesys2-server with Docker
These instructions will help you run a copy of the Genesys portal (without the
data) for testing and development purposes.
```shell
docker run dockerhub.croptrust.org/genesys-pgr/genesys-server:2.1
```
The genesys container can be configured via environment variables (`-e` docker flag).
## Running genesys2-server with jetty
Obtain a copy of `genesys2-server-X.Y.Z-jetty.zip` archive by
building the project. The zip can be found in target/ directory.
Obtain a copy of `genesys2-server-X.Y.Z-jetty.zip` archive by building the project. The zip can be found in target/ directory.
$ mvn clean package
```shell
mvn clean package
```
Download a **stable-9** copy of [jetty](http://download.eclipse.org/jetty/) and unpack it
to your favorite location.
Download a **stable-9** copy of [jetty](http://download.eclipse.org/jetty/) and unpack it to your favorite location.
Unpack `genesys2-server-X.Y.Z-jetty.zip` archive and move its contents into the jetty directory,
next to existing `demo-base` and `webapps` directories.
Unpack `genesys2-server-X.Y.Z-jetty.zip` archive and move its contents into the jetty directory, next to existing `demo-base` and `webapps` directories.
Start jetty from the `genesys2-server-X.Y.Z-jetty` base
$ cd genesys2-server-X.Y.Z-jetty/
$ java -jar ../start.jar
```shell
cd genesys2-server-X.Y.Z-jetty/
java -jar ../start.jar
```
STDOUT is used for logging.
This configuration uses HSQL database and is intended for testing genesys2-server.
To change the database settings, edit `genesys2-server-X.Y.Z-jetty/resources/genesys.properties` file:
# mysql
db.url=jdbc:mysql://localhost/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
db.username=root
db.password=mysql
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
This configuration uses HSQL database and is intended for testing genesys2-server. To change the database settings, edit `genesys2-server-X.Y.Z-jetty/resources/genesys.properties` file:
The complete list of available configuration options and their default values can be found
in [spring.properties](https://bitbucket.org/genesys2/genesys2-server/src/master/src/main/resources/spring/spring.properties).
```.properties
# mysql
db.url=jdbc:mysql://localhost/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
db.username=root
db.password=mysql
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
```
The complete list of available configuration options and their default values can be found in [spring.properties](/src/main/resources/spring/spring.properties).
## Running genesys2-server with maven
* Clone genesys2-server to your computer
* Create a blank mysql database
* Configure genesys2-server database connection settings
* Start Jetty with `mvn -Dspring.profiles.active=dev jetty:run`
- Clone genesys2-server to your computer
- Create a blank mysql database
- Configure genesys2-server database connection settings
- Start Jetty with `mvn -Dspring.profiles.active=dev jetty:run`
### Creating a mysql database
Connect to your mysql instance and create a new blank database **genesys2**:
Connect to your mysql instance and create a new blank database **genesys**:
# Create database
CREATE DATABASE genesys2 DEFAULT CHARSET UTF8;
```sql
-- Create database
CREATE DATABASE genesys DEFAULT CHARSET UTF8;
# Create user genesys with password pwd
GRANT ALL ON genesys2.* TO 'genesys'@'localhost' IDENTIFIED BY 'pwd';
-- Create user genesys with password pwd
GRANT ALL ON genesys.* TO 'genesys'@'localhost' IDENTIFIED BY 'pwd';
```
Change the settings in `src/main/resources/spring/spring.properties`:
# genesys2 with mysql database
db.url=jdbc:mysql://localhost/genesys2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
db.username=genesys
db.password=pwd
db.showSql=false
# Allow hibernate to update database (development/testing mode only)
db.hbm2ddl=update
```.properties
# genesys2 with mysql database
db.url=jdbc:mysql://localhost/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
db.username=genesys
db.password=pwd
db.showSql=false
# Allow hibernate to update database (development/testing mode only)
db.hbm2ddl=update
```
......@@ -23,7 +23,7 @@
<name>Genesys 2 Server</name>
<packaging>war</packaging>
<version>2.0</version>
<version>2.1</version>
<url>https://www.genesys-pgr.org</url>
<description>Genesys 2 Server</description>
......@@ -38,7 +38,7 @@
<connection>https://bitbucket.org/genesys2/genesys2-server.git</connection>
<developerConnection>scm:git:git@bitbucket.org:genesys2/genesys2-server.git</developerConnection>
<url>git@bitbucket.org:genesys2/genesys2-server.git</url>
<tag>genesys2-server-2.0</tag>
<tag>genesys2-server-2.1</tag>
</scm>
<organization>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment