func init() { rand.Seed(time.Now().UTC().UnixNano()) stdcli.RegisterCommand(cli.Command{ Name: "install", Description: "install convox into an aws account", Usage: "", Action: cmdInstall, Flags: []cli.Flag{ cli.BoolFlag{ Name: "dedicated", Usage: "create EC2 instances on dedicated hardware", }, }, }) stdcli.RegisterCommand(cli.Command{ Name: "uninstall", Description: "uninstall convox from an aws account", Usage: "", Action: cmdUninstall, Flags: []cli.Flag{ cli.BoolFlag{ Name: "force", Usage: "uninstall even if apps exist", }, }, }) }
func init() { rand.Seed(time.Now().UTC().UnixNano()) stdcli.RegisterCommand(cli.Command{ Name: "install", Description: "install convox into an aws account", Usage: "", Action: cmdInstall, Flags: []cli.Flag{ cli.BoolFlag{ Name: "dedicated", Usage: "create EC2 instances on dedicated hardware", }, cli.IntFlag{ Name: "instance-count", Value: 3, Usage: "number of EC2 instances", }, cli.StringFlag{ Name: "instance-type", Value: "t2.small", Usage: "type of EC2 instances", }, cli.StringFlag{ Name: "region", Value: "us-east-1", Usage: "aws region to install in", EnvVar: "AWS_REGION", }, }, }) stdcli.RegisterCommand(cli.Command{ Name: "uninstall", Description: "uninstall convox from an aws account", Usage: "", Action: cmdUninstall, Flags: []cli.Flag{ cli.BoolFlag{ Name: "force", Usage: "uninstall even if apps exist", }, cli.StringFlag{ Name: "region", Value: "us-east-1", Usage: "aws region to uninstall from", EnvVar: "AWS_REGION", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "builds", Description: "manage an app's builds", Usage: "", Action: cmdBuilds, Flags: []cli.Flag{appFlag}, Subcommands: []cli.Command{ { Name: "create", Description: "create a new build", Usage: "", Action: cmdBuild, Flags: []cli.Flag{appFlag}, }, { Name: "info", Description: "print output for a build", Usage: "<ID>", Action: cmdBuildsInfo, Flags: []cli.Flag{appFlag}, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "env", Description: "manage an app's environment variables", Usage: "get|set|unset", Action: cmdEnvGetAll, Flags: []cli.Flag{appFlag}, Subcommands: []cli.Command{ { Name: "get", Usage: "VARIABLE", Action: cmdEnvGet, Flags: []cli.Flag{appFlag}, }, { Name: "set", Usage: "VARIABLE=VALUE", Action: cmdEnvSet, Flags: []cli.Flag{appFlag}, }, { Name: "unset", Usage: "VARIABLE", Action: cmdEnvUnset, Flags: []cli.Flag{appFlag}, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "system", Description: "manage your Convox rack", Usage: "", Action: cmdSystem, Subcommands: []cli.Command{ { Name: "update", Description: "update rack to the latest version", Usage: "[version]", Action: cmdSystemUpdate, }, { Name: "scale", Description: "scale the rack capacity", Usage: "", Action: cmdSystemScale, Flags: []cli.Flag{ cli.IntFlag{ Name: "count", Usage: "horizontally scale the instance count, e.g. 3 or 10", }, cli.StringFlag{ Name: "type", Usage: "vertically scale the instance type, e.g. t2.small or c3.xlargs", }, }, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "services", Description: "manage services", Usage: "", Action: cmdServices, Subcommands: []cli.Command{ { Name: "create", Description: "create a new service", Usage: "<name> <postgres|redis>", Action: cmdServiceCreate, }, { Name: "delete", Description: "delete a service", Usage: "<name>", Action: cmdServiceDelete, }, { Name: "info", Description: "info about a service", Usage: "<name>", Action: cmdServiceInfo, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "apps", Action: cmdApps, Description: "list deployed apps", Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. If not specified, use current directory.", }, }, Subcommands: []cli.Command{ { Name: "create", Description: "create a new application", Usage: "[name]", Action: cmdAppCreate, }, { Name: "delete", Description: "delete an application", Usage: "<name>", Action: cmdAppDelete, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "system", Description: "manage the base convox system", Usage: "", Action: cmdSystem, Subcommands: []cli.Command{ { Name: "update", Description: "update the convox system API", Usage: "<version>", Action: cmdSystemUpate, }, { Name: "scale", Description: "scale the convox system cluster", Usage: "", Action: cmdSystemScale, Flags: []cli.Flag{ cli.IntFlag{ Name: "count", Usage: "instance count, e.g. 3 or 10", }, cli.StringFlag{ Name: "type", Usage: "instance type, e.g. t2.small or c3.xlargs", }, }, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "apps", Action: cmdApps, Description: "list deployed apps", Subcommands: []cli.Command{ { Name: "create", Description: "create a new application", Usage: "[name]", Action: cmdAppCreate, }, { Name: "delete", Description: "delete an application", Usage: "[name]", Action: cmdAppDelete, }, { Name: "info", Description: "see info about an app", Usage: "[name]", Action: cmdAppInfo, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "releases", Description: "list an app's releases", Usage: "", Action: cmdReleases, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, }, Subcommands: []cli.Command{ { Name: "promote", Description: "promote a release", Usage: "<release id>", Action: cmdReleasePromote, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, }, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "switch", Description: "switch to another convox rack", Usage: "host", Action: cmdSwitch, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "update", Description: "update the cli", Usage: "", Action: cmdUpdate, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "top", Action: cmdTop, Description: "resource utilization stats", Usage: "", }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "start", Description: "start an app for local development", Usage: "<directory>", Action: cmdStart, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "info", Description: "see info about an app", Usage: "[--app name]", Action: cmdInfo, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "ps", Description: "list an app's processes", Usage: "", Action: cmdPs, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "exec", Description: "exec a local process", Usage: "ps cmd", Action: cmdExec, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "logs", Description: "stream the logs for an application", Usage: "", Action: cmdLogsStream, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "debug", Description: "get low-level system events for debugging purposes", Usage: "", Action: cmdDebug, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "exec", Description: "run a one-off command in a local Convox process", Usage: "[process] [command]", Action: cmdExec, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "deploy", Description: "deploy an app to AWS", Usage: "<directory>", Action: cmdDeploy, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "run", Description: "run a one-off command in your Convox rack", Usage: "[process] [command]", Action: cmdRun, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, cli.BoolFlag{ Name: "attach", Usage: "attach to an interactive session", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "ps", Description: "list an app's processes", Usage: "", Action: cmdPs, Flags: []cli.Flag{appFlag}, Subcommands: []cli.Command{ { Name: "stop", Description: "stop a process", Usage: "id", Action: cmdPsStop, Flags: []cli.Flag{appFlag}, }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "scale", Description: "scale an app's processes", Usage: "PROCESS [--count 2] [--memory 512]", Action: cmdScale, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "App name. Inferred from current directory if not specified.", }, cli.IntFlag{ Name: "count", Value: 1, Usage: "Number of processes to keep running for specified process type.", }, cli.IntFlag{ Name: "memory", Value: 256, Usage: "Amount of memory, in MB, available to specified process type.", }, }, }) }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "login", Description: "log into your convox rack", Usage: "[hostname]", Action: cmdLogin, Flags: []cli.Flag{ cli.StringFlag{ Name: "password", Usage: "Password to use for authentication. If not specified, prompt for password.", }, }, }) home, err := homedir.Dir() if err != nil { log.Fatal(err) } ConfigRoot = filepath.Join(home, ".convox") stat, err := os.Stat(ConfigRoot) if err != nil && !os.IsNotExist(err) { log.Fatal(err) } if stat != nil && !stat.IsDir() { err := upgradeConfig() if err != nil { log.Fatal(err) } } }
func init() { stdcli.RegisterCommand(cli.Command{ Name: "scale", Description: "scale an app's processes", Usage: "", Action: cmdScale, Flags: []cli.Flag{ cli.StringFlag{ Name: "app", Usage: "app name. Inferred from current directory if not specified.", }, cli.IntFlag{ Name: "count", Value: 1, Usage: "number of processes to keep running for every process type.", }, cli.IntFlag{ Name: "memory", Value: 256, Usage: "amount of memory, in megabytes, available to every process.", }, }, }) }
func init() { rand.Seed(time.Now().UTC().UnixNano()) stdcli.RegisterCommand(cli.Command{ Name: "install", Description: "install convox into an aws account", Usage: "", Action: cmdInstall, Flags: []cli.Flag{ cli.BoolFlag{ Name: "dedicated", Usage: "create EC2 instances on dedicated hardware", }, cli.IntFlag{ Name: "instance-count", Value: 3, Usage: "number of EC2 instances", }, cli.StringFlag{ Name: "instance-type", Value: "t2.small", Usage: "type of EC2 instances", }, cli.StringFlag{ Name: "region", Value: "us-east-1", Usage: "aws region to install in", EnvVar: "AWS_REGION", }, cli.StringFlag{ Name: "stack-name", EnvVar: "STACK_NAME", Value: "convox", Usage: "name of the CloudFormation stack", }, cli.BoolFlag{ Name: "development", EnvVar: "DEVELOPMENT", Usage: "create additional CloudFormation outputs to copy development .env file", }, cli.StringFlag{ Name: "key", Usage: "name of an SSH keypair to install on EC2 instances", }, cli.StringFlag{ Name: "version", EnvVar: "VERSION", Value: "latest", Usage: "release version in the format of '20150810161818', or 'latest' by default", }, }, }) stdcli.RegisterCommand(cli.Command{ Name: "uninstall", Description: "uninstall convox from an aws account", Usage: "", Action: cmdUninstall, Flags: []cli.Flag{ cli.StringFlag{ Name: "region", Value: "us-east-1", Usage: "aws region to uninstall from", EnvVar: "AWS_REGION", }, cli.StringFlag{ Name: "stack-name", EnvVar: "STACK_NAME", Value: "convox", Usage: "name of the convox stack", }, }, }) }