. . .

[Gearhead] Installation


Introduction

This page provides the steps to install and configure the service for App Backend configurations in user defined services of ApiOmat, called "Gearhead". For further information about Gearhead, please refer to its usage documentation.

By default, Gearhead will be available under the following:

Port

8014

Context path

/config

Prerequisites

Open the following port in the firewall to other ApiOmat nodes:

  • 8014 (HTTP)

Installation of Consul is required to register this service and communicate with other services.

Installation of AdoptOpenJDK is required when you're not using Docker!


System requirements

The following instance configurations are recommended.

Size

CPU

Memory

Disk

Typical Cloud Instance Types

All

2 core

1 GB RAM

500 MB

AWS: t2.medium





Azure: Standard_ B1MS

Installation

USERNAME, PASSWORD and TOKEN values are provided per customer from ApiOmat.


Debian/Ubuntu

Debian/Ubuntu
# Install the repo key
wget -O - https://repo-int.apiomat.com/yambas/rest/web/Key/LIVE/apiomat-archive-keyring.asc | sudo apt-key add -
# Add the repository
echo "deb https://<USERNAME>:<PASSWORD>@repo.apiomat.com/yambas/rest/web/Repo/LIVE/deb ./" | sudo tee /etc/apt/sources.list.d/apiomat.list
 
# Update APT and install
apt-get update
apt-get install -y aom-gearhead
service gearhead start

Centos/Oracle/RedHat

Centos/Oracle/RedHat
# Add the repository
echo "[apiomat]
name=ApiOmat
baseurl=https://<USERNAME>:<PASSWORD>@repo.apiomat.com/yambas/rest/web/Repo/LIVE/rpm
gpgcheck=0
enabled=1" > /etc/yum.repos.d/apiomat.repo
 
# Install
yum -y --nogpgcheck install aom-gearhead
service gearhead start

Suse

Suse
# Add the repository
zypper addrepo --no-gpgcheck https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/suse?token=<TOKEN> "ApiOmat"
 
# Refresh zypper and install
zypper refresh
zypper --no-gpg-checks --non-interactive install aom-gearhead
service gearhead start

Docker Compose

Docker Compose
# Docker login
docker login -u <USERNAME> -p <PASSWORD>
 
# Store the following file and execute:
docker-compose -f gearhead.compose up

gearhead.compose:

version: '3'
services:
gearhead:
image: apiomat/gearhead:<VERSION>
command: --spring.cloud.consul.enabled=false
ports:
- "8014:8014"

Kubernetes

Kubernetes

To obtain the latest manifest file, please contact the EASY ApiOmat support.

Helm

Helm
# Docker login
kubectl create secret docker-registry regcred \
 --docker-server=https://index.docker.io/v1/ \
--docker-username="<USERNAME>" \
 --docker-password="<PASSWORD>" \
--docker-email="<MAIL>"
 
# We are using helm to deploy the yambas replicaset
helm init
helm repo update
helm repo add apiomat https://apinautengmbh.github.io/helm/
helm fetch apiomat/apiomat-gearhead
# extract the archive (.tgz) and find the values.yml. Adjust the parameters as required.
helm install apiomat/apiomat-gearhead --name apiomat-gearhead--values values.yaml

Windows

Windows
  1. Download file: https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/aom-gearhead-<VERSION>.zip?token=<TOKEN> and unzip to installation folder

  2. Ensure that the path to your installed jdk\bin is set to the system-environment variable 'Path' (java.exe needs to be accessible for windows' system user!)

  3. Open administrative console and execute

    Gearhead-<VERSION>.exe install
    Gearhead-<VERSION>.exe start

    to install as service and start afterwards.

    For a removal of the service, execute

    Gearhead-<VERSION>.exe uninstall

Configuration

General service configuration possibilities are described at the configurations main page.

This service has the following specific configuration values:

Key

Description

Example

spring.profiles.active

Spring profile which is used to switch persistence type. Supported persistence types are:
file-based (native), MongoDB-based (mongodb), git-file-based (git), consul key-value-store (consul)

native (default)
mongodb
git
consul

spring.data.mongodb.host

MongoDB host, required when persistence is set to "mongodb".

localhost

spring.data.mongodb.port

MongoDB port, required when persistence is set to "mongodb".

27017

spring.data.mongodb.database

MongoDB database name, required when persistence is set to "mongodb".

gearhead

spring.data.mongodb.username

MongoDB username, required when authentication is enabled and persistence is set to "mongodb".

apiomat

spring.data.mongodb.password

MongoDB password, required when authentication is enabled and persistence is set to "mongodb".

'12345678'

spring.data.mongodb.authentication-database

MongoDB auth database, required when authentication is enabled and persistence is set to "mongodb".

admin

spring.data.mongodb.uri

Can be used to set all MongoDB properties in a single line. Please note that this is currently the only way to use replica sets in Spring Boot, as shown in the example.

This property will be ignored if any other spring.data.mongodb properties are set!

mongodb://user:pwd@host1:27017,host2:27018/?authSource=admin&replicaSet=rs_name

spring.cloud.config.server.git.uri

Git repository URL, required when persistence is set to "git".

https://example.com/my/repo

spring.cloud.config.server.git.timeout

Timeout in seconds to reach Git repo, required when persistence is set to "git".

30

spring.cloud.config.server.git.username

Git username, required when authentication is enabled and persistence is set to "git".

gituser

spring.cloud.config.server.git.password

Git password, required when authentication is enabled and persistence is set to "git".

'12345678'

spring.cloud.config.server.native.searchLocations

File path location of the key-value-store, required when persistence is set to native.
Spring expects the path with a trailing slash.

file:///${user.home}/config-repo/

spring.cloud.config.server.native.addLabelLocations

Switch on/off if the configuration label should automatically be added to the searched file path by spring. See https://cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html
This is required when persistence is set to "native".

true (default)

spring.cloud.consul.key-value-store

Context path to the key-value store of Consul, required when persistence is set to "consul".

/v1/kv

Logging


Linux

Linux

Logging is done to a separate logfile:

tail -f /var/log/apiomat/gearhead.log

Docker

Docker

Please replace <GEARHEAD_CONTAINER_ID> with your running container ID. You can list your running container using 'docker container list' command.

docker logs -f <GEARHEAD_CONTAINER_ID>

Kubernetes

Kubernetes

Please replace <GEARHEAD_CONTAINER_ID> with your running container ID. You can list your running container using 'kubectl get pods' command.

kubectl logs -f <GEARHEAD_CONTAINER_ID>

Windows

Windows

All logs are written to Event manager.

Next steps

See Usage part of Gearhead documentation.