Exemplo n.º 1
0
// ServerInfo displays server information after a successful start
func (c *ClientStartConfig) ServerInfo(out io.Writer) error {
	metricsInfo := ""
	if c.ShouldInstallMetrics && c.ShouldInitializeData() {
		metricsInfo = fmt.Sprintf("The metrics service is available at:\n"+
			"    https://%s\n\n", openshift.MetricsHost(c.RoutingSuffix, c.ServerIP))
	}
	loggingInfo := ""
	if c.ShouldInstallLogging && c.ShouldInitializeData() {
		loggingInfo = fmt.Sprintf("The kibana logging UI is available at:\n"+
			"    https://%s\n\n", openshift.LoggingHost(c.RoutingSuffix, c.ServerIP))
	}
	msg := fmt.Sprintf("OpenShift server started.\n"+
		"The server is accessible via web console at:\n"+
		"    %s\n\n%s%s", c.OpenShiftHelper().Master(c.ServerIP), metricsInfo, loggingInfo)

	if c.ShouldCreateUser() {
		msg += fmt.Sprintf("You are logged in as:\n"+
			"    User:     %s\n"+
			"    Password: %s\n\n", initialUser, initialPassword)
	}

	msg += "To login as administrator:\n" +
		"    oc login -u system:admin\n\n"

	fmt.Fprintf(out, msg)
	return nil
}
Exemplo n.º 2
0
Arquivo: up.go Projeto: bmeng/origin
func (c *ClientStartConfig) InstallMetrics(out io.Writer) error {
	f, err := c.Factory()
	if err != nil {
		return err
	}
	return c.OpenShiftHelper().InstallMetrics(f, openshift.MetricsHost(c.RoutingSuffix, c.ServerIP), c.Image, c.ImageVersion)
}
Exemplo n.º 3
0
// StartOpenShift starts the OpenShift container
func (c *ClientStartConfig) StartOpenShift(out io.Writer) error {
	var err error
	opt := &openshift.StartOptions{
		ServerIP:           c.ServerIP,
		RouterIP:           c.RouterIP,
		UseSharedVolume:    !c.UseNsenterMount,
		SetPropagationMode: c.SetPropagationMode,
		Images:             c.imageFormat(),
		HostVolumesDir:     c.HostVolumesDir,
		HostConfigDir:      c.HostConfigDir,
		HostDataDir:        c.HostDataDir,
		UseExistingConfig:  c.UseExistingConfig,
		Environment:        c.Environment,
		LogLevel:           c.ServerLogLevel,
		DNSPort:            c.DNSPort,
		PortForwarding:     c.PortForwarding,
	}
	if c.ShouldInstallMetrics {
		opt.MetricsHost = openshift.MetricsHost(c.RoutingSuffix, c.ServerIP)
	}
	if c.ShouldInstallLogging {
		opt.LoggingHost = openshift.LoggingHost(c.RoutingSuffix, c.ServerIP)
	}
	c.LocalConfigDir, err = c.OpenShiftHelper().Start(opt, out)
	return err
}
Exemplo n.º 4
0
Arquivo: up.go Projeto: bmeng/origin
// ServerInfo displays server information after a successful start
func (c *ClientStartConfig) ServerInfo(out io.Writer) error {
	metricsInfo := ""
	if c.ShouldInstallMetrics {
		metricsInfo = fmt.Sprintf("The metrics service is available at:\n"+
			"    https://%s\n\n", openshift.MetricsHost(c.RoutingSuffix, c.ServerIP))
	}
	fmt.Fprintf(out, "OpenShift server started.\n"+
		"The server is accessible via web console at:\n"+
		"    %s\n\n%s"+
		"You are logged in as:\n"+
		"    User:     %s\n"+
		"    Password: %s\n\n"+
		"To login as administrator:\n"+
		"    oc login -u system:admin\n\n",
		c.OpenShiftHelper().Master(c.ServerIP),
		metricsInfo,
		initialUser,
		initialPassword)
	return nil
}