Installation

Instructions for installing Model9 Gravity in an on-premise environment.

Introduction

The following guides provide details on how to install and configure the Model9 Gravity application.

Prerequisites

  • 8 vCPU, 32gb RAM instance, 1TB of storage (preferably SSD).

    • AWS instance types:

      • m5d.2xlarge

      • m5ad.2xlarge

    • docker is expected to be installed on the instance.

      • A user with docker privileges will be required to run docker commands.

Installation

Root access might be required for some steps depending on the system's configuration. Using a root user for the installation is recommended.

Download the Model9 Gravity installation package file

Obtain the Model9 Gravity installation package from Model9 and move it to the target installation system.

The recommended location for the package files on the installation system is:

/data/model9/gravity/packages

Prepare installation

Set version environment variable

export GRAVITY_VERSION=<version>

In the snippet above, <version> represents the package version number. E.g., "1.0.0".

The following installation steps will use exported environment variables.

Extract the package file

export GRAVITY_PACKAGES=/data/model9/gravity/packages
cd $GRAVITY_PACKAGES
tar -xzvf model9-gravity-package-$GRAVITY_VERSION.tar.gz
export GRAVITY_EXTRACTED=$(pwd)/model9-gravity-$GRAVITY_VERSION
export GRAVITY_BUILD=$(cat $GRAVITY_EXTRACTED/build-id.txt)

Create installation target folder structure

export GRAVITY_HOME=/data/model9/gravity
mkdir -p $GRAVITY_HOME/config
mkdir -p $GRAVITY_HOME/keys
mkdir -p $GRAVITY_HOME/logs
mkdir -p $GRAVITY_HOME/work

$GRAVITY_HOME/work is the work directory used by the service for data processing. It should be mounted on a block device on which enough space is available.

Configure Model9 Gravity

Copy key stores into the $GRAVITY_HOME/keys folder

cp $GRAVITY_EXTRACTED/keys/* $GRAVITY_HOME/keys

The key stores provided in the package include the default self-signed Model9 certificates for setting up TLS in the Gravity service. If required, these key stores can be replaced with key stores provided by the organization.

Create the Model9 Gravity configuration file

cp $GRAVITY_EXTRACTED/application.properties $GRAVITY_HOME/config

After creating the application.properties file edit it and fill in the missing values:

vi $GRAVITY_HOME/config/application.properties

vi is usually available by default on Linux systems. If more convenient, other editors such as nano can also be used.

# ----------------------------------------
# Model9 Gravity Configuration
# Documentation: https://docs.model9.io
# Support: support@model9.io
# ----------------------------------------
model9.gravity.global.license-key=
logging.level.io.model9=INFO

For details on the configuration options and their default values, see the Configuration page.

Start the Model9 Gravity service

Load the Model9 Gravity docker image

docker load --input $GRAVITY_EXTRACTED/model9-gravity-$GRAVITY_VERSION-build-$GRAVITY_BUILD.docker.gz

Create a Docker Network bridge

 network create -d bridge gravity-bridge

Start the Model9 Gravity container

docker run --detach --publish 443:443 \
    --net gravity-bridge \
    --volume $GRAVITY_HOME/config:/data/model9/config:z \
    --volume $GRAVITY_HOME/keys:/data/model9/keys:z \
    --volume $GRAVITY_HOME/logs:/data/model9/logs:z \
    --volume $GRAVITY_HOME/work:/data/model9/work:z \
    --env "TZ=America/New_York" \
    --env "JAVA_OPTS=-Xmx28g" \
    --restart unless-stopped \
    --name model9gravity-v$GRAVITY_VERSION model9/gravity:$GRAVITY_VERSION.$GRAVITY_BUILD
  • Change the TZ environment variable as appropriate.

  • Change the -Xmx value to reflect the amount of available memory for the service (in GBs) - Remember to leave a few free GBs for the operating system.

  • 443 is the default secure port, if running the service on another port, this value should be changed as well.

Last updated