sync cluster distribution to config file while setup
This commit is contained in:
parent
d37da4679e
commit
50e8f7fc79
|
@ -3,6 +3,7 @@ elasticsearch:
|
||||||
- id: $[[CLUSTER_ID]]
|
- id: $[[CLUSTER_ID]]
|
||||||
name: $[[CLUSTER_ID]]
|
name: $[[CLUSTER_ID]]
|
||||||
version: $[[CLUSTER_VER]]
|
version: $[[CLUSTER_VER]]
|
||||||
|
distribution: $[[CLUSTER_DISTRIBUTION]]
|
||||||
enabled: true
|
enabled: true
|
||||||
monitored: true
|
monitored: true
|
||||||
reserved: true
|
reserved: true
|
||||||
|
|
|
@ -550,8 +550,8 @@ func (module *Module) initialize(w http.ResponseWriter, r *http.Request, ps http
|
||||||
file:=path.Join(global.Env().GetConfigDir(),"system_config.yml")
|
file:=path.Join(global.Env().GetConfigDir(),"system_config.yml")
|
||||||
_,err=util.FilePutContent(file,fmt.Sprintf("configs.template:\n - name: \"system\"\n path: ./config/system_config.tpl\n variable:\n " +
|
_,err=util.FilePutContent(file,fmt.Sprintf("configs.template:\n - name: \"system\"\n path: ./config/system_config.tpl\n variable:\n " +
|
||||||
"CLUSTER_ID: %v\n CLUSTER_ENDPINT: \"%v\"\n " +
|
"CLUSTER_ID: %v\n CLUSTER_ENDPINT: \"%v\"\n " +
|
||||||
"CLUSTER_USER: \"%v\"\n CLUSTER_VER: \"%v\"\n INDEX_PREFIX: \"%v\"",
|
"CLUSTER_USER: \"%v\"\n CLUSTER_VER: \"%v\"\n CLUSTER_DISTRIBUTION: \"%v\"\n INDEX_PREFIX: \"%v\"",
|
||||||
GlobalSystemElasticsearchID,cfg.Endpoint,cfg.BasicAuth.Username,cfg.Version,cfg1.IndexPrefix ))
|
GlobalSystemElasticsearchID,cfg.Endpoint,cfg.BasicAuth.Username,cfg.Version,cfg.Distribution,cfg1.IndexPrefix ))
|
||||||
if err!=nil{
|
if err!=nil{
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue