. . .

[Innkeeper] Installation


Introduction

This page provides the steps to install and configure the ApiOmat service "Innkeeper", which is responsible for storing Maven artifacts. For further information about Innkeeper, please refer to its documentation.

Prerequisites

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

  • 2400 (HTTP) (default)

Installation of Consul is required!

Installation of MongoDB is required!

Installation of AdoptOpenJDK is required when not using Docker!

System requirements

The following instance configurations are recommended.

Size

CPU

Memory

Disk

Typical Cloud Instance Types

All

2 core

512 MB 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-innkeeper
service innkeeper 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-innkeeper
service innkeeper 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-innkeeper
service innkeeper start

Docker Compose

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

innkeeper.yml:

version: '3'
services:
mongo:
image: mongo:3.4
ports:
- "27017"
command: --smallfiles
innkeeper:
image: apiomat/innkeeper:<VERSION>
command: "--spring.cloud.consul.enabled=false --spring.data.mongodb.uri=mongodb://mongo:27017/hosting"
ports:
- "2400:2400"
- "3021:3021"

This docker-compose file is only a simple configuration example that starts a non-usable instance of Innkeeper. To make it work, you will have to provide a YAMBAS instance, a Consul instance and configure Innkeeper and YAMBAS to register to Consul. The registered YAMBAS URL in Consul should be available to Innkeeper. Everything can be configured using properties described in the Configuration section below.

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>"
helm init
helm repo update
helm repo add apiomat https://apinautengmbh.github.io/helm/
helm fetch apiomat/apiomat-innkeeper
# extract the archive (.tgz) and find the values.yml. Adjust the parameters as required.
helm install apiomat/apiomat-innkeeper --name apiomat-innkeeper --values values.yaml

Windows

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

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

  3. Open administrative console and execute

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

    to install as a service and start afterwards.

    To remove the service, execute

    Innkeeper-<VERSION>.exe uninstall

Configuration

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

Properties that are commonly changed:

spring.data.mongodb.host and spring.data.mongodb.port

innkeeper.env.baseurl (optional, retrieved over Consul)

This service has the following specific configuration:

Key

Description

Example

ftp.createModuleIfNotExisting

Whether a module should be created in YAMBAS (if it doesn't exist) when a directory was created for it.

true (default)

innkeeper.env.baseurl

Base URL to this Innkeeper instance, including the context-path used to build the artifact URL. The artifact announcement (informing YAMBAS about service updates) uses Consul to retrieve the correct URL to a healthy Innkeeper instance and falls back to this property if Consul is not available or no healthy Innkeeper instance was found. The base URL should be reachable by your ApiOmat instance.

https://localhost:2400/hosting

innkeeper.filestorage.enabled

Possibility to enable storing the data to the filesystem instead of the mongodb (available since Innkeeper v 2.2.0)

false (default)

innkeeper.filestorage.storage-path

the base path to where the files should be stored (available since Innkeeper v 2.2.0)

/tmp/innkeeper (default if enabled)

spring.data.mongodb.host

Host of the MongoDB instance

127.0.0.1 (default)

spring.data.mongodb.port

Port of the MongoDB instance

27017 (default)

spring.data.mongodb.database

Name of the MongoDB database to be used for storage

hosting (default)

spring.data.mongodb.username

Username for MongoDB - only required when using a database with authentication


spring.data.mongodb.password

Password for MongoDB - only required when using a database with authentication

spring.data.mongodb.authenticationDatabase

Name of the MongoDB database to be used for authentication

admin (default)

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.servlet.multipart.max-file-size

Max file size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.

200MB (default)

spring.servlet.multipart.max-request-size

Max request size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.

200MB (default)

Logging


Linux

Linux

Logging is done to a separate logfile:

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

Docker

Docker

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

docker logs -f <INNKEEPER_CONTAINER_ID>

Kubernetes

Kubernetes

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

kubectl logs -f <INNKEEPER_CONTAINER_ID>

Windows

Windows

All logs are written to Event manager.

Next steps

See Usage part of Innkeeper documentation.