Documentation ¶
Index ¶
- Variables
- func CallDocker(args []string, dockerHost string) error
- func GetDockerPath() string
- func GetHost(hostName string) (*api.Host, error)
- func GetHostName(args []string) (string, string)
- func GetHostSize() (int, string)
- func GetHumanHostName(hostName string) string
- func RunCreateHost(cmd *Command, args []string) error
- func RunDocker(cmd *Command, args []string) error
- func RunHosts(cmd *Command, args []string) error
- func RunIP(cmd *Command, args []string) error
- func RunRemoveHost(cmd *Command, args []string) error
- func WithDockerProxy(listenURL, hostName string, ...) error
- type Command
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateHost = &Command{ UsageLine: "create [-m MEMORY] [NAME]", Short: "Create a host", Long: fmt.Sprintf(`Create a host. You can optionally specify a name for the host - if not, it will be named 'default', and 'deploy docker' commands will use it automatically. You can also specify how much RAM the host should have with -m. Valid amounts are %s.`, validSizes), }
View Source
var Docker = &Command{
UsageLine: "docker [-H HOST] [COMMAND...]",
Short: "Run a Docker command against a host",
Long: `Run a Docker command against a host.
Wraps the 'docker' command-line tool - see the Docker website for reference:
http://docs.docker.io/en/latest/reference/commandline/
You can optionally specify a host by name - if you don't, the default host
will be used.`,
}
View Source
var HostSubcommands = []*Command{ CreateHost, RemoveHost, }
View Source
var Hosts = &Command{
UsageLine: "hosts",
Short: "Manage hosts",
Long: `Manage hosts.
Usage: deploy hosts [COMMAND] [ARGS...]
Commands:
ls List hosts (default)
create Create a host
rm Remove a host
Run 'deploy hosts COMMAND -h' for more information on a command.
`,
}
View Source
var IP = &Command{
UsageLine: "ip [NAME]",
Short: "Print a hosts's IP address to stdout",
Long: `Print a hosts's IP address to stdout.
You can optionally specify which host - if you don't, the default
host (named 'default') will be assumed.
`,
}
View Source
var Proxy = &Command{
UsageLine: "proxy [-H HOST] [LISTEN_URL]",
Short: "Start a local proxy to a host's Docker daemon",
Long: `Start a local proxy to a host's Docker daemon.
By default, listens on a Unix socket at a random path, e.g.
$ deploy proxy
Started proxy at unix:///tmp/deploy-12345/deploy.sock
$ docker -H unix:///tmp/deploy-12345/deploy.sock run ubuntu echo hello world
hello world
Instead, you can specify a URL to listen on, which can be a socket or TCP address:
$ deploy proxy unix:///path/to/socket
$ deploy proxy tcp://localhost:1234
`,
}
View Source
var RemoveHost = &Command{
UsageLine: "rm [-f] [NAME]",
Short: "Remove a host",
Long: `Remove a host.
You can optionally specify which host to remove - if you don't, the default
host (named 'default') will be removed.
Set -f to bypass the confirmation step, at your peril.
`,
}
View Source
var Run = &Command{
UsageLine: "run [-H HOST] COMMAND [ARGS...]",
Short: "Run a command with the DOCKER_HOST envvar set",
Long: `Start a proxy to a Deploy.IO host and run a command locally
with the DOCKER_HOST environment variable set.
For example:
$ deploy run fig up
You can optionally specify which host - if you don't, the default
host (named 'default') will be assumed.
`,
}
Functions ¶
func CallDocker ¶
func GetDockerPath ¶
func GetDockerPath() string
func GetHostName ¶
func GetHostSize ¶
func GetHumanHostName ¶
func RunCreateHost ¶
func RunRemoveHost ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.