The Model Catalogue is currently tested and deployed against a MySQL database server, which uses InnoDB
storage engine. The application was tested with versions 5.6.x
and 5.7.x
. The database
schema is created automatically by Grails. It is highly recommended to add the following indexes (for some reason):
CREATE INDEX change_idx_1 ON `change` (changed_id, system, undone, parent_id, type, date_created);
CREATE INDEX change_idx_2 ON `change` (parent_id, system, other_side, changed_id);
CREATE INDEX change_idx_3 ON `change` (author_id, other_side, system, date_created);
The expected load is in the tens of users so the CPU and memory can be rather small (db.t2.micro
or db.t2.micro
equivalent). An average database can consume about 2 GB of disk space.
Daily backups are expected to enabled for the database.
The Model Catalogue uses Elasticsearch server as a search engine. Currently version 2.3.5
is in use and
the Catalogue should be compatible with any 2.3.x
release but there is no guarantee for later releases e.g. 2.4.x
. The version of the Elastic Search server should correspond to the drivers used by the Catalogue application. The best way to achieve this is to use the
metadata/registry-elasticsearch Docker image which is
guaranteed to be synchronized with the main application image metadata/registry
and expected Elasticsearch settings.
The search indices can be rebuilt from the database, but to retain indices between container restarts and upgrades, docker container should be run with -v [backup-path]:/usr/share/elasticsearch/data
If the main Catalogue application and the Elastic Search server are not running on the same Docker engine,, then the port 9300
needs to be published with -p 9300:9300
.
To achieve the best performance 4 GB of system memory is recommended. You can achieve this by running the container with the parameters
--memory="4g" -e ES_HEAP_SIZE=2g
.
See How to Make a Dockerfile for Elasticsearch for further information.
Here’s the summary of recommended docker run
parameters (the port setting is omitted as running within the same engine is recommended):
docker run -d --restart="always" --name=mc-es -v "$PWD/esdata":/usr/share/elasticsearch/data --memory="4g" -e ES_HEAP_SIZE=2g metadata/registry-elasticsearch:2
The Model Catalogue is a Java web application running on Tomcat 8 and JDK 8. It is distributed as Docker image metadata/registry which contains the application deployed as ROOT application and the Model Catalogue configuration file enabled to get important configuration from the environmental variables. You can find reference for all the environmental variables at the end of this section.
The average memory consumption of the application is under 2 GB, but some of the processes such as search reindexing or producing some of the reports may require more memory to run. Because of this the recommended memory setting for production environment is 8 GB.
CPU consumption is usually low.
The application can store Assets (blob files) in database (not recommended), file system (needs additional backup settings) or to Amazon S3 (preferred).
Mail server configuration is needed to enable user self-registration and sending forgotten password.
Users can log in with their Google accounts if Google API key and secret is set.
As the number of environmental variables is high the best way to supply it to the docker command is with an environment file: --env-file mc.env
. The file
should contain variable declarations in the format ENV_VAR=value
on each line.
For most secure communication with the Elasticsearch server run the Elasticsearch container within the same docker engine and link it with --link mc-es:mc-es
.
docker run -d --restart="always" --name=mc --env-file mc.env metadata/registry:2
Group | Name | Description | Default Value |
---|---|---|---|
Application |
|
Additional options for Tomcat. Use it to tune memory settings e.g. |
None |
Application |
|
The URL where the application is available for the users |
Value of |
Application |
|
The preferred scheme of the application |
'http' |
Application |
|
If set to any value then the Spring Security accepts |
none |
Application |
|
Sets the maximum number of active (enabled) users to given number |
None |
Application |
|
JSON containing list of objects, each having |
None |
Application |
|
Sets the email for the superuser |
Value of |
Application |
|
Sets the email for the admin user |
None |
Database |
|
The password for the Model Catalogue database |
Value of |
Database |
|
The username for the Model Catalogue database |
Value of |
Database |
|
The JDBC connection string |
Set automatically if running with |
Search |
|
Hostname where Elasticsearch server is running |
Set automatically if running with |
Search |
|
Prefix of the indicies for current application (useful for shared Elasticsearch servers) |
None |
|
Default mail sender for the application |
None |
|
|
Hostname of the mail server |
None |
|
|
Port of the mail server |
None |
|
|
Username for themail server |
None |
|
|
Password for the mail server |
None |
|
|
JSON containing additional mail properties (see Grails Mail Plugin) |
None |
|
Assets |
|
Name of the Amazon S3 bucket to store the assets |
None |
Assets |
|
AWS Access Key for S3 access |
Value of variable |
Assets |
|
AWS Secret Key for S3 access |
Value of variable |
Assets |
|
AWS Region to store the assets |
None |
Assets |
|
Stores assets locally to the file system at |
By default the assets are stored inside the database (not recommended) |
Appearance |
|
Name of the application displayed in the menu toolbar |
None |
Appearance |
|
HTML text to appear to users not logged in on the home page (inside big gray box) |
None |
Appearance |
|
HTML text to appear to users not logged in on the home page (bellow big gray box) |
None |
Authentication |
|
Google API client key to enable users to log in with Google credentials |
None |
Authentication |
|
Google API client secret to enable users to log in with Google credentials |
None |
Authentication |
|
Enables user self-registration |
None |