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-httpsInstallation 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.listwget -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 -yecho 'deb http://packages.dotdeb.org jessie all' > /etc/apt/sources.list.d/dotdeb.listcurl http://www.dotdeb.org/dotdeb.gpg | apt-key add -sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpgsudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'sudo apt updatePHP 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 updatesudo 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-apiomatexport DEFAULT_BACKUP_PATH_YAMBAS=/srv/restoremoduleexport INSTALL_ROOT_PATH_YAMBAS=/opt/my-apiomatexport DEFAULT_INSTALL_PATH_YAMBAS=/optexport DEFAULT_INSTALL_SUB_PATH_YAMBAS=/aom-yambasAPIOMAT_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-dashboard3export 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.debsudo dpkg --install Dashboard-xxx.deb#orsudo dpkg --install Dashboard-php5-xxx.deb# On installation errors because of missing dependencies executesudo 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
-
Change SuperAdmin password in apiomat.yaml
-
Change Default Organization password in apidocs and apiomat.yaml
-
Obtain a license key
-
Run the graphical installer
Installing Monitoring Service (optional)
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:
echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main' | sudo tee /etc/apt/sources.list.d/webupd8team-java.listsudo apt-get updateecho 'oracle-java8-installer shared/accepted-oracle-license-v1-1 select true' | sudo debconf-set-selectionssudo apt-get install --force-yes -y oracle-java8-installersudo apt-get install --force-yes -y oracle-java8-set-default
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 defaultssudo 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>:8761curl http://localhost:8761# or alternatively via log filetail -fn 30 /var/log/apiomat-serviceregistry.logFinally 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.