. . .

[Inspector] Installation

Introduction

The inspector service manages the license handling in ApiOmat. Each service can require a separate license key, which is specified using the license.key property or license_key environmental variable. The license key alone does not contain license information and must be activated first; therefore, the license server responds with an encrypted file to the activation request. The file can be read by the service and license data, like cpu count or active users, can be checked in the service itself.

The central license server is available at https://license.apiomat.com. If the network configuration prevents services from connecting to this URL, a local license service instance can be installed with the other services, which will sync all license data for that company with the central server instance and activate the licenses by its own. The local license service will be available at http://HOSTNAME:2500/license

Prerequisites

  • When using the central license service instance:

    • Make the following URL accessible from ALL services: https://license.apiomat.com

    • In this case, the service should not be installed locally!

  • When using a local license service:

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

Installation is only necessary if a connection to the central service instance is not possible!

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

Debian/Ubuntu
# ApiOmat microservices require a Java8 runtime to be installed. If Java8 was not installed before (YAMBAS includes an installation) it has to be installed manually:
apt-get install -y software-properties-common
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo 'oracle-java8-installer shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections
apt-get install --force-yes -y oracle-java8-installer
apt-get install --force-yes -y oracle-java8-set-default
 
 
# Install the repo key
wget -O - https://repo.apiomat.com/yambas/rest/web/Key/LIVE/apiomat.key | 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-instructor
service explorer start
Centos/Oracle/RedHat
# ApiOmat microservices require a Java8 runtime to be installed. If Java8 was not installed before (YAMBAS includes an installation) it has to be installed manually:
BASE_URL_8="https://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171"
JDK_VERSION=`echo $BASE_URL_8 | rev | cut -d "/" -f1 | rev`
PLATFORM="-linux-x64.rpm"
wget -c -O \"$JDK_VERSION$PLATFORM\" --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "${BASE_URL_8}${PLATFORM}"
yum -y localinstall $JDK_VERSION$PLATFORM
 
 
# 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-instructor
service explorer start
Suse
# ApiOmat microservices require a Java8 runtime to be installed. If Java8 was not installed before (YAMBAS includes an installation) it has to be installed manually:
BASE_URL_8="https://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171"
JDK_VERSION=`echo $BASE_URL_8 | rev | cut -d "/" -f1 | rev`
PLATFORM="-linux-x64.rpm"
 
wget -c -O \"$JDK_VERSION$PLATFORM\" --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "${BASE_URL_8}${PLATFORM}"
zypper --non-interactive in $JDK_VERSION$PLATFORM
 
 
# 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-instructor
service explorer start
Docker Compose
# Docker login
docker login -u <USERNAME> -p <PASSWORD>
 
# Store the following file and execute:
docker-compose -f instructor.yml up

inspector.yml

version: '3'
services:
instructor:
image: apiomat/instructor:<VERSION>
command: --spring.cloud.consul.enabled=false
ports:
- "8093:8093"
Kubernetes
# Docker login
kubectl create secret docker-registry regcred \
 --docker-server=https://index.docker.io/v1/ \
--docker-username="<USERNAME>" \
 --docker-password="<PASSWORD>" \
--docker-email="<MAIL>"
 
# Store the following file and execute
kubectl apply -f instructor.yml

inspector.yml

# ------------------- Instructor Deployment ------------------- #
 
 
kind: Deployment
apiVersion: apps/v1beta2
metadata:
name: instructor
labels:
app: instructor
spec:
replicas: 2
selector:
matchLabels:
app: instructor
template:
metadata:
labels:
app: instructor
spec:
imagePullSecrets:
- name: regcred
containers:
- name: instructor
image: apiomat/instructor:<VERSION>
command: ["--spring.cloud.consul.enabled=false"]
ports:
- containerPort: 8093
resources:
limits:
memory: 4Gi
imagePullPolicy: Always
securityContext:
capabilities: { }
privileged: false
 
---
# ------------------- Instructor Service ------------------- #
 
kind: Service
apiVersion: v1
metadata:
name: instructor
labels:
app: instructor
spec:
ports:
- name: instructor
port: 8093
protocol: TCP
targetPort: 8093
Windows
  1. Download and install JAVA JDK 8 (if not done before) https://www.oracle.com/technetwork/java/javase/downloads/index.html

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

  3. 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!)

  4. Open administrative console and execute

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

    to install as service and start afterwards.

    For a removal of the service, execute

    Instructor-<VERSION>.exe uninstall

Configuration

Service configuration

The following configuration keys can be used in the main configuration file (%CONFIG_PATH/application.yml ) or as Docker arguments ( e.g. --storage.useMongo=false).

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

Key

Default

Explanation

license.key

 

The license key issued for this service; needed for licensed services

license.pubkeyFile

the resources folder of the service

Place where the public key file is stored; needed for licensed services

license.serviceURL

https://license.apiomat.com

URL to the license service; can be left out when using a license client service and service discovery

license.activationRenewalDays

10

Valid days of each activaton; after this count of days (the latest), a new activation must be created for the license

license.adminOrganizationName

apiomat

YAMBAS Organization name which declares members of the ADMIN group

license.pubkeyREST

true

Activate REST interface for retrieving public key (GET /license/pubkey)

keychain.dir

keychain

Directory where the public and private keys are stored. Keys must not be change after installation and must be the same for all instances!

keychain.id

aomKeychain

ID of the used keychain

keychain.password

secret

Password to access the keychain

Logging

Linux

Logging is done to a separate logfile:

tail -f /var/log/apiomat/instructor.log
Docker
docker logs -f instructor
Windows

All logs are written to Event manager.

Next steps

Install futher microservices.