实现DNS节点远程安装

This commit is contained in:
刘祥超
2021-08-11 21:00:29 +08:00
parent 363892efb2
commit d3e4f28c69
18 changed files with 859 additions and 78 deletions

View File

@@ -95,12 +95,11 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
// 修改配置文件
{
templateFile := dir + "/edge-node/configs/api.template.yaml"
configFile := dir + "/edge-node/configs/api.yaml"
data, err := this.client.ReadFile(templateFile)
if err != nil {
return err
}
var data = []byte(`rpc:
endpoints: [ ${endpoints} ]
nodeId: "${nodeId}"
secret: "${nodeSecret}"`)
data = bytes.ReplaceAll(data, []byte("${endpoints}"), []byte(nodeParams.QuoteEndpoints()))
data = bytes.ReplaceAll(data, []byte("${nodeId}"), []byte(nodeParams.NodeId))