Documentation ¶
Index ¶
- Constants
- func NewCmdDown(name, fullName string, f *osclientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdJoin(name, fullName string, f *osclientcmd.Factory, in io.Reader, out io.Writer) *cobra.Command
- func NewCmdStatus(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdUp(name, fullName string, f *osclientcmd.Factory, out, errout io.Writer) *cobra.Command
- func PrintError(err error, out io.Writer)
- type ClientJoinConfig
- type ClientStartConfig
- func (config *ClientStartConfig) Bind(flags *pflag.FlagSet)
- func (c *ClientStartConfig) CheckContainerNetworking(out io.Writer) error
- func (c *ClientStartConfig) CheckServiceCatalogPrereqVersion(out io.Writer) error
- func (c *ClientStartConfig) Clients() (interface{}, kclientset.Interface, error)
- func (c *ClientStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
- func (c *ClientStartConfig) CreateProject(out io.Writer) error
- func (c *ClientStartConfig) EnsureDefaultRedirectURIs(out io.Writer) error
- func (c *ClientStartConfig) Factory() (*clientcmd.Factory, error)
- func (c *ClientStartConfig) ImportImageStreams(out io.Writer) error
- func (c *ClientStartConfig) ImportInternalTemplates(out io.Writer) error
- func (c *ClientStartConfig) ImportLoggingTemplates(out io.Writer) error
- func (c *ClientStartConfig) ImportTemplates(out io.Writer) error
- func (c *ClientStartConfig) InstallLogging(out io.Writer) error
- func (c *ClientStartConfig) InstallMetrics(out io.Writer) error
- func (c *ClientStartConfig) InstallRegistry(out io.Writer) error
- func (c *ClientStartConfig) InstallRouter(out io.Writer) error
- func (c *ClientStartConfig) InstallServiceCatalog(out io.Writer) error
- func (c *ClientStartConfig) InstallTemplateServiceBroker(out io.Writer) error
- func (c *ClientStartConfig) InstallWebConsole(out io.Writer) error
- func (c *ClientStartConfig) Login(out io.Writer) error
- func (c *ClientStartConfig) RegisterTemplateServiceBroker(out io.Writer) error
- func (c *ClientStartConfig) RemoveTemporaryDirectory(out io.Writer) error
- func (c *ClientStartConfig) ServerInfo(out io.Writer) error
- func (c *ClientStartConfig) ShouldCreateUser() bool
- func (c *ClientStartConfig) ShouldInitializeData() bool
- func (c *ClientStartConfig) Start(out io.Writer) error
- func (c *ClientStartConfig) StartOpenShift(out io.Writer) error
- func (c *ClientStartConfig) Validate(out, errout io.Writer) error
- type ClientStatusConfig
- type ClientStopConfig
- type CommonStartConfig
- func (config *CommonStartConfig) Bind(flags *pflag.FlagSet)
- func (c *CommonStartConfig) CheckAvailablePorts(out io.Writer) error
- func (c *CommonStartConfig) CheckDockerInsecureRegistry(out io.Writer) error
- func (c *CommonStartConfig) CheckDockerVersion(out io.Writer) error
- func (c *CommonStartConfig) CheckExistingOpenShiftContainer(out io.Writer) error
- func (c *CommonStartConfig) CheckNsenterMounter(out io.Writer) error
- func (c *CommonStartConfig) CheckOpenShiftClient(out io.Writer) error
- func (c *CommonStartConfig) CheckOpenShiftImage(out io.Writer) error
- func (c *CommonStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
- func (c *CommonStartConfig) CreateDockerMachine(out io.Writer) error
- func (c *CommonStartConfig) DetermineServerIP(out io.Writer) error
- func (c *CommonStartConfig) DockerHelper() *dockerhelper.Helper
- func (c *CommonStartConfig) EnsureHostDirectories(io.Writer) error
- func (c *CommonStartConfig) GetDockerClient(out io.Writer) error
- func (c *CommonStartConfig) HostHelper() *host.HostHelper
- func (c *CommonStartConfig) OpenShiftHelper() *openshift.Helper
- func (c *CommonStartConfig) Start(out io.Writer) error
- func (c *CommonStartConfig) Validate(out io.Writer) error
- type TaskPrinter
Constants ¶
const CmdDownRecommendedName = "down"
const CmdJoinRecommendedName = "join"
CmdJoinRecommendedName is the recommended command name
const CmdStatusRecommendedName = "status"
CmdStatusRecommendedName is the recommended command name
const (
// CmdUpRecommendedName is the recommended command name
CmdUpRecommendedName = "up"
)
Variables ¶
This section is empty.
Functions ¶
func NewCmdDown ¶
NewCmdDown creates a command that stops OpenShift
func NewCmdJoin ¶
func NewCmdJoin(name, fullName string, f *osclientcmd.Factory, in io.Reader, out io.Writer) *cobra.Command
NewCmdJoin creates a command that joins an existing OpenShift cluster.
func NewCmdStatus ¶
NewCmdStatus implements the OpenShift cluster status command.
func PrintError ¶
Types ¶
type ClientJoinConfig ¶
type ClientJoinConfig struct { CommonStartConfig In io.Reader Secret string }
ClientJoinConfig is the configuration for the client join command
func (*ClientJoinConfig) Bind ¶
func (config *ClientJoinConfig) Bind(flags *pflag.FlagSet)
func (*ClientJoinConfig) Complete ¶
func (c *ClientJoinConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
Complete initializes fields based on command parameters and execution environment
func (*ClientJoinConfig) StartOpenShiftNode ¶
func (c *ClientJoinConfig) StartOpenShiftNode(out io.Writer) error
StartOpenShiftNode starts the OpenShift container as a node
type ClientStartConfig ¶
type ClientStartConfig struct {
CommonStartConfig
}
ClientStartConfig is the configuration for the client start command
func (*ClientStartConfig) Bind ¶
func (config *ClientStartConfig) Bind(flags *pflag.FlagSet)
func (*ClientStartConfig) CheckContainerNetworking ¶
func (c *ClientStartConfig) CheckContainerNetworking(out io.Writer) error
func (*ClientStartConfig) CheckServiceCatalogPrereqVersion ¶
func (c *ClientStartConfig) CheckServiceCatalogPrereqVersion(out io.Writer) error
CheckServiceCatalogPrereqVersion ensures the OpenShift server version is high enough to run the service catalog.
func (*ClientStartConfig) Clients ¶
func (c *ClientStartConfig) Clients() (interface{}, kclientset.Interface, error)
Clients returns clients for OpenShift and Kube FIXME: Refactor this to KubernetesInternal() call.
func (*ClientStartConfig) Complete ¶
func (c *ClientStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
Complete initializes fields based on command parameters and execution environment
func (*ClientStartConfig) CreateProject ¶
func (c *ClientStartConfig) CreateProject(out io.Writer) error
CreateProject creates a new project for the current user
func (*ClientStartConfig) EnsureDefaultRedirectURIs ¶
func (c *ClientStartConfig) EnsureDefaultRedirectURIs(out io.Writer) error
EnsureDefaultRedirectURIs merges a default URL to an auth client's RedirectURIs array
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) 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) ImportInternalTemplates ¶
func (c *ClientStartConfig) ImportInternalTemplates(out io.Writer) error
ImportInternalTemplates imports internal system templates into the server
func (*ClientStartConfig) ImportLoggingTemplates ¶
func (c *ClientStartConfig) ImportLoggingTemplates(out io.Writer) error
ImportLoggingTemplates imports service catalog templates into the server
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) InstallLogging ¶
func (c *ClientStartConfig) InstallLogging(out io.Writer) error
InstallLogging will start the installation of logging components
func (*ClientStartConfig) InstallMetrics ¶
func (c *ClientStartConfig) InstallMetrics(out io.Writer) error
InstallMetrics will start the installation of Metrics components
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) InstallServiceCatalog ¶
func (c *ClientStartConfig) InstallServiceCatalog(out io.Writer) error
InstallServiceCatalog will start the installation of service catalog components
func (*ClientStartConfig) InstallTemplateServiceBroker ¶
func (c *ClientStartConfig) InstallTemplateServiceBroker(out io.Writer) error
InstallTemplateServiceBroker will start the installation of template service broker
func (*ClientStartConfig) InstallWebConsole ¶
func (c *ClientStartConfig) InstallWebConsole(out io.Writer) error
InstallWebConsole installs the OpenShift web console 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) RegisterTemplateServiceBroker ¶
func (c *ClientStartConfig) RegisterTemplateServiceBroker(out io.Writer) error
RegisterTemplateServiceBroker will register the tsb with the service catalog
func (*ClientStartConfig) RemoveTemporaryDirectory ¶
func (c *ClientStartConfig) RemoveTemporaryDirectory(out io.Writer) error
RemoveTemporaryDirectory removes the local configuration directory
func (*ClientStartConfig) ServerInfo ¶
func (c *ClientStartConfig) ServerInfo(out io.Writer) error
ServerInfo displays server information after a successful start
func (*ClientStartConfig) ShouldCreateUser ¶
func (c *ClientStartConfig) ShouldCreateUser() bool
ShouldCreateUser 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.
func (*ClientStartConfig) ShouldInitializeData ¶
func (c *ClientStartConfig) ShouldInitializeData() bool
ShouldInitializeData 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.
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 ClientStatusConfig ¶
type ClientStatusConfig struct {
DockerMachine string
}
ClientStatusConfig is the configuration for the client status command
type ClientStopConfig ¶
type ClientStopConfig struct {
DockerMachine string
}
type CommonStartConfig ¶
type CommonStartConfig struct { ImageVersion string Image string ImageStreams string DockerMachine string ShouldCreateDockerMachine bool SkipRegistryCheck bool ShouldInstallMetrics bool ShouldInstallLogging bool ShouldInstallServiceCatalog bool PortForwarding bool Out io.Writer Tasks []task HostName string LocalConfigDir string UseExistingConfig bool Environment []string ServerLogLevel int HostVolumesDir string HostConfigDir string HostDataDir string UsePorts []int DNSPort int ServerIP string AdditionalIPs []string UseNsenterMount bool PublicHostname string RoutingSuffix string HostPersistentVolumesDir string HTTPProxy string HTTPSProxy string NoProxy []string CACert string PVCount int // contains filtered or unexported fields }
func (*CommonStartConfig) Bind ¶
func (config *CommonStartConfig) Bind(flags *pflag.FlagSet)
func (*CommonStartConfig) CheckAvailablePorts ¶
func (c *CommonStartConfig) CheckAvailablePorts(out io.Writer) error
CheckAvailablePorts ensures that ports used by OpenShift are available on the Docker host
func (*CommonStartConfig) CheckDockerInsecureRegistry ¶
func (c *CommonStartConfig) CheckDockerInsecureRegistry(out io.Writer) error
CheckDockerInsecureRegistry checks to see if the Docker daemon has an appropriate insecure registry argument set so that our services can access the registry
func (*CommonStartConfig) CheckDockerVersion ¶
func (c *CommonStartConfig) CheckDockerVersion(out 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 (*CommonStartConfig) CheckExistingOpenShiftContainer ¶
func (c *CommonStartConfig) 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 (*CommonStartConfig) CheckNsenterMounter ¶
func (c *CommonStartConfig) 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 (*CommonStartConfig) CheckOpenShiftClient ¶
func (c *CommonStartConfig) CheckOpenShiftClient(out io.Writer) error
CheckOpenShiftClient ensures that the client can be configured for the new server
func (*CommonStartConfig) CheckOpenShiftImage ¶
func (c *CommonStartConfig) CheckOpenShiftImage(out io.Writer) error
CheckOpenShiftImage checks whether the OpenShift image exists. If not it tells the Docker daemon to pull it.
func (*CommonStartConfig) Complete ¶
func (c *CommonStartConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command) error
func (*CommonStartConfig) CreateDockerMachine ¶
func (c *CommonStartConfig) CreateDockerMachine(out io.Writer) error
CreateDockerMachine will create a new Docker machine to run OpenShift
func (*CommonStartConfig) DetermineServerIP ¶
func (c *CommonStartConfig) DetermineServerIP(out io.Writer) error
DetermineServerIP gets an appropriate IP address to communicate with the OpenShift server
func (*CommonStartConfig) DockerHelper ¶
func (c *CommonStartConfig) DockerHelper() *dockerhelper.Helper
DockerHelper returns a helper object to work with the Docker client
func (*CommonStartConfig) EnsureHostDirectories ¶
func (c *CommonStartConfig) EnsureHostDirectories(io.Writer) error
func (*CommonStartConfig) GetDockerClient ¶
func (c *CommonStartConfig) GetDockerClient(out io.Writer) error
GetDockerClient obtains a new Docker client from the environment or from a Docker machine, starting it if necessary
func (*CommonStartConfig) HostHelper ¶
func (c *CommonStartConfig) HostHelper() *host.HostHelper
HostHelper returns a helper object to check Host configuration
func (*CommonStartConfig) OpenShiftHelper ¶
func (c *CommonStartConfig) OpenShiftHelper() *openshift.Helper
OpenShiftHelper returns a helper object to work with OpenShift on the server
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 Create an ExecHelper with NewExecHelper and then create new exec commands with Command()
|
Package exec contains a utility to Docker exec into a running a container Create an ExecHelper with NewExecHelper and then create new exec commands with Command() |
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 Create a RunHelper with NewRunHelper and then create new run instances with New()
|
Package runner contains a utility to run Docker containers Create a RunHelper with NewRunHelper and then create new run instances with New() |