/
depends_on.go
96 lines (94 loc) · 5.3 KB
/
depends_on.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2021 Terminus, Inc.
//
// This program is free software: you can use, redistribute, and/or modify
// it under the terms of the GNU Affero General Public License, version 3
// or later ("AGPL"), as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package sysconf
func (sc Sysconf) DependsOn(k string) map[string]string {
m := map[string]map[string]string{
"cmdb": {"CMDB_ADDR": sc.Cluster.Host("cmdb") + ":9093"},
"status": {"STATUS_ADDR": sc.Cluster.Host("status") + ":7098"},
"headless": {"HEADLESS_ADDR": sc.Cluster.Host("headless") + ":9222"},
"monitor": {"MONITOR_ADDR": sc.Cluster.Host("monitor") + ":7096"},
"addon-platform": {"ADDON_PLATFORM_ADDR": sc.Cluster.Host("addon-platform") + ":8080"},
"dicehub": {"DICEHUB_ADDR": sc.Cluster.Host("dicehub") + ":10000"},
"eventbox": {"EVENTBOX_ADDR": sc.Cluster.Host("eventbox") + ":9528"},
"gittar": {
"GITTAR_ADDR": sc.Cluster.Host("gittar") + ":5566",
"GITTAR_PUBLIC_ADDR": sc.Platform.Domain("gittar"),
"GITTAR_PUBLIC_URL": sc.Platform.PublicURL("gittar"),
},
"dashboard": {"DASHBOARD_ADDR": sc.Cluster.Host("dashboard") + ":7081"},
"uc": {
"UC_ADDR": sc.Cluster.Host("uc") + ":8080",
"UC_PUBLIC_ADDR": sc.Platform.Domain("uc"),
"UC_PUBLIC_URL": sc.Platform.PublicURL("uc"),
},
"officer": {"OFFICER_ADDR": sc.Cluster.Host("officer") + ":9029"},
"pipeline": {"PIPELINE_ADDR": sc.Cluster.Host("pipeline") + ":3081"},
"collector": {
"COLLECTOR_ADDR": sc.Cluster.Host("collector") + ":7076",
"COLLECTOR_PUBLIC_ADDR": sc.Platform.Domain("collector"),
"COLLECTOR_PUBLIC_URL": sc.Platform.PublicURL("collector"),
},
"orchestrator": {"ORCHESTRATOR_ADDR": sc.Cluster.Host("orchestrator") + ":8081"},
"openapi": {
"OPENAPI_ADDR": sc.Cluster.Host("openapi") + ":9529",
"OPENAPI_PUBLIC_ADDR": sc.Platform.Domain("openapi"),
"OPENAPI_PUBLIC_URL": sc.Platform.PublicURL("openapi"),
},
"ops": {
"OPS_ADDR": sc.Cluster.Host("ops") + ":9027",
},
"scheduler": {"SCHEDULER_ADDR": sc.Cluster.Host("scheduler") + ":9091"},
"sonar": {
"SONAR_ADDR": sc.Cluster.Host("sonar") + ":9000",
"SONAR_PUBLIC_ADDR": sc.Platform.Domain("sonar"),
"SONAR_PUBLIC_URL": sc.Platform.PublicURL("sonar"),
},
"ui": {
"UI_ADDR": sc.Cluster.Host("ui") + ":80",
"UI_PUBLIC_ADDR": sc.Platform.Domain("ui"),
"UI_PUBLIC_URL": sc.Platform.PublicURL("ui"),
},
"nexus": {"NEXUS_ADDR": sc.Cluster.Host("nexus") + ":8081"},
"hepa": {"HEPA_ADDR": sc.Cluster.Host("hepa") + ":8080"},
"netportal": {"NETPORTAL_ADDR": sc.Cluster.Host("netportal") + ""},
"gittar-adaptor": {"GITTAR_ADAPTOR_ADDR": sc.Cluster.Host("gittar-adaptor") + ":1086"},
"qa": {"QA_ADDR": sc.Cluster.Host("qa") + ":3033"},
"tmc": {"TMC_ADDR": sc.Cluster.Host("tmc") + ":8050"},
"pmp-backend": {"PMP_BACKEND_ADDR": sc.Cluster.Host("pmp-backend") + ":5080"},
"dl": {"DL_ADDR": sc.Cluster.Host("dl") + ":8080"},
"fdp": {"FDP_ADDR": sc.Cluster.Host("fdp") + ":8080"},
"pandora": {"PANDORA_ADDR": sc.Cluster.Host("pandora") + ":8050"},
"analyzer-metrics": {"ANALYZER_METRICS_ADDR": sc.Cluster.Host("analyzer-metrics") + ":8081"},
"analyzer-starter": {"ANALYZER_STARTER_ADDR": sc.Cluster.Host("analyzer-starter") + ":8081"},
"analyzer-alert": {"ANALYZER_ALERT_ADDR": sc.Cluster.Host("analyzer-alert") + ":8081"},
"analyzer-error-insight": {"ANALYZER_ERROR_INSIGHT_ADDR": sc.Cluster.Host("analyzer-error-insight") + ":8081"},
"alerting-compute-jobmanager": {"ALERTING_COMPUTE_JOBMANAGER_ADDR": sc.Cluster.Host("alerting-compute-jobmanager") + ":8081"},
"alerting-notice-jobmanager": {"ALERTING_NOTICE_JOBMANAGER_ADDR": sc.Cluster.Host("alerting-notice-jobmanager") + ":8081"},
"error-insight-jobmanager": {"ERROR_INSIGHT_JOBMANAGER_ADDR": sc.Cluster.Host("error-insight-jobmanager") + ":8081"},
"alert-run-jobmanager": {"ALERT_RUN_JOBMANAGER_ADDR": sc.Cluster.Host("alert-run-jobmanager") + ":8081"},
"log-insight-jobmanager": {"LOG_INSIGHT_JOBMANAGER_ADDR": sc.Cluster.Host("log-insight-jobmanager") + ":8081"},
"trace-insight-jobmanager": {"TRACE_INSIGHT_JOBMANAGER_ADDR": sc.Cluster.Host("trace-insight-jobmanager") + ":8081"},
"soldier": {
"SOLDIER_ADDR": sc.Cluster.Host("soldier") + ":9028",
"SOLDIER_PUBLIC_ADDR": sc.Platform.Domain("soldier"),
"SOLDIER_PUBLIC_URL": sc.Platform.PublicURL("soldier"),
},
}
if sc.MainPlatform != nil {
m["openapi"]["OPENAPI_PUBLIC_ADDR"] = sc.MainPlatform.Domain("openapi")
m["openapi"]["OPENAPI_PUBLIC_URL"] = sc.MainPlatform.PublicURL("openapi")
m["collector"]["COLLECTOR_PUBLIC_ADDR"] = sc.MainPlatform.Domain("collector")
m["collector"]["COLLECTOR_PUBLIC_URL"] = sc.MainPlatform.PublicURL("collector")
}
return m[k]
}