Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/create.go

This file was deleted.

29 changes: 29 additions & 0 deletions cmd/install.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package cmd

import (
"github.com/Mirantis/mcc/pkg/install"

log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)

func NewInstallCommand() *cli.Command {
return &cli.Command{
Name: "install",
Usage: "Install a new cluster",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Usage: "Path to cluster config yaml",
Aliases: []string{"c"},
Value: "cluster.yaml",
},
},
Action: func(ctx *cli.Context) error {
log.Info("Install called")

err := install.Install(ctx)
return err
},
}
}
24 changes: 2 additions & 22 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,13 @@ package main
import (
"os"

"github.com/Mirantis/mcc/pkg/install"
"github.com/Mirantis/mcc/cmd"

log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)

func main() {
installCmd := &cli.Command{
Name: "install",
Usage: "Install a new cluster",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Usage: "Path to cluster config yaml",
Aliases: []string{"c"},
Value: "cluster.yaml",
},
},
Action: func(ctx *cli.Context) error {
log.Info("Install called")
log.Debug("Debug is on.....")

err := install.Install(ctx)
return err
},
}

app := &cli.App{
Flags: []cli.Flag{
&cli.BoolFlag{
Expand All @@ -46,7 +26,7 @@ func main() {
return nil
},
Commands: []*cli.Command{
installCmd,
cmd.NewInstallCommand(),
},
}

Expand Down