2015-02-17 21:31:37 +00:00
|
|
|
package control
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli"
|
|
|
|
"github.com/rancherio/os/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Main() {
|
|
|
|
app := cli.NewApp()
|
|
|
|
|
|
|
|
app.Name = os.Args[0]
|
|
|
|
app.Usage = "Control and configure RancherOS"
|
|
|
|
app.Version = config.VERSION
|
|
|
|
app.Author = "Rancher Labs, Inc."
|
2015-02-23 03:56:25 +00:00
|
|
|
app.EnableBashCompletion = true
|
2015-02-17 21:31:37 +00:00
|
|
|
|
|
|
|
app.Commands = []cli.Command{
|
|
|
|
{
|
|
|
|
Name: "config",
|
|
|
|
ShortName: "c",
|
|
|
|
Usage: "configure settings",
|
2015-03-18 13:23:27 +00:00
|
|
|
HideHelp: true,
|
2015-02-17 21:31:37 +00:00
|
|
|
Subcommands: configSubcommands(),
|
|
|
|
},
|
2015-07-21 07:56:55 +00:00
|
|
|
{
|
|
|
|
Name: "dev",
|
|
|
|
ShortName: "d",
|
|
|
|
Usage: "dev spec",
|
|
|
|
HideHelp: true,
|
|
|
|
SkipFlagParsing: true,
|
|
|
|
Action: devAction,
|
|
|
|
},
|
2015-04-29 10:32:12 +00:00
|
|
|
{
|
2015-06-15 20:58:16 +00:00
|
|
|
Name: "env",
|
|
|
|
ShortName: "e",
|
|
|
|
Usage: "env command",
|
|
|
|
HideHelp: true,
|
|
|
|
SkipFlagParsing: true,
|
|
|
|
Action: envAction,
|
2015-04-29 10:32:12 +00:00
|
|
|
},
|
2015-02-17 21:31:37 +00:00
|
|
|
{
|
2015-04-06 14:28:17 +00:00
|
|
|
Name: "service",
|
|
|
|
ShortName: "s",
|
|
|
|
Usage: "service settings",
|
2015-03-18 13:23:27 +00:00
|
|
|
HideHelp: true,
|
2015-04-06 14:28:17 +00:00
|
|
|
Subcommands: serviceSubCommands(),
|
2015-02-17 21:31:37 +00:00
|
|
|
},
|
|
|
|
{
|
2015-02-23 19:00:33 +00:00
|
|
|
Name: "os",
|
|
|
|
Usage: "operating system upgrade/downgrade",
|
2015-03-18 13:23:27 +00:00
|
|
|
HideHelp: true,
|
2015-02-21 06:35:42 +00:00
|
|
|
Subcommands: osSubcommands(),
|
2015-02-17 21:31:37 +00:00
|
|
|
},
|
2015-02-21 21:31:10 +00:00
|
|
|
{
|
2015-03-18 12:35:47 +00:00
|
|
|
Name: "tls",
|
2015-02-23 19:00:33 +00:00
|
|
|
Usage: "setup tls configuration",
|
2015-03-18 12:35:47 +00:00
|
|
|
HideHelp: true,
|
2015-02-21 21:31:10 +00:00
|
|
|
Subcommands: tlsConfCommands(),
|
|
|
|
},
|
2015-08-18 14:07:00 +00:00
|
|
|
installCommand,
|
2015-09-22 18:17:15 +00:00
|
|
|
composeCommand(),
|
2015-02-17 21:31:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
app.Run(os.Args)
|
|
|
|
}
|