|
|
# Overview
|
|
|
|
|
|
**GRIN-Global Community Edition** is an evolution of the original GRIN-Global [ASP.Net](https://dotnet.microsoft.com/apps/aspnet) web application running on [IIS](https://www.iis.net) on a Windows Server.
|
|
|
|
|
|
The application is divided into two main components: the *server* and the *client*.
|
|
|
|
|
|
![server-client](images/server-client.png)
|
|
|
|
|
|
The **GG-Server** manages the applicartion business logic and the [database](https://www.microsoft.com/en-gb/sql-server) which stores the application data. It communicates with the **GG-Client** that provides a web user interface to the application. The server implements both a SOAP and JSON API, the first makes it backward compatible with GG, allowing for use of the Curator Tool and other software that uses the SOAP protocol; the second represents the protocol used by the GC-client to communicate with the server.
|
|
|
|
|
|
Both server and client components are packaged as Docker images and designed for container deployment on Windows, Linux and macos hosts. This makes it easy for IT department to deploy, manage, backup and upgrade individual components automatically. Containers can run on different hosts as long as they are able to communicate on designated ports. Only the HTTPS port is exposed to the outside world.
|
|
|
|
|
|
Following, are the installation instructions for the server and the client.
|
|
|
|
|
|
# GG-CE Server
|
|
|
|
|
|
This is a Java implementation of the GRIN-Global middle-tier.
|
... | ... | @@ -7,12 +21,12 @@ the original implementation of the .Net GRIN-Global.Server. |
|
|
Please check https://gitlab.croptrust.org/grin-global/grin-global-server/-/releases for
|
|
|
information on new releases!
|
|
|
|
|
|
# Trying out GG-CE
|
|
|
## Trying out GG-CE
|
|
|
|
|
|
**GG-CE Test Environment** is available at https://demo.ggce.genebanks.org!
|
|
|
Reach out to https://gitlab.croptrust.org/grin-global/support for assistance.
|
|
|
|
|
|
# Running the server
|
|
|
## Running the server
|
|
|
|
|
|
**GG-CE Server** is available as a Docker image `dockerhub.croptrust.org/grin-global/grin-global-server:2021.10`.
|
|
|
This allows for easy management and updating to newer versions.
|
... | ... | @@ -30,7 +44,7 @@ data automatically. Alternatively, upgrade your existing GRIN-Global Database us |
|
|
installer and then configure **GG-CE** to use the MSSQL database.
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
### Configuration
|
|
|
|
|
|
The **GG-CE** server container requires a few configuration options. The options
|
|
|
are provided as environment variables. You need to note:
|
... | ... | @@ -74,7 +88,7 @@ When you see the message `[INFO] Started Jetty Server` you can connect to your o |
|
|
and port **8081** (if you used the command above) at http://YOUR_DOCKER_HOST_IP:8081.
|
|
|
|
|
|
|
|
|
## Upgrading to newer version
|
|
|
### Upgrading to newer version
|
|
|
|
|
|
To get the latest version of the image you need to pull the latest *edge* image and recreate your container:
|
|
|
|
... | ... | @@ -85,7 +99,7 @@ docker remove ggce-server # if the container name is still defined |
|
|
docker run... # as above
|
|
|
```
|
|
|
|
|
|
## Next release
|
|
|
### 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:
|
... | ... | @@ -102,7 +116,7 @@ docker image pull dockerhub.croptrust.org/grin-global/grin-global-server:2021.11 |
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-server:edge
|
|
|
```
|
|
|
|
|
|
# Populating the database
|
|
|
## Populating the database
|
|
|
|
|
|
Once you can connect to your GG-CE Server, navigate to the Admin section and:
|
|
|
|
... | ... | @@ -115,7 +129,7 @@ Consider installing [GG-CE Web](https://gitlab.croptrust.org/grin-global/grin-gl |
|
|
|
|
|
|
|
|
|
|
|
# Database setup with Docker
|
|
|
## Database setup with Docker
|
|
|
|
|
|
You can use an existing GRIN-Global MSSQL database, or setup and run MSSQL Express service as a Docker container. A docker volume is where the server will persist data between service restarts.
|
|
|
|
... | ... | @@ -148,7 +162,7 @@ GO |
|
|
|
|
|
|
|
|
|
|
|
# For developers
|
|
|
## For developers
|
|
|
|
|
|
Most IDEs will resolve project modules automatically. From the command
|
|
|
line, you may want to start with
|
... | ... | @@ -185,7 +199,7 @@ Skip "Test Server Address". |
|
|
|
|
|
Connect to the _java_ server and enjoy the Curator Tool.
|
|
|
|
|
|
## Database configuration
|
|
|
### Database configuration
|
|
|
|
|
|
Update environment variables or the `myconfig.properties` file to configure
|
|
|
the JDBC driver and Hibernate dialect. The example below configures GRIN-Global
|
... | ... | @@ -202,7 +216,146 @@ db.showSql=false |
|
|
```
|
|
|
|
|
|
|
|
|
# License and Disclaimer
|
|
|
## License and Disclaimer
|
|
|
|
|
|
This software is licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
|
|
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
See the License for the specific language governing permissions and
|
|
|
limitations under the License.
|
|
|
|
|
|
# GRIN-Global Client
|
|
|
|
|
|
The **GRIN-Global Client** is a set of tools for genebank
|
|
|
technicians, curators and managers to interact with the
|
|
|
[GG-CE Server](https://gitlab.croptrust.org/grin-global/grin-global-server) APIs.
|
|
|
|
|
|
Please check https://gitlab.croptrust.org/grin-global/grin-global-ui/-/releases for
|
|
|
information on new releases!
|
|
|
|
|
|
## Trying out GG-CE
|
|
|
|
|
|
**GG-CE Test Environment** is available at https://demo.ggce.genebanks.org!
|
|
|
Reach out to https://gitlab.croptrust.org/grin-global/support for assistance.
|
|
|
|
|
|
|
|
|
## Running GG-CE Web
|
|
|
|
|
|
**GG-CE Web** is available as a Docker image `dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.10`.
|
|
|
|
|
|
It works best with [GG-CE Server](https://gitlab.croptrust.org/grin-global/grin-global-server) image `dockerhub.croptrust.org/grin-global/grin-global-server:2021.10`.
|
|
|
|
|
|
The **GG-CE Web** container requires a few configuration options. The options
|
|
|
are provided as environment variables. You need to note:
|
|
|
|
|
|
1. `API_URL`: The URL to the **GG-CE Server** (e.g. `http://GGCE-SERVER:8081`)
|
|
|
This should match the host name (including port, if not default) where *gg-ce-server* is accessible.
|
|
|
1. `ORIGIN`: The frontend URL of the **GG-CE Web** service (e.g. `http://GGCE-WEB:3000`)
|
|
|
This should match the `FRONTEND_URL` variable of your *gg-ce-server* container when using the default OAuth client.
|
|
|
You can omit this if using a OAuth client you declared manually.
|
|
|
1. `CLIENT_ID` and `CLIENT_SECRET`: OAuth Client credentials (or skip to use default values)
|
|
|
OAuth client credentials of **gg-ce-web**.
|
|
|
|
|
|
Start **GG-CE Server** as a Docker container:
|
|
|
|
|
|
```bash
|
|
|
# Start GG-CE Web
|
|
|
docker run --rm --name 'ggce-web' \
|
|
|
-p 3000:3000 \
|
|
|
-e "API_URL=http://GGCE-SERVER:8081" \
|
|
|
-e "ORIGIN=http://GGCE-WEB:3000" \
|
|
|
dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.10
|
|
|
```
|
|
|
|
|
|
**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.
|
|
|
|
|
|
GG-CE Web internally listens on port **3000**. The `-p 3000:3000` flag above instructs docker to map the host port **3000** to the internal container port **3000**. This makes the GG-CE web interface accessible at http://GGCE-WEB:3000.
|
|
|
|
|
|
### Troubleshooting
|
|
|
|
|
|
The effecive configuration is printed out immediately when you start the **gg-ce-web** container.
|
|
|
|
|
|
The *Application config* section (example below) displays the values in use. These need to be properly
|
|
|
configured with Docker environment variables.
|
|
|
|
|
|
```bash
|
|
|
Running Genesys UI from /var/www/gg-ce with CLIENT_ID= and API at
|
|
|
Starting on TCP port (default 3000).
|
|
|
2020-07-15T15:29:04: PM2 log: Launching in no daemon mode
|
|
|
2020-07-15T15:29:04: PM2 log: App [gg-ce:0] starting in -cluster mode-
|
|
|
2020-07-15T15:29:04: PM2 log: App [gg-ce:0] online
|
|
|
{
|
|
|
_: [ 'start', 'gg-ce.yml' ],
|
|
|
'origin': '',
|
|
|
'api-timeout': '',
|
|
|
'api-url': '',
|
|
|
'client-id': '',
|
|
|
'client-secret': '',
|
|
|
'allow-robots': ''
|
|
|
}
|
|
|
Application config {
|
|
|
origin: 'http://localhost:3000',
|
|
|
apiTimeout: 10000,
|
|
|
apiUrl: 'http://localhost:8080',
|
|
|
clientId: 'defaultclient@localhost',
|
|
|
clientSecret: 'changeme',
|
|
|
allowRobots: false
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Next release
|
|
|
|
|
|
The preview of the next release is available as `dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.11-edge` and
|
|
|
you should update your copy of the image before **restarting** your container:
|
|
|
|
|
|
```bash
|
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:2021.11-edge
|
|
|
```
|
|
|
|
|
|
**Note:** You can also just run the current *development* version using the `:edge` tag:
|
|
|
|
|
|
```bash
|
|
|
docker image pull dockerhub.croptrust.org/grin-global/grin-global-ui/gg-ce-web:edge
|
|
|
```
|
|
|
|
|
|
|
|
|
## Development environment
|
|
|
|
|
|
`node >=14.16.0` and `yarn >=1.21.1` are required. See below for installation
|
|
|
instructions.
|
|
|
|
|
|
Run `yarn install` in the project root directory.
|
|
|
|
|
|
In case of build errors please run `yarn --check-files --ignore-scripts` in the project root directory.
|
|
|
|
|
|
|
|
|
### Running dev server with hot reload
|
|
|
|
|
|
To start the web application with live-reload server and work on the application,
|
|
|
run `yarn run start:dev` in _workspaces/ui-express_ module directory
|
|
|
|
|
|
This starts the _webpack-dev-server_ on port 3000: <http://localhost:3000/>
|
|
|
|
|
|
|
|
|
### Running SSR server
|
|
|
|
|
|
To start express server with server side rendering and test application as in staging environment
|
|
|
`yarn run start:prod` in _workspaces/ui-express_ module directory
|
|
|
|
|
|
This starts the express server on port 3000: <http://localhost:3000/>
|
|
|
|
|
|
### Running tests
|
|
|
|
|
|
To start test `yar run test` in root directory, or `yarn run test` in _workspaces/ui-core_ module directory
|
|
|
|
|
|
This starts jest test runner with code coverage statistics
|
|
|
|
|
|
|
|
|
## License and Disclaimer
|
|
|
|
|
|
This software is licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
... | ... | |