. . .

[Executor] Installation


Introduction

This page provides the steps to install and configure the ApiOmat microservice for service deployment called "Executor". For further information about Executor itself and its functionality please refer to its documentation.

Prerequisites

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

  • 8070 (HTTP)

Installation of Consul is required!

Installation of AdoptOpenJDK is required!

System requirements

The following instance configurations are recommended.

Size

CPU

Memory

Disk

Typical Cloud Instance Types

All

2 core

256 MB RAM (executor only)

500 MB

AWS: t2.medium

Azure: Standard_ B1MS

Installation

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

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-executor
service executor start
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-executor
service executor start
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-executor
service executor start
Docker Compose
# Docker login
docker login -u <USERNAME> -p <PASSWORD>
 
# Store the following file and execute:
docker-compose -f executor.yml up

executor.yml:

version: '3'
services:
executor:
image: apiomat/executor:<VERSION>
command: --spring.cloud.consul.enabled=false
ports:
- "8070:8070"
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-executor
# extract the archive (.tgz) and find the values.yml. Adjust the parameters as required.
helm install apiomat/apiomat-executor --name apiomat-executor --values values.yaml
Windows
  1. Download file: https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/aom-explorer-<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

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

    to install as service and start afterwards.

    For a removal of the service, execute

    Executor-<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

executor.properties.count

Number of microservice instances to be started

1 (default)

executor.properties.memory

Memory usage in MB used for each microservice instance

1000 (default)

executor.properties.disk

Disk usage in MB used for each microservice instance

1000 (default)

executor.properties.cpu

CPU usage in MHz used for each microservice instance

500 (default)

executor.properties.javaJvmOpts

Default list of JVM options separated by space which will be given to each deployment of Java artifacts.

"-Xmx76M -Xss256k -XX:+UseG1GC"
(default)

executor.properties.javaExecArgs

Default list of execution arguments separated by space which will be given to each deployment of Java artifacts.

Precedence:

  • those default execution arguments will be overwritten by externally saved configuration (e.g. which are saved in configuration service Gearhead)

  • the externally saved execution arguments will be overwritten by the deployment object arguments (which are given during deployment triggering)

"--spring.cloud.consul.host=${spring.cloud.consul.host} --spring.cloud.consul.port=${spring.cloud.consul.port}"
(default)

executor.properties.dockerEnvVars

Default map of docker environment variables in the format "<key>: <value>" which will be given to each deployment of docker images. The Precedence is the same like defined for javaExecArgs.

spring_cloud_consul_host: ${spring.cloud.consul.host}
spring_cloud_consul_port: ${spring.cloud.consul.port}(default)

executor.properties.resourceDir

Define the path where the resources of the micro services should be cached locally, default is the value of java.io.tmpdir

"/Users/myName/myDirectory"

executor.external-config-service.pathprefix

Path prefix of the external configuration service

"/config" (default)

feign.client.config.Gearhead.connectTimeout

The configuration service is connected via Feign for which the connection timeout can be set. In order feign is able to connect to Gearhead the service needs to be installed first.

5000

feign.client.config.Gearhead.readTimeout

The read timeout of the feign client which is used to connect to the configuration service.
In order feign is able to connect to Gearhead the service needs to be installed first.

5000

Docker Configuration

In order that Executor is able to create docker images, push them at runtime and provide them to your Kubernetes instance you need to configure the following docker related properties in the application.yml:

Key

Description

Example

executor.docker.repository

Docker repository to which the images should be uploaded. If empty the dockerimage will not be created and pushed.

registry.hub.docker.com/myDockerUser/myrepo

executor.docker.email

User email address needed to push images to the Docker repository.

dev@company.com

executor.docker.username

User name needed to push images to the Docker repository.

developer

executor.docker.password

User password needed to push images to the Docker repository. (it is recommended to set this password outside of the application.yml of executor E.g. via system property or via file mapping)

supersecret123456

Engine Configuration

Regarding the selected executor engine (Nomad, Kubernetes) you have to setup further engine specific configuration.

Key

Description

Example

executor.engine

Select the engine which is used to deploy your microservices with Executor. Available engines: "nomad" and "kubernetes"

"nomad"

executor.nomad ...

Information about Nomad specific configuration can be found in Nomad Deployment Setup

-

executor.kubernetes ...

Information about Kubernetes specific configuration can be found in Kubernetes Deployment Setup

-

Logging

Linux

Logging is done to a separate logfile:

tail -f /var/log/apiomat/executor/executor.log
Docker

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

docker logs -f <EXECUTOR_CONTAINER_ID>
Kubernetes

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

kubectl logs -f <EXECUTOR_CONTAINER_ID>
Windows

All logs are written to Event manager.

Next steps

Install further microservices.