{"modulePath":"github.com/2lambda123/openshift-origin","version":"v3.8.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package docker\n\n## Constants\n\n```go\nconst CmdDownRecommendedName = \"down\"\n```\n\n```go\nconst CmdJoinRecommendedName = \"join\"\n```\nCmdJoinRecommendedName is the recommended command name\n\n```go\nconst CmdStatusRecommendedName = \"status\"\n```\nCmdStatusRecommendedName is the recommended command name\n\n```go\nconst (\n\t// CmdUpRecommendedName is the recommended command name\n\tCmdUpRecommendedName = \"up\"\n)\n```\n\n## Functions\n\n```go\nfunc NewCmdDown(name, fullName string, f *osclientcmd.Factory, out io.Writer) *cobra.Command\n```\nNewCmdDown creates a command that stops OpenShift\n\n```go\nfunc NewCmdJoin(name, fullName string, f *osclientcmd.Factory, in io.Reader, out io.Writer) *cobra.Command\n```\nNewCmdJoin creates a command that joins an existing OpenShift cluster.\n\n```go\nfunc NewCmdStatus(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command\n```\nNewCmdStatus implements the OpenShift cluster status command.\n\n```go\nfunc NewCmdUp(name, fullName string, f *osclientcmd.Factory, out, errout io.Writer) *cobra.Command\n```\nNewCmdUp creates a command that starts OpenShift on Docker with reasonable defaults\n\n```go\nfunc PrintError(err error, out io.Writer)\n```\n\n## Types\n\n```go\ntype ClientJoinConfig struct {\n\tCommonStartConfig\n\n\tIn     io.Reader\n\tSecret string\n}\n```\nClientJoinConfig is the configuration for the client join command\n\n```go\nfunc (config *ClientJoinConfig) Bind(flags *pflag.FlagSet)\n```\n\n```go\nfunc (c *ClientJoinConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error\n```\nComplete initializes fields based on command parameters and execution environment\n\n```go\nfunc (c *ClientJoinConfig) StartOpenShiftNode(out io.Writer) error\n```\nStartOpenShiftNode starts the OpenShift container as a node\n\n```go\ntype ClientStartConfig struct {\n\tCommonStartConfig\n}\n```\nClientStartConfig is the configuration for the client start command\n\n```go\nfunc (config *ClientStartConfig) Bind(flags *pflag.FlagSet)\n```\n\n```go\nfunc (c *ClientStartConfig) CheckContainerNetworking(out io.Writer) error\n```\n\n```go\nfunc (c *ClientStartConfig) CheckServiceCatalogPrereqVersion(out io.Writer) error\n```\nCheckServiceCatalogPrereqVersion ensures the OpenShift server version is high enough to run the service catalog.\n\n```go\nfunc (c *ClientStartConfig) Clients() (interface{}, kclientset.Interface, error)\n```\nClients returns clients for OpenShift and Kube FIXME: Refactor this to KubernetesInternal() call.\n\n```go\nfunc (c *ClientStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error\n```\nComplete initializes fields based on command parameters and execution environment\n\n```go\nfunc (c *ClientStartConfig) CreateProject(out io.Writer) error\n```\nCreateProject creates a new project for the current user\n\n```go\nfunc (c *ClientStartConfig) EnsureDefaultRedirectURIs(out io.Writer) error\n```\nEnsureDefaultRedirectURIs merges a default URL to an auth client's RedirectURIs array\n\n```go\nfunc (c *ClientStartConfig) Factory() (*clientcmd.Factory, error)\n```\nFactory returns a command factory that works with OpenShift server's admin credentials\n\n```go\nfunc (c *ClientStartConfig) ImportImageStreams(out io.Writer) error\n```\nImportImageStreams imports default image streams into the server TODO: Use streams compiled into oc\n\n```go\nfunc (c *ClientStartConfig) ImportLoggingTemplates(out io.Writer) error\n```\nImportLoggingTemplates imports service catalog templates into the server\n\n```go\nfunc (c *ClientStartConfig) ImportServiceCatalogTemplates(out io.Writer) error\n```\nImportServiceCatalogTemplates imports service catalog templates into the server\n\n```go\nfunc (c *ClientStartConfig) ImportTemplates(out io.Writer) error\n```\nImportTemplates imports default templates into the server TODO: Use templates compiled into oc\n\n```go\nfunc (c *ClientStartConfig) InstallLogging(out io.Writer) error\n```\nInstallLogging will start the installation of logging components\n\n```go\nfunc (c *ClientStartConfig) InstallMetrics(out io.Writer) error\n```\nInstallMetrics will start the installation of Metrics components\n\n```go\nfunc (c *ClientStartConfig) InstallRegistry(out io.Writer) error\n```\nInstallRegistry installs the OpenShift registry on the server\n\n```go\nfunc (c *ClientStartConfig) InstallRouter(out io.Writer) error\n```\nInstallRouter installs a default router on the server\n\n```go\nfunc (c *ClientStartConfig) InstallServiceCatalog(out io.Writer) error\n```\nInstallServiceCatalog will start the installation of service catalog components\n\n```go\nfunc (c *ClientStartConfig) InstallTemplateServiceBroker(out io.Writer) error\n```\nInstallTemplateServiceBroker will start the installation of template service broker\n\n```go\nfunc (c *ClientStartConfig) Login(out io.Writer) error\n```\nLogin logs into the new server and sets up a default user and project\n\n```go\nfunc (c *ClientStartConfig) RegisterTemplateServiceBroker(out io.Writer) error\n```\nRegisterTemplateServiceBroker will register the tsb with the service catalog\n\n```go\nfunc (c *ClientStartConfig) RemoveTemporaryDirectory(out io.Writer) error\n```\nRemoveTemporaryDirectory removes the local configuration directory\n\n```go\nfunc (c *ClientStartConfig) ServerInfo(out io.Writer) error\n```\nServerInfo displays server information after a successful start\n\n```go\nfunc (c *ClientStartConfig) ShouldCreateUser() bool\n```\nShouldCreateUser determines whether a user and project should be created. If the user provider has been modified in the config, then it should not attempt to create a user. Also, even if the user provider has not been modified, but data has been initialized, then we should also not create user.\n\n```go\nfunc (c *ClientStartConfig) ShouldInitializeData() bool\n```\nShouldInitializeData tries to determine whether we're dealing with an existing OpenShift data and config. It determines that data exists by checking for the existence of a docker-registry service.\n\n```go\nfunc (c *ClientStartConfig) Start(out io.Writer) error\n```\nStart runs the start tasks ensuring that they are executed in sequence\n\n```go\nfunc (c *ClientStartConfig) StartOpenShift(out io.Writer) error\n```\nStartOpenShift starts the OpenShift container\n\n```go\nfunc (c *ClientStartConfig) Validate(out, errout io.Writer) error\n```\nValidate validates that required fields in StartConfig have been populated\n\n```go\ntype ClientStatusConfig struct {\n\tDockerMachine string\n}\n```\nClientStatusConfig is the configuration for the client status command\n\n```go\nfunc (c *ClientStatusConfig) Status(f *clientcmd.Factory, out io.Writer) error\n```\nStatus prints the OpenShift cluster status\n\n```go\ntype ClientStopConfig struct {\n\tDockerMachine string\n}\n```\n\n```go\nfunc (c *ClientStopConfig) Stop(out io.Writer) error\n```\nStop stops the currently running origin container and any containers started by the node.\n\n```go\ntype CommonStartConfig struct {\n\tImageVersion                string\n\tImage                       string\n\tImageStreams                string\n\tDockerMachine               string\n\tShouldCreateDockerMachine   bool\n\tSkipRegistryCheck           bool\n\tShouldInstallMetrics        bool\n\tShouldInstallLogging        bool\n\tShouldInstallServiceCatalog bool\n\tPortForwarding              bool\n\n\tOut   io.Writer\n\tTasks []task\n\n\tHostName                 string\n\tLocalConfigDir           string\n\tUseExistingConfig        bool\n\tEnvironment              []string\n\tServerLogLevel           int\n\tHostVolumesDir           string\n\tHostConfigDir            string\n\tHostDataDir              string\n\tUsePorts                 []int\n\tDNSPort                  int\n\tServerIP                 string\n\tAdditionalIPs            []string\n\tUseNsenterMount          bool\n\tPublicHostname           string\n\tRoutingSuffix            string\n\tHostPersistentVolumesDir string\n\tHTTPProxy                string\n\tHTTPSProxy               string\n\tNoProxy                  []string\n\tCACert                   string\n\tPVCount                  int\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (config *CommonStartConfig) Bind(flags *pflag.FlagSet)\n```\n\n```go\nfunc (c *CommonStartConfig) CheckAvailablePorts(out io.Writer) error\n```\nCheckAvailablePorts ensures that ports used by OpenShift are available on the Docker host\n\n```go\nfunc (c *CommonStartConfig) CheckDockerInsecureRegistry(out io.Writer) error\n```\nCheckDockerInsecureRegistry checks to see if the Docker daemon has an appropriate insecure registry argument set so that our services can access the registry\n\n```go\nfunc (c *CommonStartConfig) CheckDockerVersion(out io.Writer) error\n```\nCheckDockerVersion checks that the appropriate Docker version is installed based on whether we are using the nsenter mounter or shared volumes for OpenShift\n\n```go\nfunc (c *CommonStartConfig) CheckExistingOpenShiftContainer(out io.Writer) error\n```\nCheckExistingOpenShiftContainer 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.\n\n```go\nfunc (c *CommonStartConfig) CheckNsenterMounter(out io.Writer) error\n```\nCheckNsenterMounter checks whether the Docker host can use the nsenter mounter from Kubernetes. Otherwise, a shared volume is needed in Docker\n\n```go\nfunc (c *CommonStartConfig) CheckOpenShiftClient(out io.Writer) error\n```\nCheckOpenShiftClient ensures that the client can be configured for the new server\n\n```go\nfunc (c *CommonStartConfig) CheckOpenShiftImage(out io.Writer) error\n```\nCheckOpenShiftImage checks whether the OpenShift image exists. If not it tells the Docker daemon to pull it.\n\n```go\nfunc (c *CommonStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error\n```\n\n```go\nfunc (c *CommonStartConfig) CreateDockerMachine(out io.Writer) error\n```\nCreateDockerMachine will create a new Docker machine to run OpenShift\n\n```go\nfunc (c *CommonStartConfig) DetermineServerIP(out io.Writer) error\n```\nDetermineServerIP gets an appropriate IP address to communicate with the OpenShift server\n\n```go\nfunc (c *CommonStartConfig) DockerHelper() *dockerhelper.Helper\n```\nDockerHelper returns a helper object to work with the Docker client\n\n```go\nfunc (c *CommonStartConfig) EnsureHostDirectories(io.Writer) error\n```\n\n```go\nfunc (c *CommonStartConfig) GetDockerClient(out io.Writer) error\n```\nGetDockerClient obtains a new Docker client from the environment or from a Docker machine, starting it if necessary\n\n```go\nfunc (c *CommonStartConfig) HostHelper() *host.HostHelper\n```\nHostHelper returns a helper object to check Host configuration\n\n```go\nfunc (c *CommonStartConfig) OpenShiftHelper() *openshift.Helper\n```\nOpenShiftHelper returns a helper object to work with OpenShift on the server\n\n```go\nfunc (c *CommonStartConfig) Start(out io.Writer) error\n```\nStart runs the start tasks ensuring that they are executed in sequence\n\n```go\nfunc (c *CommonStartConfig) Validate(out io.Writer) error\n```\nValidate validates that required fields in StartConfig have been populated\n\n```go\ntype TaskPrinter struct {\n\t// contains filtered or unexported fields\n}\n```\nTaskPrinter is a helper for start task output\n\n```go\nfunc NewTaskPrinter(out io.Writer) *TaskPrinter\n```\nNewTaskPrinter creates a new TaskPrinter\n\n```go\nfunc (p *TaskPrinter) Failure(err error)\n```\nFailure writes out a failure marker for a task and outputs the error that caused the failure\n\n```go\nfunc (p *TaskPrinter) StartTask(name string)\n```\nStartTask writes out the header for a task\n\n```go\nfunc (p *TaskPrinter) Success()\n```\nSuccess writes out a success marker for a task\n\n```go\nfunc (p *TaskPrinter) TaskWriter() io.Writer\n```\nTaskWriter is a writer that can be used to write task output\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oc/bootstrap/docker","name":"docker","synopsis":"","isRedistributable":true}
