Containers managed by ASAB Maestro¶
Hostname and container name¶
The hostname
and the container_name
is set to INSTANCE_ID
(ie mongo-1
).
/etc/hosts
¶
/etc/hosts
is provided by the ASAB Maestro with the names and IP addresses of all instances in the cluster.
This is used for service discovery purposes.
Example of the /etc/hosts
:
# This file is generated by ASAB Remote Control
# WARNING: DON'T MODIFY IT MANUALLY !!!
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# Nodes
192.168.64.1 node1
192.168.64.2 node2
# Instances
192.168.64.1 zoonavigator-1
192.168.64.1 nginx-1
192.168.64.1 mongo-1
192.168.64.1 seacat-auth-1
192.168.64.2 zookeeper-1
192.168.64.2 asab-governator-1
192.168.64.2 asab-library-1
192.168.64.2 asab-config-1
Note
The hosts
file is located at /opt/site/hosts
and mounted into containers.
Environment variables¶
Following environment variables are made available to each instance:
NODE_ID
SERVICE_ID
INSTANCE_ID
Note
Other environment variables can be provided by technologies.