1 Config Reference
verita84 edited this page 2020-12-18 15:31:09 +00:00
{
  "token":"1234567890ABCDEFGHJKLMNOP",
  "docker":"/root/docker",
  "server_port":"3000",
  "agent_port": "3001",
  "dockerRegistries": [
    "registry.fedoraproject.org"
  ],
  "layout": [
    {"node":"192.168.0.100", "mysql":"-p 3306:3306","nginx":"-p 80:80"},
    {"node":"192.168.0.102", "openvpn":"-p 1194:1194"}],
  "hb": [
    {"node":"192.168.0.100","mysql":"3306", "nginx": "80"},
    {"node":"192.168.0.102","openvpn":"1194"}
  ],
  "vip": [
    {"node":"192.168.0.101","vip_eth_device":"eth0", "slave": "192.168.0.102", "vip_ping_time": "10000"},
    {"node":"192.168.0.102","vip_eth_device":"eth0","slave": "192.168.0.101", "vip_ping_time": "15000"}
  ],
  "container_host_constraints": [{
    "container": "mysql,192.168.0.101,192.168.0.102"
  }, {
    "container": "nginx,192.168.0.103,192.168.0.104"
  }],
  "commandlist": [{
  "SystemUpdate": "apt-get update;apt-get dist-upgrade -y"
  }],
  "vip_ip": "192.168.0.15",
  "autostart_containers": "enabled",
  "rsyslog_logfile": "/var/log/syslog",
  "rsyslog_host": "192.168.0.15",
  "automatic_heartbeat": "enabled",
  "heartbeat_interval": "300000",
  "monitoring": "https://127.0.0.1:5601",
  "syslog": "dmesg",
  "web_username": "admin",
  "web_password":"admin",
  "web_connect":"192.168.0.101",
  "web_port":"3003",
  "elasticsearch": "http://127.0.0.1:9200",
  "elasticsearch_index": "picluster"
}

layout - Each row contains an IP address of the node to run the container on, the name for the container image as it corresponds in the Docker folder, and the Docker run arguments.

heartbeat - lists the node, container name, and the port to monitor. If the port can not be connected to, PiCluster will restart the failed image.

token - A string you define a random string that will be used for authentication with the agents.

agent_port - Defines the port that the agent will listen on.

dockerRegistries - Defines additional third-party docker registries to pull images from

docker - Defines where your Dockerfile's are. The format for the Docker folder should be like this: dockerfiles/imagename/Dockerfile

web_username and web_password - Define's the username and password for the web interface.

web_connect - IP address of a node running the server.

web_port - Port that the web console listens on.

automatic_heartbeat - Have the server do a heartbeat check on the services in the hb section of config.json. Valid values are: enabled or disabled.

heartbeat_interval - How often to do the heartbeat check. Requires automatic_heartbeat to be enabled.

syslog - The command used to read the logs on each host.

vip - This section contains the agent nodes that the VIP can run on, the ethernet device on each node, and the slave node to run checks against.

vip_ping_time - Time in ms to ping each slave. Each host should have different times.

vip_ip - The Virtual IP address to use in the cluster

autostart_containers - If set, the agent will connect to the server specififed in web_connect to start all of the containers.

rsyslog_logfile - Location of the log file on the Rsyslog server

rsyslog_host - The host running the PiCluster Agent with a Rsyslog server running or has access to the log drain file.

commandlist - A list of commands to run on the nodes on demand from the web console under Operations -> Run Command.

kibana - The is for the URL to Kibana to integrate the console inside PiCluster.

elasticsearch - The URL for your Elasticsearch server.

elasticsearch_index - The Elasticsearch index to use for PiCluster.

container_host_constraints - This section enables automatic container failover. Requires automatic_heartbeat,heartbeat_interval, and hb set for the container.