. . .

[Brewer] Installation


Introduction

This page provides the steps to install and configure the ApiOmat microservice generation service called "Brewer". For further information about Brewer please refer to its documentation.

Prerequisites

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

  • 8180 (HTTP)

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

Installation of YAMBAS is required to retrieve meta data information for service generation.

Installation of Innkeeper is required, if you want to deploy services using Brewer.

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

The service needs to be able to access nexus.easy.de in order to download the maven artifacts!


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-brewer
service brewer 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-brewer
service brewer 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-brewer
service brewer start

Docker Compose

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

brewer.compose:

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

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-brewer
# extract the archive (.tgz) and find the values.yml. Adjust the parameters as required.
helm install apiomat/apiomat-brewer --name apiomat-brewer --values values.yaml

Windows

Windows
  1. Download file: https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/aom-brewer-<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

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

    to install as service and start afterwards.

    For a removal of the service, execute

    Brewer-<VERSION>.exe uninstall

Configuration

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

Properties that are commonly changed:

brewer.repositoryservice.publicurl


This service has the following specific configuration values:

Key

Description

Example

apiomat.service.discovery.uses.YAMBAS.version

Version range of YAMBAS service that should be used.

"[3.5,)" → version range 3.5.0 or above
"3.5.0" → strict exact version 3.5.0

apiomat.service.discovery.uses.YAMBAS.name

Name of YAMBAS service as registered with in Consul

YAMBAS

apiomat.service.discovery.uses.Innkeeper.version

Version range of Innkeeper (repository service) that should be used.

"[1.0,)" → version range 1.0.0 or above
"1.0.0" → strict exact version 1.0.0

apiomat.service.discovery.uses.Innkeeper.name

Name of Innkeeper service as registered with in Consul

Innkeeper

brewer.remoteservice.name

Name of YAMBAS service as registered with in Consul

YAMBAS

brewer.remoteservice.pathprefix

Path prefix of YAMBAS service

/yambas/rest

brewer.repositoryservice.name

Name of Innkeeper service as registered with in Consul

Innkeeper

brewer.repositoryservice.pathprefix

Path prefix of Innkeeper service

/hosting

brewer.repositoryservice.publicurl

you can set the publicly accessible url of your innkeeper instance here. it will be generated into the pom.xml of generated services to make the deployment possible for the developer (brewer will use the consul url for internal deployment)

https://127.0.0.1:2400/hosting

brewer.generation.tmpdir

Absolute path to a writable temporary directory, that could be used during service generation. Default value is ${java.io.tmpdir}.

/tmp

Logging


Linux

Linux

Logging is done to a separate logfile:

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

Docker

Docker

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

docker logs -f <BREWER_CONTAINER_ID>

Kubernetes

Kubernetes

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

kubectl logs -f <BREWER_CONTAINER_ID>

Windows

Windows

All logs are written to Event manager.

Next steps

See Usage part of Brewer documentation.