|
|
# GG-CE Installation Guide
|
|
|
|
|
|
###### *For IT administrators only*
|
|
|
|
|
|
#### Install GG-CE in three simple steps
|
|
|
# Install GG-CE in three simple steps
|
|
|
|
|
|
1. Set up MSSQL database.
|
|
|
1. Set up a MSSQL database.
|
|
|
2. Designate a volume for GG-CE file repository.
|
|
|
3. Update the Docker compose file and deploy your GG-CE services.
|
|
|
3. Update the Docker compose file and start up your instance of GG-CE.
|
|
|
|
|
|
|
|
|
# **NOTE: This guide is work-in-progress!**
|
|
|
|
|
|
# GG-CE Installation Guide
|
|
|
|
|
|
**GRIN-Global Community Edition** (GG-CE) is implemented through two main components: the GG-CE-Server and the GG-CE-Web client that provides a **web user interface** through which genebank staff interact with GG-CE.
|
|
|
|
... | ... | @@ -36,16 +38,16 @@ version: '3' |
|
|
|
|
|
services:
|
|
|
ggce-server:
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-server:2021.8
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
environment:
|
|
|
# Database connection
|
|
|
- DB_URL=jdbc:sqlserver://35.221.232.153:1433;DatabaseName=gringlobal
|
|
|
- DB_USERNAME=SA
|
|
|
- DB_PASSWORD=*****************
|
|
|
# Host names and URLs
|
|
|
- HOST_NAME=gserver.worldveg.org
|
|
|
- BASE_URL=http://gserver.worldveg.org
|
|
|
- FRONTEND_URL=http://gclient.worldveg.org
|
|
|
- HOST_NAME=gserver.genebank.org
|
|
|
- BASE_URL=http://gserver.#
|
|
|
- FRONTEND_URL=http://gclient.genebank.org
|
|
|
restart: always
|
|
|
networks:
|
|
|
- web
|
... | ... | @@ -56,15 +58,15 @@ services: |
|
|
labels:
|
|
|
- "traefik.docker.network=web"
|
|
|
- "traefik.enable=true"
|
|
|
- "traefik.basic.frontend.rule=Host:gserver.worldveg.org"
|
|
|
- "traefik.basic.frontend.rule=Host:gserver.genebank.org"
|
|
|
- "traefik.basic.port=8080"
|
|
|
- "traefik.basic.protocol=http"
|
|
|
|
|
|
ggce-ui:
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.8
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:latest
|
|
|
environment:
|
|
|
- API_URL=http://gserver.worldveg.org
|
|
|
- ORIGIN=http://gclient.worldveg.org
|
|
|
- API_URL=http://gserver.genebank.org
|
|
|
- ORIGIN=http://gclient.genebank.org
|
|
|
restart: always
|
|
|
networks:
|
|
|
- web
|
... | ... | @@ -75,7 +77,7 @@ services: |
|
|
labels:
|
|
|
- "traefik.docker.network=web"
|
|
|
- "traefik.enable=true"
|
|
|
- "traefik.basic.frontend.rule=Host:gclient.worldveg.org"
|
|
|
- "traefik.basic.frontend.rule=Host:gclient.genebank.org"
|
|
|
- "traefik.basic.port=3000"
|
|
|
- "traefik.basic.protocol=http"
|
|
|
networks:
|
... | ... | @@ -89,7 +91,7 @@ networks: |
|
|
|
|
|
An RDBMS needs to be available to GG-CE. You should use an existing database engine provided by your IT department, this ensures that your data is properly managed, secured, and backed up.
|
|
|
|
|
|
The **[MSSQL](https://www.microsoft.com/en-gb/sql-server/sql-server-2019)** database is the prefered database engine for both GRIN-Global and GRIN-Global Community Edition. While GG-CE allows you to use almost any RDBMS, if you want to use the **[Curator Tool](https://www.grin-global.org/download_ct.html)** with GG-CE, you must use the MSSQL database engine for which up-to-date queries are available. SQL queries for other engines are not actively maintained in the original GG.
|
|
|
MSSQL Server is the prefered database engine for both GRIN-Global and GG-CE. While GG-CE allows you to use almost any RDBMS, if you want to use the **[Curator Tool](https://www.grin-global.org/download_ct.html)** with GG-CE, you must use the MSSQL database engine for which up-to-date queries are available. SQL queries for other engines are not actively maintained.
|
|
|
|
|
|
The GG-CE server will detect a blank database and will automatically initialize the database schema and populate it with initial data on first startup.
|
|
|
|
... | ... | @@ -105,7 +107,7 @@ The important database options to note are: |
|
|
|
|
|
Connect to your MSSQL database instance and create a new database `ggce-db`. Please make sure that you use `SQL_Latin1_General_CP1_CI_AS` collation.
|
|
|
|
|
|
[TODO add screenshots from MSSQL Management Studio]
|
|
|
*TODO: Add screenshots from MSSQL Management Studio*
|
|
|
|
|
|
```sql
|
|
|
CREATE DATABASE ggce COLLATE SQL_Latin1_General_CP1_CI_AS
|
... | ... | @@ -116,33 +118,22 @@ Create separate credentials `ggce` for GG-CE to interact with the database: |
|
|
|
|
|
```sql
|
|
|
USE [master]
|
|
|
|
|
|
GO
|
|
|
|
|
|
CREATE LOGIN [ggce] WITH PASSWORD = 'someRandomPassword';
|
|
|
|
|
|
GO
|
|
|
|
|
|
-- Grant owner permissions on ggce-db
|
|
|
|
|
|
USE [ggce-db]
|
|
|
|
|
|
GO
|
|
|
|
|
|
CREATE USER [ggce] FOR LOGIN [ggce]
|
|
|
|
|
|
GO
|
|
|
|
|
|
ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [ggce]
|
|
|
|
|
|
GO
|
|
|
|
|
|
ALTER ROLE [db_owner] ADD MEMBER [ggce]
|
|
|
|
|
|
GO
|
|
|
```
|
|
|
|
|
|
GG-CE will detect that the database is blank and will automatically create the database schema and populate it with the initial data, including the default administrator/administrator user account.
|
|
|
At startup GG-CE will detect if the database is blank and will automatically create the database schema and populate it with the initial data, including the default administrator/administrator user account.
|
|
|
|
|
|
## Using an existing GRIN-Global database
|
|
|
|
... | ... | @@ -158,7 +149,9 @@ GG-CE is backwards compatible with the original GRIN-Global databases. You can u |
|
|
|
|
|
## Running MSSQL as a Docker container
|
|
|
|
|
|
For testing on macOS and Linux you can run [MSSQL Express](https://www.microsoft.com/en-gb/sql-server/sql-server-2019) as a Docker container. A docker volume is where the server will persist data between service restarts.
|
|
|
For testing on macOS and Linux you can run MSSQL Express as a Docker container.
|
|
|
|
|
|
Note: use a Docker volume to persist the data between service restarts.
|
|
|
|
|
|
```bash
|
|
|
# Create a volume for MSSQL data
|
... | ... | @@ -246,7 +239,7 @@ Start **GG-CE Server** as a Docker container: |
|
|
|
|
|
```bash
|
|
|
# Pull latest image
|
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-server:2021.10
|
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
|
|
|
# Start GRIN-Global Server
|
|
|
# Make sure that address for MSSQL "jdbc:sqlserver://172.17.0.2:1433" is
|
... | ... | @@ -261,7 +254,7 @@ docker run --rm --name 'ggce-server' \ |
|
|
-e "FRONTEND_URL=http://${YOUR_DOCKER_HOST_IP}:3000" \
|
|
|
-e "DATA_DIR=/data/gringlobal" \
|
|
|
-v ggce-server-data:/data/gringlobal \
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-server:2021.10
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
```
|
|
|
|
|
|
***Note*:** After hitting **Enter** You should immediately seeing log messages on the console. If not, then your command is not valid. Hit `Ctrl + C` and retry.
|
... | ... | @@ -277,33 +270,12 @@ and port **8081** (if you used the command above) at `http://your-docker-host:80 |
|
|
To get the latest version of the image you need to pull the latest *edge* image and recreate your container:
|
|
|
|
|
|
```bash
|
|
|
docker pull dockerhub.croptrust.org/grin-global/grin-global-server:2021.11-edge
|
|
|
docker pull dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
docker stop ggce-server
|
|
|
docker remove ggce-server # if the container name is still defined
|
|
|
docker run... # as above
|
|
|
```
|
|
|
|
|
|
### Next release
|
|
|
|
|
|
The preview of the next version is available as `dockerhub.croptrust.org/grin-global/grin-global-server:2021.11-edge` and you should update your copy of the image before *restarting* your container:
|
|
|
|
|
|
```bash
|
|
|
# Current development version
|
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-server:edge
|
|
|
```
|
|
|
|
|
|
## First Start
|
|
|
|
|
|
Once you can connect to your GG-CE Server, navigate to the Admin section and:
|
|
|
|
|
|
1. Load **Geography** data
|
|
|
1. Load **Taxonomy** data
|
|
|
1. Click **Inspect logs** button and wait for `Taxonomy database updated successfully` message.
|
|
|
1. Optionally fetch **accession passport data** from Genesys
|
|
|
|
|
|
Consider installing [GG-CE Web](https://gitlab.croptrust.org/grin-global/grin-global-ui).
|
|
|
|
|
|
|
|
|
|
|
|
# GG-CE Web Client
|
|
|
|
... | ... | @@ -314,17 +286,8 @@ Please check https://gitlab.croptrust.org/grin-global/grin-global-ui/-/releases |
|
|
|
|
|
## Running GG-CE Web
|
|
|
|
|
|
**GG-CE Web** is available as a Docker image
|
|
|
**GG-CE Web** is available as a Docker image `dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:latest`. It works best with the latest GG-CE Server image `dockerhub.croptrust.org/grin-global/grin-global-server:latest`.
|
|
|
|
|
|
```bash
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:latest
|
|
|
```
|
|
|
|
|
|
It works best with [GG-CE Server](https://gitlab.croptrust.org/grin-global/grin-global-server) image
|
|
|
|
|
|
```bash
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
```
|
|
|
|
|
|
The **GG-CE Web** container requires a few configuration options. The options are provided as environment variables. You need to note:
|
|
|
|
... | ... | @@ -384,11 +347,7 @@ Application config { |
|
|
|
|
|
## Next release
|
|
|
|
|
|
The preview of the next release is available as
|
|
|
|
|
|
```bash
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:edge
|
|
|
```
|
|
|
The preview of the next release is available as `dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:edge`.
|
|
|
|
|
|
You should update your copy of the image before **restarting** your container:
|
|
|
|
... | ... | @@ -397,7 +356,6 @@ docker image pull dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:e |
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# GG-CE Deployment
|
|
|
|
|
|
## Use Traefik to run the containers
|
... | ... | @@ -425,7 +383,7 @@ Setting environment variables in the compose file: |
|
|
version: '3'
|
|
|
services:
|
|
|
ggce-server:
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-server:2021.8
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-server:latest
|
|
|
environment:
|
|
|
# Database connection
|
|
|
- DB_URL=jdbc:sqlserver://DATABASE_SERVER:1433;DatabaseName=DATABASE
|
... | ... | @@ -454,7 +412,7 @@ Relevant `gg-ce-web` configuration is documented at https://gitlab.croptrust.org |
|
|
|
|
|
```yaml
|
|
|
ggce-ui:
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.8
|
|
|
image: dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:latest
|
|
|
environment:
|
|
|
- API_URL=http://ggceserver.mydomain
|
|
|
- ORIGIN=http://ggceweb.mydomain
|
... | ... | @@ -463,12 +421,11 @@ Relevant `gg-ce-web` configuration is documented at https://gitlab.croptrust.org |
|
|
|
|
|
### All system options
|
|
|
|
|
|
**GG-CE** accepts a number of system configuration options. The full list and their default values are listed in [`application.properties`](https://gitlab.croptrust.org/grin-global/grin-global-server/-/blob/v2021.8/server/src/main/resources/application.properties) for `v2021.8`.
|
|
|
**GG-CE** accepts a number of system configuration options. The full list and their default values are listed in [application.properties](https://gitlab.croptrust.org/grin-global/grin-global-server/-/blob/main/server/src/main/resources/application.properties).
|
|
|
|
|
|
Default database connection parameters, for example, are:
|
|
|
For example, the default database connection parameters are:
|
|
|
|
|
|
```properties
|
|
|
# Connection to MSSQL
|
|
|
db.url=jdbc:sqlserver://localhost:1433;DatabaseName=gringlobal
|
|
|
db.username=sa
|
|
|
db.password=sa1
|
... | ... | |