{"modulePath":"github.com/2lambda123/openshift-origin","version":"v3.8.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package openshift\n\n## Constants\n\n```go\nconst (\n\tDefaultNamespace  = \"default\"\n\tSvcDockerRegistry = \"docker-registry\"\n\tSvcRouter         = \"router\"\n\n\tRegistryServiceIP = \"172.30.1.1\"\n)\n```\n\n```go\nconst (\n\tDefaultDNSPort   = 53\n\tAlternateDNSPort = 8053\n\n\tOpenShiftContainer      = \"origin\"\n\tOpenshiftNamespace      = \"openshift\"\n\tOpenshiftInfraNamespace = \"openshift-infra\"\n)\n```\n\n```go\nconst (\n\tClusterServiceBrokerAdminRoleName = \"system:openshift:clusterservicebroker-client\"\n)\n```\nRoles\n\n```go\nconst (\n\tServiceCatalogServiceIP = \"172.30.1.2\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tBasePorts             = []int{4001, 7001, 8443, 10250}\n\tRouterPorts           = []int{80, 443}\n\tDefaultPorts          = append(BasePorts, DefaultDNSPort)\n\tPortsWithAlternateDNS = append(BasePorts, AlternateDNSPort)\n\tAllPorts              = append(append(RouterPorts, DefaultPorts...), AlternateDNSPort)\n\tSocatPidFile          = filepath.Join(homedir.HomeDir(), clientconfig.OpenShiftConfigHomeDir, \"socat-8443.pid\")\n)\n```\n\n## Functions\n\n```go\nfunc AddClusterRole(authorizationClient authorizationtypedclient.ClusterRoleBindingsGetter, role, user string) error\n```\n\n```go\nfunc AddRoleToServiceAccount(authorizationClient authorizationtypedclient.RoleBindingsGetter, role, sa, namespace string) error\n```\n\n```go\nfunc AddSCCToServiceAccount(securityClient securitytypedclient.SecurityContextConstraintsGetter, scc, sa, namespace string, out io.Writer) error\n```\n\n```go\nfunc CatalogHost(routingSuffix, serverIP string) string\n```\n\n```go\nfunc CheckSocat() error\n```\n\n```go\nfunc CreateProject(f *clientcmd.Factory, name, display, desc, basecmd string, out io.Writer) error\n```\nCreateProject creates a project\n\n```go\nfunc ErrOpenShiftFailedToStart(container string) errors.Error\n```\nErrOpenShiftFailedToStart is thrown when the OpenShift server failed to start\n\n```go\nfunc ErrPortsNotAvailable(ports []int) error\n```\n\n```go\nfunc ErrSocatNotFound() errors.Error\n```\n\n```go\nfunc ErrTimedOutWaitingForStart(container string) errors.Error\n```\nErrTimedOutWaitingForStart is thrown when the OpenShift server can't be pinged after reasonable amount of time.\n\n```go\nfunc GetConfigFromContainer(client dockerhelper.Interface) (*configapi.MasterConfig, error)\n```\n\n```go\nfunc GetServiceCatalogRBACDelta() []rbac.ClusterRole\n```\nGetServiceCatalogRBACDelta returns a cluster role with the required rules to bootstrap service catalog\n\n```go\nfunc ImportObjects(f *clientcmd.Factory, ns, location string) error\n```\nImportObjects imports objects into OpenShift from a particular location into a given namespace\n\n```go\nfunc IsPortsNotAvailableErr(err error) bool\n```\n\n```go\nfunc KillExistingSocat() error\n```\n\n```go\nfunc LoggedInUserFactory() (*clientcmd.Factory, error)\n```\n\n```go\nfunc LoggingHost(routingSuffix, serverIP string) string\n```\n\n```go\nfunc Login(username, password, server, configDir string, f *clientcmd.Factory, c *cobra.Command, out, errOut io.Writer) error\n```\nLogin logs into the specified server using given credentials and CA file\n\n```go\nfunc MetricsHost(routingSuffix, serverIP string) string\n```\n\n```go\nfunc SaveSocatPid(pid int) error\n```\n\n```go\nfunc UnavailablePorts(err error) []int\n```\n\n## Types\n\n```go\ntype Helper struct {\n\t// contains filtered or unexported fields\n}\n```\nHelper contains methods and utilities to help with OpenShift startup\n\n```go\nfunc NewHelper(dockerHelper *dockerhelper.Helper, hostHelper *host.HostHelper, image, containerName, publicHostname, routingSuffix string) *Helper\n```\nNewHelper creates a new OpenShift helper\n\n```go\nfunc (h *Helper) CheckNodes(kclient kclientset.Interface) error\n```\nCheckNodes determines if there is more than one node that corresponds to the current machine and removes the one that doesn't match the default node name\n\n```go\nfunc (h *Helper) DetermineNodeHost(hostConfigDir string, names ...string) (string, error)\n```\n\n```go\nfunc (h *Helper) GetConfigFromLocalDir(configDir string) (*configapi.MasterConfig, string, error)\n```\n\n```go\nfunc (h *Helper) GetNodeConfigFromLocalDir(configDir string) (*configapi.NodeConfig, string, error)\n```\n\n```go\nfunc (h *Helper) InstallLogging(f *clientcmd.Factory, publicHostname, loggerHost, imagePrefix, imageVersion string) error\n```\nInstallLogging checks whether logging is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) InstallLoggingViaAnsible(f *clientcmd.Factory, serverIP, publicHostname, loggerHost, imagePrefix, imageVersion, hostConfigDir, imageStreams string) error\n```\nInstallLoggingViaAnsible checks whether logging is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) InstallMetrics(f *clientcmd.Factory, hostName, imagePrefix, imageVersion string) error\n```\nInstallMetrics checks whether metrics is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) InstallMetricsViaAnsible(f *clientcmd.Factory, serverIP, publicHostname, hostName, imagePrefix, imageVersion, hostConfigDir, imageStreams string) error\n```\nInstallMetricsViaAnsible checks whether metrics is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) InstallRegistry(kubeClient kclientset.Interface, f *clientcmd.Factory, configDir, images, pvDir string, out, errout io.Writer) error\n```\nInstallRegistry checks whether a registry is installed and installs one if not already installed\n\n```go\nfunc (h *Helper) InstallRouter(kubeClient kclientset.Interface, f *clientcmd.Factory, configDir, images, hostIP string, portForwarding bool, out, errout io.Writer) error\n```\nInstallRouter installs a default router on the OpenShift server\n\n```go\nfunc (h *Helper) InstallServiceCatalog(f *clientcmd.Factory, configDir, publicMaster, catalogHost string, imageFormat string) error\n```\nInstallServiceCatalog checks whether the service catalog is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) InstallTemplateServiceBroker(f *clientcmd.Factory, imageFormat string, serverLogLevel int) error\n```\nInstallTemplateServiceBroker checks whether the template service broker is installed and installs it if not already installed\n\n```go\nfunc (h *Helper) Master(ip string) string\n```\n\n```go\nfunc (h *Helper) OriginLog() string\n```\n\n```go\nfunc (h *Helper) OtherIPs(excludeIP string) ([]string, error)\n```\nOtherIPs tries to find other IPs besides the argument IP for the Docker host\n\n```go\nfunc (h *Helper) RegisterTemplateServiceBroker(f *clientcmd.Factory, configDir string) error\n```\nRegisterTemplateServiceBroker registers the TSB with the SC by creating the broker resource\n\n```go\nfunc (h *Helper) ServerIP() (string, error)\n```\nServerIP retrieves the Server ip through the openshift start command\n\n```go\nfunc (h *Helper) ServerPrereleaseVersion() (semver.Version, error)\n```\n\n```go\nfunc (h *Helper) ServerVersion() (semver.Version, error)\n```\n\n```go\nfunc (h *Helper) SetupPersistentStorage(authorizationClient authorizationtypedclient.ClusterRoleBindingsGetter, kclient kclientset.Interface, securityClient securityclient.Interface, dir, HostPersistentVolumesDir string) error\n```\nSetupPersistentStorage sets up persistent storage\n\n```go\nfunc (h *Helper) Start(opt *StartOptions, out io.Writer) (string, error)\n```\nStart starts the OpenShift master as a Docker container and returns a directory in the local file system where the OpenShift configuration has been copied\n\n```go\nfunc (h *Helper) StartNode(opt *StartOptions, out io.Writer) error\n```\nStartNode starts the OpenShift node as a Docker container and returns a directory in the local file system where the OpenShift configuration has been copied\n\n```go\nfunc (h *Helper) TestContainerNetworking(ip string) error\n```\nTestContainerNetworking launches a container that will check whether the container can communicate with the master API and DNS endpoints.\n\n```go\nfunc (h *Helper) TestForwardedIP(ip string) error\n```\n\n```go\nfunc (h *Helper) TestIP(ip string) error\n```\n\n```go\nfunc (h *Helper) TestPorts(ports []int) error\n```\n\n```go\ntype StartOptions struct {\n\tServerIP                 string\n\tAdditionalIPs            []string\n\tRoutingSuffix            string\n\tDNSPort                  int\n\tUseSharedVolume          bool\n\tImages                   string\n\tHostVolumesDir           string\n\tHostConfigDir            string\n\tHostDataDir              string\n\tHostPersistentVolumesDir string\n\tUseExistingConfig        bool\n\tEnvironment              []string\n\tLogLevel                 int\n\tMetricsHost              string\n\tLoggingHost              string\n\tPortForwarding           bool\n\tHTTPProxy                string\n\tHTTPSProxy               string\n\tNoProxy                  []string\n\tKubeconfigContents       string\n\tDockerRoot               string\n\tServiceCatalog           bool\n}\n```\nStartOptions represent the parameters sent to the start command\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oc/bootstrap/docker/openshift","name":"openshift","synopsis":"","isRedistributable":true}
