Skip to content

Commit db7897e

Browse files
committed
[root dir] update dingofs as Bootstrap server's root directory
1 parent 84e3f1b commit db7897e

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

cli/command/client/enter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func runEnter(curveadm *cli.CurveAdm, options enterOptions) error {
6565
client := clients[0]
6666
home := "/curvebs/nebd"
6767
if client.Kind == topology.KIND_CURVEFS || client.Kind == topology.KIND_DINGOFS {
68-
home = "/curvefs/client"
68+
home = "/dingofs/client"
6969
}
7070
return tools.AttachRemoteContainer(curveadm, client.Host, client.ContainerId, home)
7171
}

cli/command/deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func genDeployPlaybook(curveadm *cli.CurveAdm,
228228
} else {
229229
steps = CURVEFS_DEPLOY_STEPS
230230
if options.useLocalImage {
231-
// remote PULL_IMAGE step
231+
// remove PULL_IMAGE step
232232
for i, item := range steps {
233233
if item == PULL_IMAGE {
234234
steps = append(steps[:i], steps[i+1:]...)

cli/command/playground/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func NewRunCommand(curveadm *cli.CurveAdm) *cobra.Command {
110110
}
111111

112112
flags := cmd.Flags()
113-
flags.StringVarP(&options.kind, "kind", "k", "curvefs", "Specify the type of playground (curvebs/curvefs)")
113+
flags.StringVarP(&options.kind, "kind", "k", "curvefs", "Specify the type of playground (curvefs/dingofs)")
114114
flags.StringVar(&options.mountPoint, "mountpoint", "p", "Specify the mountpoint for CurveFS playground")
115115
flags.StringVarP(&options.containerImage, "container_image", "i", "opencurvedocker/curvebs:playground", "Specify the playground container image")
116116

internal/configure/topology/dc_get.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434

3535
const (
3636
// service project layout
37+
LAYOUT_DINGOFS_ROOT_DIR = "/dingofs"
3738
LAYOUT_CURVEFS_ROOT_DIR = "/curvefs"
3839
LAYOUT_CURVEBS_ROOT_DIR = "/curvebs"
3940
LAYOUT_PLAYGROUND_ROOT_DIR = "playground"
@@ -48,13 +49,13 @@ const (
4849
LAYOUT_CURVEBS_COPYSETS_DIR = "copysets"
4950
LAYOUT_CURVEBS_RECYCLER_DIR = "recycler"
5051
LAYOUT_CURVEBS_TOOLS_CONFIG_SYSTEM_PATH = "/etc/curve/tools.conf"
51-
LAYOUT_CURVEFS_TOOLS_CONFIG_SYSTEM_PATH = "/etc/curvefs/tools.conf"
52+
LAYOUT_CURVEFS_TOOLS_CONFIG_SYSTEM_PATH = "/etc/curvefs/tools.conf" // TODO: keep tools config path
5253
LAYOUT_CURVE_TOOLS_V2_CONFIG_SYSTEM_PATH = "/etc/dingo/dingo.yaml"
5354
LAYOUT_CORE_SYSTEM_DIR = "/core"
5455

5556
BINARY_CURVEBS_TOOL = "curvebs-tool"
5657
BINARY_CURVEBS_FORMAT = "curve_format"
57-
BINARY_CURVEFS_TOOL = "curvefs_tool"
58+
BINARY_CURVEFS_TOOL = "dingo-tool"
5859
BINARY_CURVE_TOOL_V2 = "curve"
5960
METAFILE_CHUNKFILE_POOL = "chunkfilepool.meta"
6061
METAFILE_CHUNKSERVER_ID = "chunkserver.dat"
@@ -229,7 +230,7 @@ type (
229230
ToolsBinaryPath string // /curvebs/tools/sbin/curvebs-tool
230231

231232
// tools-v2
232-
ToolsV2ConfSrcPath string // /curvefs/conf/dingo.yaml
233+
ToolsV2ConfSrcPath string // /dingofs/conf/dingo.yaml
233234
ToolsV2ConfSystemPath string // /etc/dingo/dingo.yaml
234235
ToolsV2BinaryPath string // /curvebs/tools-v2/sbin/curve
235236

@@ -248,7 +249,8 @@ func (dc *DeployConfig) GetProjectLayout() Layout {
248249
kind := dc.GetKind()
249250
role := dc.GetRole()
250251
// project
251-
root := utils.Choose(kind == KIND_CURVEBS, LAYOUT_CURVEBS_ROOT_DIR, LAYOUT_CURVEFS_ROOT_DIR)
252+
curve_root := LAYOUT_CURVEFS_ROOT_DIR
253+
root := utils.Choose(kind == KIND_CURVEBS, LAYOUT_CURVEBS_ROOT_DIR, LAYOUT_DINGOFS_ROOT_DIR)
252254

253255
// service
254256
confSrcDir := root + LAYOUT_CONF_SRC_DIR
@@ -263,8 +265,8 @@ func (dc *DeployConfig) GetProjectLayout() Layout {
263265
})
264266
}
265267

266-
// tools
267-
toolsRootDir := root + LAYOUT_TOOLS_DIR
268+
// tools, keep 'curvefs' as root dir
269+
toolsRootDir := curve_root + LAYOUT_TOOLS_DIR
268270
toolsBinDir := toolsRootDir + LAYOUT_SERVICE_BIN_DIR
269271
toolsConfDir := toolsRootDir + LAYOUT_SERVICE_CONF_DIR
270272
toolsBinaryName := utils.Choose(kind == KIND_CURVEBS, BINARY_CURVEBS_TOOL, BINARY_CURVEFS_TOOL)

internal/configure/topology/dc_item.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var (
8686
if dc.GetKind() == KIND_CURVEBS {
8787
return path.Join(LAYOUT_CURVEBS_ROOT_DIR, dc.GetRole())
8888
}
89-
return path.Join(LAYOUT_CURVEFS_ROOT_DIR, dc.GetRole())
89+
return path.Join(LAYOUT_DINGOFS_ROOT_DIR, dc.GetRole())
9090
},
9191
)
9292

internal/task/task/common/collect_client.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ package common
2424

2525
import (
2626
"fmt"
27-
"github.com/dingodb/curveadm/internal/configure/topology"
2827
"path"
2928

29+
"github.com/dingodb/curveadm/internal/configure/topology"
30+
3031
"github.com/dingodb/curveadm/cli/cli"
3132
comm "github.com/dingodb/curveadm/internal/common"
3233
"github.com/dingodb/curveadm/internal/storage"
@@ -62,9 +63,9 @@ func NewCollectClientTask(curveadm *cli.CurveAdm, v interface{}) (*task.Task, er
6263
localEncryptdTarballPath := path.Join(baseDir, vname.EncryptCompressName) // // /tmp/7b510fb63730_ox1fe-encrypted.tar.gz
6364
httpSavePath := path.Join("/", encodeSecret(secret), "client") // /34701feb224479a20a5090510f648037/client
6465
containerLogDir := utils.Choose(client.Kind == topology.KIND_CURVEBS,
65-
"/curvebs/nebd/logs", "/curvefs/client/logs")
66+
"/curvebs/nebd/logs", "/dingofs/client/logs")
6667
containerConfDir := utils.Choose(client.Kind == topology.KIND_CURVEBS,
67-
"/curvebs/nebd/conf", "/curvefs/client/conf")
68+
"/curvebs/nebd/conf", "/dingofs/client/conf")
6869
localOptions := curveadm.ExecOptions()
6970
localOptions.ExecInLocal = true
7071
t.AddStep(&step.CreateDirectory{

internal/task/task/playground/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func getAttchMount(kind, mountPoint string) string {
5555
if kind == topology.KIND_CURVEBS {
5656
return mount
5757
}
58-
return fmt.Sprintf(FORMAT_MOUNT_OPTION, mountPoint, "/curvefs/client/mnt")
58+
return fmt.Sprintf(FORMAT_MOUNT_OPTION, mountPoint, "/dingofs/client/mnt")
5959
}
6060

6161
func getMountVolumes(kind string) []step.Volume {

0 commit comments

Comments
 (0)