File tree 4 files changed +23
-10
lines changed
4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ func (dc *DeployConfig) GetReportUsage() bool { return dc.getBool(CONFIG_
131
131
func (dc * DeployConfig ) GetContainerImage () string { return dc .getString (CONFIG_CONTAINER_IMAGE ) }
132
132
func (dc * DeployConfig ) GetLogDir () string { return dc .getString (CONFIG_LOG_DIR ) }
133
133
func (dc * DeployConfig ) GetDataDir () string { return dc .getString (CONFIG_DATA_DIR ) }
134
- func (dc * DeployConfig ) GetCoreDir () string { return dc .getString (CONFIG_CORE_DIR ) }
134
+ func (dc * DeployConfig ) GetSourceCoreDir () string { return dc .getString (CONFIG_SOURCE_CORE_DIR ) }
135
+ func (dc * DeployConfig ) GetTargetCoreDir () string { return dc .getString (CONFIG_TARGET_CORE_DIR ) }
135
136
func (dc * DeployConfig ) GetEnv () string { return dc .getString (CONFIG_ENV ) }
136
137
func (dc * DeployConfig ) GetListenIp () string { return dc .getString (CONFIG_LISTEN_IP ) }
137
138
func (dc * DeployConfig ) GetListenPort () int { return dc .getInt (CONFIG_LISTEN_PORT ) }
Original file line number Diff line number Diff line change @@ -124,8 +124,15 @@ var (
124
124
nil ,
125
125
)
126
126
127
- CONFIG_CORE_DIR = itemset .insert (
128
- "core_dir" ,
127
+ CONFIG_SOURCE_CORE_DIR = itemset .insert (
128
+ "source_core_dir" ,
129
+ REQUIRE_STRING ,
130
+ true ,
131
+ nil ,
132
+ )
133
+
134
+ CONFIG_TARGET_CORE_DIR = itemset .insert (
135
+ "target_core_dir" ,
129
136
REQUIRE_STRING ,
130
137
true ,
131
138
nil ,
Original file line number Diff line number Diff line change @@ -174,16 +174,20 @@ func getServiceDirectorys(dc *topology.DeployConfig) []Directory {
174
174
dirs := []Directory {}
175
175
logDir := dc .GetLogDir ()
176
176
dataDir := dc .GetDataDir ()
177
- coreDir := dc .GetCoreDir ()
177
+ sourceCoreDir := dc .GetSourceCoreDir ()
178
+ targetCoreDir := dc .GetTargetCoreDir ()
178
179
179
180
if len (logDir ) > 0 {
180
181
dirs = append (dirs , Directory {LOG_DIR , logDir })
181
182
}
182
183
if len (dataDir ) > 0 {
183
184
dirs = append (dirs , Directory {DATA_DIR , dataDir })
184
185
}
185
- if len (coreDir ) > 0 {
186
- dirs = append (dirs , Directory {CORE_DIR , coreDir })
186
+ if len (sourceCoreDir ) > 0 {
187
+ dirs = append (dirs , Directory {CORE_DIR , sourceCoreDir })
188
+ }
189
+ if len (targetCoreDir ) > 0 {
190
+ dirs = append (dirs , Directory {CORE_DIR , targetCoreDir })
187
191
}
188
192
189
193
return dirs
Original file line number Diff line number Diff line change @@ -168,7 +168,8 @@ func getMountVolumes(dc *topology.DeployConfig) []step.Volume {
168
168
layout := dc .GetProjectLayout ()
169
169
logDir := dc .GetLogDir ()
170
170
dataDir := dc .GetDataDir ()
171
- coreDir := dc .GetCoreDir ()
171
+ sourceCoreDir := dc .GetSourceCoreDir ()
172
+ targetCoreDir := dc .GetTargetCoreDir ()
172
173
173
174
if len (logDir ) > 0 {
174
175
volumes = append (volumes , step.Volume {
@@ -184,10 +185,10 @@ func getMountVolumes(dc *topology.DeployConfig) []step.Volume {
184
185
})
185
186
}
186
187
187
- if len (coreDir ) > 0 {
188
+ if len (targetCoreDir ) > 0 {
188
189
volumes = append (volumes , step.Volume {
189
- HostPath : coreDir ,
190
- ContainerPath : layout . CoreSystemDir ,
190
+ HostPath : targetCoreDir ,
191
+ ContainerPath : sourceCoreDir ,
191
192
})
192
193
}
193
194
You can’t perform that action at this time.
0 commit comments