. . .

Debian package Installation

This guide will lead you through the installation of the ApiOmat .deb package. The package is supported for the following OS versions: see Infrastructure Requirements .

Contents:


Installing MongoDB

ApiOmat is based on MongoDb database. MongoDB can be also installed via apt-get:

Installing ApiOmat

For package dependencies, see System preparations.

Install https transport

This package is needed to install from https repositories:

sudo apt-get install apt-transport-https

Installation from APT repository

If your installation machine has internet access, add the ApiOmat APT repository add install via apt-get ( replace <USERNAME>:<PASSWORD> with the credentials provided via email):

echo "deb https://<USERNAME>:<PASSWORD>@repo.apiomat.com/yambas/rest/web/Repo/LIVE/deb ./" | sudo tee /etc/apt/sources.list.d/apiomat.list
wget -O - https://repo.apiomat.com/yambas/rest/web/Key/LIVE/apiomat.key | sudo apt-key add -

Add php7.1 repository (if php7 is not already contained in your distribution).

If you still want to use php5 (not recommended), you don't need to add the php7 repository and have to install the apiomat-dashboard-php5 package.

sudo add-apt-repository ppa:ondrej/php -y
sudo apt install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update

PHP 7.1 is the default php version for Ubuntu 16 and newer versions. You also should use php5 with apiomat-dashboard-php5 on Debian 7.

Install apiomat packages:

sudo apt-get update
sudo apt-get install apiomat-yambas apiomat-dashboard

Custom Path ApiOmat Yambas

With the release 2.6.0 it's possible to set the installation path and backup path for the ApiOmat Yambas. Those paths are requested during installation. The data is then stored under /etc/apiomat/installPathYambas . The installPathYambas file has the following structure:

export APIOMAT_YAMBAS_BACKUP=/home/my-backup-apiomat
export DEFAULT_BACKUP_PATH_YAMBAS=/srv/restoremodule
export INSTALL_ROOT_PATH_YAMBAS=/opt/my-apiomat
export DEFAULT_INSTALL_PATH_YAMBAS=/opt
export DEFAULT_INSTALL_SUB_PATH_YAMBAS=/aom-yambas

APIOMAT_YAMBAS_BACKUP points to the directory apiomat stores its backups (default=/srv/restoremodule). INSTALL_ROOT_PATH_YAMBAS points to the root directory where Apache Tomcat, JDK and ApiOmat Yambas itself will be stored. After Installation ApiOmat Yambas will be available under /<customizedRootPath>/aom-yambas.

Custom Path ApiOmat Dashboard

With the release 2.5.0 it is now possible to set the installation path for the ApiOmat Dashboard. During installation, the path and the Apache alias are requested. The data is then stored under /etc/apiomat/installPath . The installPath file has the following structure:

export APIOMAT_DASHBOARD=/opt/aom-dashboard3
export APIOMAT_DASHBOARD_ALIAS=/

Installation with deb files

If you obtained the installation files manually, copy the .deb packages of YAMBAS and Dashboard to the application server(s) and enter:

sudo dpkg --install apiomat-yambas-xxxx.deb
 
# please add the php repository which is described above before installing dashboard
sudo dpkg --install Dashboard-xxx.deb
# or
sudo dpkg --install Dashboard-php5-xxx.deb
 
 
# On installation errors because of missing dependencies execute
sudo apt-get -f install

After Dashboard installation, you will be asked to open http://localhost/dashboard/install in your browser. Follow the steps in this installer tool to get ApiOmat configured automatically.

Reboot afterwards to start all services automatically.

Next steps

Installing Monitoring Service (optional)

ApiOmat microservices require a Java 8 runtime to be installed. If Java 8 was not installed before (YAMBAS includes an installation) it has to be installed manually: AdoptOpenJDK Installation

ApiOmat is able to monitor server data like CPU load or disk space. To enable this feature, a central service registry has to be installed on one node in the cluster:

sudo apt-get install apiomat-serviceregistry

Additionally, a monitoring service has to be installed on each node (app and database) which should be monitored:

sudo apt-get install apiomat-monitoringservice

By default, the services are not added to any runlevel. To automatically start the services after reboot, execute the following commands:

sudo update-rc.d apiomat-serviceregistry defaults
sudo update-rc.d apiomat-monitoringservice defaults

In the next step, you have to check the Java version: Oracle Java 8 is required (do not use OpenJDK).

Start the service registry...

sudo /etc/init.d/apiomat-serviceregistry start

... and make sure the service registry is reachable:

# via curl http://<node_ip_serviceregistry>:8761
curl http://localhost:8761
 
# or alternatively via log file
tail -fn 30 /var/log/apiomat-serviceregistry.log

Finally start the monitoring service:

sudo /etc/init.d/apiomat-monitoringservice start

Checks

YAMBAS

  • Logs: /var/log/tomcat/catalina.out

  • http test: http://<HOSTNAME>:8080/yambas/rest - should print the version number

Dashboard

  • Logs: /var/log/apache

  • http test: http://<HOSTNAME>/dashboard

Monitoring Services

  • Logs:

    • /var/log/apiomat-monitoringservice.log

    • /var/log/apiomat-serviceregistry.log

Please visit the FAQ section for questions and solutions.