installconfig

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package installconfig generates the install config assets based on its dependencies. The type itself is defined in ../pkg/types.

Index

Constants

View Source
const (
	// AWSPlatformType is used to install on AWS.
	AWSPlatformType = "aws"
	// OpenStackPlatformType is used to install on OpenStack.
	OpenStackPlatformType = "openstack"
	// LibvirtPlatformType is used to install of libvirt.
	LibvirtPlatformType = "libvirt"
)

Variables

This section is empty.

Functions

func ClusterDNSIP

func ClusterDNSIP(installConfig *types.InstallConfig) (string, error)

ClusterDNSIP returns the string representation of the DNS server's IP address.

func GetInstallConfig

func GetInstallConfig(installConfig asset.Asset, parents map[asset.Asset]*asset.State) (*types.InstallConfig, error)

GetInstallConfig returns the *types.InstallConfig from the parent asset map.

Types

type Platform

type Platform struct{}

Platform is an asset that queries the user for the platform on which to install the cluster.

Contents[0] is the type of the platform.

* AWS Contents[1] is the region.

* Libvirt Contents[1] is the URI.

func (*Platform) Dependencies

func (a *Platform) Dependencies() []asset.Asset

Dependencies returns no dependencies.

func (*Platform) Generate

func (a *Platform) Generate(map[asset.Asset]*asset.State) (*asset.State, error)

Generate queries for input from the user.

func (*Platform) Name

func (a *Platform) Name() string

Name returns the human-friendly name of the asset.

type Stock

type Stock interface {
	// InstallConfig is the asset that generates install-config.yml.
	InstallConfig() asset.Asset
	// ClusterID is the asset that generates a UUID for the cluster.
	ClusterID() asset.Asset
	// EmailAddress is the asset that queries the user for the admin email address.
	EmailAddress() asset.Asset
	// Password is the asset that queries the user for the admin password.
	Password() asset.Asset
	// SSHKey is the asset that queries the user for the ssh public key in a string format.
	SSHKey() asset.Asset
	// BaseDomain is the asset that queries the user for the base domain to use
	// for the cluster.
	BaseDomain() asset.Asset
	// ClusterName is the asset that queries the user for the name of the cluster.
	ClusterName() asset.Asset
	// PullSecret is the asset that queries the user for the pull secret.
	PullSecret() asset.Asset
	// Platform is the asset that queries the user for the platform on which
	// to create the cluster.
	Platform() asset.Asset
}

Stock is the stock of InstallConfig assets that can be generated.

type StockImpl

type StockImpl struct {
	// contains filtered or unexported fields
}

StockImpl implements the Stock interface for installconfig and user inputs.

func (*StockImpl) BaseDomain

func (s *StockImpl) BaseDomain() asset.Asset

BaseDomain is the asset that queries the user for the base domain to use for the cluster.

func (*StockImpl) ClusterID

func (s *StockImpl) ClusterID() asset.Asset

ClusterID is the asset that generates a UUID for the cluster.

func (*StockImpl) ClusterName

func (s *StockImpl) ClusterName() asset.Asset

ClusterName is the asset that queries the user for the name of the cluster.

func (*StockImpl) EmailAddress

func (s *StockImpl) EmailAddress() asset.Asset

EmailAddress is the asset that queries the user for the admin email address.

func (*StockImpl) EstablishStock

func (s *StockImpl) EstablishStock()

EstablishStock establishes the stock of assets.

func (*StockImpl) InstallConfig

func (s *StockImpl) InstallConfig() asset.Asset

InstallConfig is the asset that generates install-config.yml.

func (*StockImpl) Password

func (s *StockImpl) Password() asset.Asset

Password is the asset that queries the user for the admin password.

func (*StockImpl) Platform

func (s *StockImpl) Platform() asset.Asset

Platform is the asset that queries the user for the platform on which to create the cluster.

func (*StockImpl) PullSecret

func (s *StockImpl) PullSecret() asset.Asset

PullSecret is the asset that queries the user for the pull secret.

func (*StockImpl) SSHKey

func (s *StockImpl) SSHKey() asset.Asset

SSHKey is the asset that queries the user for the ssh public key in a string format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL