package main import ( "os" "github.com/rancher/rke/cmd" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) var VERSION = "v0.0.12-dev" func main() { if err := mainErr(); err != nil { logrus.Fatal(err) } } func mainErr() error { app := cli.NewApp() app.Name = "rke" app.Version = VERSION app.Usage = "Rancher Kubernetes Engine, Running kubernetes cluster in the cloud" app.Before = func(ctx *cli.Context) error { if ctx.GlobalBool("debug") { logrus.SetLevel(logrus.DebugLevel) } return nil } app.Author = "Rancher Labs, Inc." app.Email = "" app.Commands = []cli.Command{ cmd.UpCommand(), cmd.RemoveCommand(), cmd.VersionCommand(), cmd.ConfigCommand(), cmd.EtcdCommand(), } app.Flags = []cli.Flag{ cli.BoolFlag{ Name: "debug,d", Usage: "Debug logging", }, } return app.Run(os.Args) }