Merge the configuration of ekka
This commit is contained in:
parent
15a081c9bb
commit
09b4f17065
33
etc/emq.conf
33
etc/emq.conf
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
##===================================================================
|
##===================================================================
|
||||||
## EMQ Configuration R2.3
|
## EMQ Configuration R2.3
|
||||||
##===================================================================
|
##===================================================================
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
cluster.name = emqcl
|
cluster.name = emqcl
|
||||||
|
|
||||||
## Cluster discovery strategy: manual | static | mcast | dns | etcd | k8s
|
## Cluster discovery strategy: manual | static | mcast | dns | etcd | k8s
|
||||||
cluster.discovery = mcast
|
cluster.discovery = manual
|
||||||
|
|
||||||
## Cluster Autoheal: on | off
|
## Cluster Autoheal: on | off
|
||||||
cluster.autoheal = on
|
cluster.autoheal = on
|
||||||
|
@ -22,49 +21,49 @@ cluster.autoclean = 5m
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Cluster with static node list
|
## Cluster with static node list
|
||||||
|
|
||||||
## cluster.static.seeds = ekka1@127.0.0.1,ekka2@127.0.0.1
|
## cluster.static.seeds = emq1@127.0.0.1,emq2@127.0.0.1
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Cluster with multicast
|
## Cluster with multicast
|
||||||
|
|
||||||
cluster.mcast.addr = 239.192.0.1
|
## cluster.mcast.addr = 239.192.0.1
|
||||||
|
|
||||||
cluster.mcast.ports = 4369,4370
|
## cluster.mcast.ports = 4369,4370
|
||||||
|
|
||||||
cluster.mcast.iface = 0.0.0.0
|
## cluster.mcast.iface = 0.0.0.0
|
||||||
|
|
||||||
cluster.mcast.ttl = 255
|
## cluster.mcast.ttl = 255
|
||||||
|
|
||||||
cluster.mcast.loop = on
|
## cluster.mcast.loop = on
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Cluster with DNS
|
## Cluster with DNS
|
||||||
|
|
||||||
cluster.dns.name = localhost
|
## cluster.dns.name = localhost
|
||||||
|
|
||||||
cluster.dns.app = emqx
|
## cluster.dns.app = emq
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Cluster with Etcd
|
## Cluster with Etcd
|
||||||
|
|
||||||
cluster.etcd.server = http://127.0.0.1:2379
|
## cluster.etcd.server = http://127.0.0.1:2379
|
||||||
|
|
||||||
cluster.etcd.prefix = emqcluster
|
## cluster.etcd.prefix = emqcl
|
||||||
|
|
||||||
cluster.etcd.node_ttl = 1m
|
## cluster.etcd.node_ttl = 1m
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Cluster with k8s
|
## Cluster with k8s
|
||||||
|
|
||||||
cluster.k8s.apiserver = http://10.110.111.204:8080
|
## cluster.k8s.apiserver = http://10.110.111.204:8080
|
||||||
|
|
||||||
cluster.k8s.service_name = emq
|
## cluster.k8s.service_name = emq
|
||||||
|
|
||||||
## Address Type: ip | dns
|
## Address Type: ip | dns
|
||||||
cluster.k8s.address_type = ip
|
## cluster.k8s.address_type = ip
|
||||||
|
|
||||||
## The Erlang application name
|
## The Erlang application name
|
||||||
cluster.k8s.app_name = emq
|
## cluster.k8s.app_name = emq
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Node Args
|
## Node Args
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
%% @doc Cluster name
|
%% @doc Cluster name
|
||||||
{mapping, "cluster.name", "ekka.cluster_name", [
|
{mapping, "cluster.name", "ekka.cluster_name", [
|
||||||
{default, ekka},
|
{default, emqcl},
|
||||||
{datatype, atom}
|
{datatype, atom}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Cluster with static node list
|
%% Cluster by static node list
|
||||||
|
|
||||||
{mapping, "cluster.static.seeds", "ekka.cluster_discovery", [
|
{mapping, "cluster.static.seeds", "ekka.cluster_discovery", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Cluster with IP Multicast
|
%% Cluster by UDP Multicast
|
||||||
|
|
||||||
{mapping, "cluster.mcast.addr", "ekka.cluster_discovery", [
|
{mapping, "cluster.mcast.addr", "ekka.cluster_discovery", [
|
||||||
{default, "239.192.0.1"},
|
{default, "239.192.0.1"},
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
{mapping, "cluster.mcast.ttl", "ekka.cluster_discovery", [
|
{mapping, "cluster.mcast.ttl", "ekka.cluster_discovery", [
|
||||||
{datatype, integer},
|
{datatype, integer},
|
||||||
{default, 1}
|
{default, 255}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "cluster.mcast.loop", "ekka.cluster_discovery", [
|
{mapping, "cluster.mcast.loop", "ekka.cluster_discovery", [
|
||||||
|
@ -79,7 +79,8 @@
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Cluster with DNS
|
%% Cluster by DNS A Record
|
||||||
|
|
||||||
{mapping, "cluster.dns.name", "ekka.cluster_discovery", [
|
{mapping, "cluster.dns.name", "ekka.cluster_discovery", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
@ -89,7 +90,7 @@
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Cluster with etcd
|
%% Cluster using etcd
|
||||||
|
|
||||||
{mapping, "cluster.etcd.server", "ekka.cluster_discovery", [
|
{mapping, "cluster.etcd.server", "ekka.cluster_discovery", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
|
@ -105,7 +106,7 @@
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Cluster with K8s
|
%% Cluster on K8s
|
||||||
|
|
||||||
{mapping, "cluster.k8s.apiserver", "ekka.cluster_discovery", [
|
{mapping, "cluster.k8s.apiserver", "ekka.cluster_discovery", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
|
@ -145,7 +146,7 @@
|
||||||
{app, cuttlefish:conf_get("cluster.dns.app", Conf)}];
|
{app, cuttlefish:conf_get("cluster.dns.app", Conf)}];
|
||||||
(etcd) ->
|
(etcd) ->
|
||||||
[{server, string:tokens(cuttlefish:conf_get("cluster.etcd.server", Conf), ",")},
|
[{server, string:tokens(cuttlefish:conf_get("cluster.etcd.server", Conf), ",")},
|
||||||
{prefix, cuttlefish:conf_get("cluster.etcd.prefix", Conf, "emq")},
|
{prefix, cuttlefish:conf_get("cluster.etcd.prefix", Conf, "emqcl")},
|
||||||
{node_ttl, cuttlefish:conf_get("cluster.etcd.node_ttl", Conf, 60)}];
|
{node_ttl, cuttlefish:conf_get("cluster.etcd.node_ttl", Conf, 60)}];
|
||||||
(k8s) ->
|
(k8s) ->
|
||||||
[{apiserver, cuttlefish:conf_get("cluster.k8s.apiserver", Conf)},
|
[{apiserver, cuttlefish:conf_get("cluster.k8s.apiserver", Conf)},
|
||||||
|
|
Loading…
Reference in New Issue