diff --git a/cmd/gtctl/cluster_create.go b/cmd/gtctl/cluster_create.go index 6191266a..14bd7c6f 100644 --- a/cmd/gtctl/cluster_create.go +++ b/cmd/gtctl/cluster_create.go @@ -62,7 +62,11 @@ type clusterCreateCliOptions struct { Config string GreptimeBinVersion string EnableCache bool +<<<<<<< HEAD metastore bool +======= + EnableEtcd bool +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f // Common options. Timeout int @@ -110,7 +114,11 @@ func NewCreateClusterCommand(l logger.Logger) *cobra.Command { cmd.Flags().StringVar(&options.GreptimeDBClusterValuesFile, "greptimedb-cluster-values-file", "", "The values file for greptimedb cluster.") cmd.Flags().StringVar(&options.EtcdClusterValuesFile, "etcd-cluster-values-file", "", "The values file for etcd cluster.") cmd.Flags().StringVar(&options.GreptimeDBOperatorValuesFile, "greptimedb-operator-values-file", "", "The values file for greptimedb operator.") +<<<<<<< HEAD cmd.Flags().BoolVarP(&options.metastore, "memory-meta-storage", "m", false, "Bootstrap the whole cluster without installing etcd for testing purposes through using the memory storage of metasrv in bare-metal mode.") +======= + cmd.Flags().BoolVarP(&options.EnableEtcd, "memory-meta-storage", "m", true, "Bootstrap the whole cluster without installing etcd for testing purposes through using the memory storage of metasrv in bare-metal mode.") +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f return cmd } @@ -184,7 +192,11 @@ func NewCluster(args []string, options *clusterCreateCliOptions, l logger.Logger l.V(0).Infof("Creating GreptimeDB cluster '%s' on bare-metal", logger.Bold(clusterName)) var opts []baremetal.Option +<<<<<<< HEAD opts = append(opts, baremetal.WithEnableCache(options.EnableCache), baremetal.Withmetastore(options.metastore)) +======= + opts = append(opts, baremetal.WithEnableCache(options.EnableCache), baremetal.WithEnableEtcd(options.EnableEtcd)) +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f if len(options.GreptimeBinVersion) > 0 { opts = append(opts, baremetal.WithGreptimeVersion(options.GreptimeBinVersion)) } diff --git a/pkg/cluster/baremetal/cluster.go b/pkg/cluster/baremetal/cluster.go index 28103da2..4e5fca11 100644 --- a/pkg/cluster/baremetal/cluster.go +++ b/pkg/cluster/baremetal/cluster.go @@ -34,7 +34,11 @@ type Cluster struct { config *config.BareMetalClusterConfig createNoDirs bool enableCache bool +<<<<<<< HEAD metastore bool +======= + enableEtcd bool +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f am artifacts.Manager mm metadata.Manager @@ -85,9 +89,15 @@ func WithEnableCache(enableCache bool) Option { } } +<<<<<<< HEAD func Withmetastore(metastore bool) Option { return func(c *Cluster) { c.metastore = metastore +======= +func WithEnableEtcd(enableEtcd bool) Option { + return func(c *Cluster) { + c.enableEtcd = enableEtcd +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f } } diff --git a/pkg/cluster/baremetal/create.go b/pkg/cluster/baremetal/create.go index 800d8999..5ed6009f 100644 --- a/pkg/cluster/baremetal/create.go +++ b/pkg/cluster/baremetal/create.go @@ -51,8 +51,12 @@ func (c *Cluster) Create(ctx context.Context, options *opt.CreateOptions) error } return nil } +<<<<<<< HEAD if c.metastore { +======= + if c.enableEtcd { +>>>>>>> 98e56c47ca7ee1089a8b4e1c45b0eb7332f2638f if err := withSpinner("Etcd Cluster", c.createEtcdCluster); err != nil { return err }