. . .

[Gearhead] Installation


Introduction

This page provides the steps to install and configure the ApiOmat microservice configuration service 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

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.

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


This service has the following specific configuration values. If you're using docker, you can map the yaml configuration into the path /configs/service.yaml sensitive values can be stored under /configs/secret.yaml which will then get merged.

Configuration
server:
  port: 8014
#  ssl-port: 8443
#  cert-file:
#  key-file:
#  ca-cert-file:
  context-path: /config
  healthcheck:
    refresh-period: 30

database:
  hosts:
    - "mongodb:27017"
  name: gearhead
  username:
  password:
  auth-db: admin

consul:
  host: consul
  port: 8500
  discovery:
    hostname: gearhead
    scheme: http
    health-check-critical-timeout-seconds: 120
    health-check-timeout-seconds: 30
    health-check-interval-seconds: 10
    tags: ["notRegisterOnGateway", "hiddenAPI", "contextPath=/config"]

logging:
  # DebugLevel 0, InfoLevel 1, WarnLevel 2, ErrorLevel 3, FatalLevel 4, PanicLevel 5
  # NoLevel 6, Disabled 7, TraceLevel -1
  level: 1
  gelf:
    host: 127.0.0.1
    port: 12201
    service-name: gearhead
tracing:
  zipkin:
    url: http://127.0.0.1:9411
    sampler-rate: 1.0
    service-name: gearhead
    service-host: gearhead
    service-port: 8014

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.