. . .

Configure YAMBAS Cluster

Before you start setting up a cluster of different YAMBAS nodes be sure you've already installed one YAMBAS instance following YAMBAS Installation Guide.
The values and configuration files of the first YAMBAS instance needs to be shared or copied to the other instances.

The guide on this page is more or less a check list which bundles the most important steps for you.




Check MongoDB instance(s)

You have to decide how the YAMBAS cluster members should get access to the MongoDB instances.
The first YAMBAS instance should already have an established connection to the MongoDB instance(s).
Visit Configure MongoDB for more details.


Check 1st YAMBAS instance

Next you should check if the first YAMBAS instance is running to be sure you have a working configuration.
Simply call the YAMBAS endpoint http://<yourhost>/yambas/rest


Check SuperAdmin

Before progressing any further you need a valid SuperAdmin account, which was created on installation of the first YAMBAS instance.
For this just call

curl https://<yourhost>/yambas/rest/customers/SuperAdmin -u SuperAdmin:password


Copy Configuration Files

  • apiomat.yaml

  • hazelcast.xml

  • log4j2.xml

On installation of the first YAMBAS instance some changes were made to the configuration files like apiomat.yaml, hazelcast.xml, log4j2.xml.
Especially the yambas.configEncryptionKey or installerFinished from apiomat.yml needs to be synchronized between all nodes on setup.

In this step just copy those files from the first YAMBAS instance. If your YAMBAS instance is running as Docker container you should already have all necessary configuration values.


Install Consul Cluster

After finished checking the first instance you have to install Consul on each node and configure those instances as Consul cluster.
More information can be found on Consul Installation.

Consul is recommended since ApiOmat 3.2 to support service discovery between its components like apidocs (explorer) and other services ...


Install YAMBAS on other Nodes

Next install YAMBAS on each node that is planned to be a member of the cluster by following the YAMBAS Installation Guide.


Sync Configuration

Paste the copied configuration files and values of step 4 to all YAMBAS instances.
Make sure each node has access to the MongoDB setup and especially check that all the configuration keys in the apiomat.yaml fit their needs.

Double-check that the configEncryptionKey is the same on all nodes otherwise you won't be able to log in as customer on all nodes.


Setup Hazelcast

In order to share classes between all YAMBAS instances you need to configure Hazelcast by following the guide Configure Hazelcast


Setup Loadbalancer

If you are planning to use a proxy or loadbalancer within the cluster, e.g. if you want to also use several Dashboard instances,
follow the guide Configuration with a Proxy / Loadbalancer.


Start YAMBAS cluster

Start YAMBAS on each node and wait for startup finished before starting the next node. After all YAMBAS nodes are up you can check the cluster setup by calling

curl https://<yourhost>/yambas/rest/cluster -u SuperAdmin:password