Documentation ¶
Index ¶
- Constants
- func NewCmdDown(name, fullName string, f *osclientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdUp(name, fullName string, f *osclientcmd.Factory, out io.Writer) *cobra.Command
- type ClientStartConfig
- func (c *ClientStartConfig) CheckAvailablePorts(out io.Writer) error
- func (c *ClientStartConfig) CheckDockerInsecureRegistry(out io.Writer) error
- func (c *ClientStartConfig) CheckDockerVersion(io.Writer) error
- func (c *ClientStartConfig) CheckExistingOpenShiftContainer(out io.Writer) error
- func (c *ClientStartConfig) CheckNsenterMounter(out io.Writer) error
- func (c *ClientStartConfig) CheckOpenShiftImage(out io.Writer) error
- func (c *ClientStartConfig) Clients() (*client.Client, *kclient.Client, error)
- func (c *ClientStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
- func (c *ClientStartConfig) CreateDockerMachine(out io.Writer) error
- func (c *ClientStartConfig) CreateProject(out io.Writer) error
- func (c *ClientStartConfig) DetermineServerIP(out io.Writer) error
- func (c *ClientStartConfig) DockerHelper() *dockerhelper.Helper
- func (c *ClientStartConfig) EnsureVolumeShare(io.Writer) error
- func (c *ClientStartConfig) Factory() (*clientcmd.Factory, error)
- func (c *ClientStartConfig) GetDockerClient(out io.Writer) error
- func (c *ClientStartConfig) HostHelper() *host.HostHelper
- func (c *ClientStartConfig) ImportImageStreams(out io.Writer) error
- func (c *ClientStartConfig) ImportTemplates(out io.Writer) error
- func (c *ClientStartConfig) InstallRegistry(out io.Writer) error
- func (c *ClientStartConfig) InstallRouter(out io.Writer) error
- func (c *ClientStartConfig) Login(out io.Writer) error
- func (c *ClientStartConfig) OpenShiftHelper() *openshift.Helper
- func (c *ClientStartConfig) ServerInfo(out io.Writer) error
- func (c *ClientStartConfig) Start(out io.Writer) error
- func (c *ClientStartConfig) StartOpenShift(out io.Writer) error
- func (c *ClientStartConfig) Validate(out io.Writer) error
- type ClientStopConfig
- type TaskPrinter
Constants ¶
const (
CmdDownRecommendedName = "down"
)
const (
// CmdUpRecommendedName is the recommended command name
CmdUpRecommendedName = "up"
)
Variables ¶
This section is empty.
Functions ¶
func NewCmdDown ¶
NewCmdDown creates a command that stops OpenShift
Types ¶
type ClientStartConfig ¶
type ClientStartConfig struct { ImageVersion string Image string DockerMachine string ShouldCreateDockerMachine bool SkipRegistryCheck bool InstallLogAggregation bool InstallMetrics bool UseNsenterMount bool Out io.Writer TaskPrinter *TaskPrinter Tasks []task HostName string ServerIP string CACert string PublicHostname string RoutingSuffix string DNSPort int LocalConfigDir string HostVolumesDir string HostConfigDir string HostDataDir string UseExistingConfig bool Environment []string ServerLogLevel int // contains filtered or unexported fields }
ClientStartConfig is the configuration for the client start command
func (*ClientStartConfig) CheckAvailablePorts ¶
func (c *ClientStartConfig) CheckAvailablePorts(out io.Writer) error
CheckAvailablePorts ensures that ports used by OpenShift are available on the Docker host
func (*ClientStartConfig) CheckDockerInsecureRegistry ¶
func (c *ClientStartConfig) CheckDockerInsecureRegistry(out io.Writer) error
CheckDockerInsecureRegistry checks whether the Docker daemon is using the right --insecure-registry argument
func (*ClientStartConfig) CheckDockerVersion ¶
func (c *ClientStartConfig) CheckDockerVersion(io.Writer) error
CheckDockerVersion checks that the appropriate Docker version is installed based on whether we are using the nsenter mounter or shared volumes for OpenShift
func (*ClientStartConfig) CheckExistingOpenShiftContainer ¶
func (c *ClientStartConfig) CheckExistingOpenShiftContainer(out io.Writer) error
CheckExistingOpenShiftContainer checks the state of an OpenShift container. If one is already running, it throws an error. If one exists, it removes it so a new one can be created.
func (*ClientStartConfig) CheckNsenterMounter ¶
func (c *ClientStartConfig) CheckNsenterMounter(out io.Writer) error
CheckNsenterMounter checks whether the Docker host can use the nsenter mounter from Kubernetes. Otherwise, a shared volume is needed in Docker
func (*ClientStartConfig) CheckOpenShiftImage ¶
func (c *ClientStartConfig) CheckOpenShiftImage(out io.Writer) error
CheckOpenShiftImage checks whether the OpenShift image exists. If not it tells the Docker daemon to pull it.
func (*ClientStartConfig) Complete ¶
func (c *ClientStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
Complete initializes fields in StartConfig based on command parameters and execution environment
func (*ClientStartConfig) CreateDockerMachine ¶
func (c *ClientStartConfig) CreateDockerMachine(out io.Writer) error
CreateDockerMachine will create a new Docker machine to run OpenShift
func (*ClientStartConfig) CreateProject ¶
func (c *ClientStartConfig) CreateProject(out io.Writer) error
CreateProject creates a new project for the current user
func (*ClientStartConfig) DetermineServerIP ¶
func (c *ClientStartConfig) DetermineServerIP(out io.Writer) error
DetermineServerIP gets an appropriate IP address to communicate with the OpenShift server
func (*ClientStartConfig) DockerHelper ¶
func (c *ClientStartConfig) DockerHelper() *dockerhelper.Helper
DockerHelper returns a helper object to work with the Docker client
func (*ClientStartConfig) EnsureVolumeShare ¶
func (c *ClientStartConfig) EnsureVolumeShare(io.Writer) error
EnsureVolumeShare ensures that a volume share exists on the Docker host machine if not using the nsenter mounter for the OpenShift node
func (*ClientStartConfig) Factory ¶
func (c *ClientStartConfig) Factory() (*clientcmd.Factory, error)
Factory returns a command factory that works with OpenShift server's admin credentials
func (*ClientStartConfig) GetDockerClient ¶
func (c *ClientStartConfig) GetDockerClient(out io.Writer) error
GetDockerClient will obtain a new Docker client from the environment or from a Docker machine, starting it if necessary
func (*ClientStartConfig) HostHelper ¶
func (c *ClientStartConfig) HostHelper() *host.HostHelper
HostHelper returns a helper object to check Host configuration
func (*ClientStartConfig) ImportImageStreams ¶
func (c *ClientStartConfig) ImportImageStreams(out io.Writer) error
ImportImageStreams imports default image streams into the server TODO: Use streams compiled into oc
func (*ClientStartConfig) ImportTemplates ¶
func (c *ClientStartConfig) ImportTemplates(out io.Writer) error
ImportTemplates imports default templates into the server TODO: Use templates compiled into oc
func (*ClientStartConfig) InstallRegistry ¶
func (c *ClientStartConfig) InstallRegistry(out io.Writer) error
InstallRegistry installs the OpenShift registry on the server
func (*ClientStartConfig) InstallRouter ¶
func (c *ClientStartConfig) InstallRouter(out io.Writer) error
InstallRouter installs a default router on the server
func (*ClientStartConfig) Login ¶
func (c *ClientStartConfig) Login(out io.Writer) error
Login logs into the new server and sets up a default user and project
func (*ClientStartConfig) OpenShiftHelper ¶
func (c *ClientStartConfig) OpenShiftHelper() *openshift.Helper
OpenShiftHelper returns a helper object to work with OpenShift on the server
func (*ClientStartConfig) ServerInfo ¶
func (c *ClientStartConfig) ServerInfo(out io.Writer) error
ServerInfo displays server information after a successful start
func (*ClientStartConfig) Start ¶
func (c *ClientStartConfig) Start(out io.Writer) error
Start runs the start tasks ensuring that they are executed in sequence
func (*ClientStartConfig) StartOpenShift ¶
func (c *ClientStartConfig) StartOpenShift(out io.Writer) error
StartOpenShift starts the OpenShift container
type ClientStopConfig ¶
type ClientStopConfig struct {
DockerMachine string
}
type TaskPrinter ¶
type TaskPrinter struct {
// contains filtered or unexported fields
}
TaskPrinter is a helper for start task output
func NewTaskPrinter ¶
func NewTaskPrinter(out io.Writer) *TaskPrinter
NewTaskPrinter creates a new TaskPrinter
func (*TaskPrinter) Failure ¶
func (p *TaskPrinter) Failure(err error)
Failure writes out a failure marker for a task and outputs the error that caused the failure
func (*TaskPrinter) StartTask ¶
func (p *TaskPrinter) StartTask(name string)
StartTask writes out the header for a task
func (*TaskPrinter) Success ¶
func (p *TaskPrinter) Success()
Success writes out a success marker for a task
func (*TaskPrinter) TaskWriter ¶
func (p *TaskPrinter) TaskWriter() io.Writer
TaskWriter is a writer that can be used to write task output
Directories ¶
Path | Synopsis |
---|---|
Package exec contains a utility to Docker exec into a running a container
|
Package exec contains a utility to Docker exec into a running a container |
Package host contains a utility to run commands on the Docker host by using an image in privileged mode.
|
Package host contains a utility to run commands on the Docker host by using an image in privileged mode. |
Package runner contains a utility to run Docker containers
|
Package runner contains a utility to run Docker containers |