infrastructure

package
v0.0.0-...-8605621 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAwsInfrastructure

func NewAwsInfrastructure(
	metadataService MetadataService,
	registry Registry,
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
	logger boshlog.Logger,
) awsInfrastructure

func NewAwsMetadataServiceProvider

func NewAwsMetadataServiceProvider(resolver DNSResolver) awsMetadataServiceProvider

func NewAzureFileMetadataService

func NewAzureFileMetadataService(
	resolver DNSResolver,
	fs boshsys.FileSystem,
	walaLibPath string,
	logger boshlog.Logger,
) azureFileMetadataService

func NewAzureInfrastructure

func NewAzureInfrastructure(
	metadataService MetadataService,
	registry Registry,
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
	logger boshlog.Logger,
) azureInfrastructure

func NewAzureMetadataServiceProvider

func NewAzureMetadataServiceProvider(
	resolver DNSResolver,
	platform boshplatform.Platform,
	walaLibPath string,
	logger boshlog.Logger,
) azureMetadataServiceProvider

func NewConfigDriveMetadataService

func NewConfigDriveMetadataService(
	resolver DNSResolver,
	platform boshplatform.Platform,
	diskPaths []string,
	metadataFilePath string,
	userdataFilePath string,
	logger boshlog.Logger,
) *configDriveMetadataService

func NewDummyInfrastructure

func NewDummyInfrastructure(
	fs boshsys.FileSystem,
	dirProvider boshdir.Provider,
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
) (inf dummyInfrastructure)

func NewFileMetadataService

func NewFileMetadataService(
	userDataFilePath string,
	metadataFilePath string,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) fileMetadataService

func NewHTTPMetadataService

func NewHTTPMetadataService(
	metadataHost string,
	resolver DNSResolver,
) httpMetadataService

func NewHTTPRegistry

func NewHTTPRegistry(
	metadataService MetadataService,
	useServerNameAsID bool,
) httpRegistry

func NewOpenstackInfrastructure

func NewOpenstackInfrastructure(
	metadataService MetadataService,
	registry Registry,
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
	logger boshlog.Logger,
) openstackInfrastructure

func NewOpenstackMetadataServiceProvider

func NewOpenstackMetadataServiceProvider(
	resolver DNSResolver,
	platform boshplatform.Platform,
	options MetadataServiceOptions,
	logger boshlog.Logger,
) openstackServiceProvider

func NewRegistryEndpointResolver

func NewRegistryEndpointResolver(resolver DNSResolver) registryEndpointResolver

func NewVsphereInfrastructure

func NewVsphereInfrastructure(
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
	logger boshlog.Logger,
) (inf vsphereInfrastructure)

func NewWardenInfrastructure

func NewWardenInfrastructure(
	platform boshplatform.Platform,
	devicePathResolver boshdpresolv.DevicePathResolver,
	registryProvider RegistryProvider,
) wardenInfrastructure

Types

type DNSResolver

type DNSResolver interface {
	LookupHost(dnsServers []string, endpoint string) (string, error)
}

type DigDNSResolver

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

func NewDigDNSResolver

func NewDigDNSResolver(runner boshsys.CmdRunner, logger boshlog.Logger) DigDNSResolver

func (DigDNSResolver) LookupHost

func (res DigDNSResolver) LookupHost(dnsServers []string, host string) (string, error)

type Infrastructure

type Infrastructure interface {
	SetupSSH(username string) (err error)
	GetSettings() (settings boshsettings.Settings, err error)
	SetupNetworking(networks boshsettings.Networks) (err error)
	GetEphemeralDiskPath(diskSettings boshsettings.DiskSettings) string
	GetDevicePathResolver() (devicePathResolver boshdpresolv.DevicePathResolver)
}

type MetadataContentsType

type MetadataContentsType struct {
	PublicKeys map[string]PublicKeyType `json:"public-keys"`
	InstanceID string                   `json:"instance-id"`
}

type MetadataService

type MetadataService interface {
	IsAvailable() bool
	GetPublicKey() (string, error)
	GetInstanceID() (string, error)
	GetServerName() (string, error)
	GetRegistryEndpoint() (string, error)
}

func NewMultiSourceMetadataService

func NewMultiSourceMetadataService(services ...MetadataService) MetadataService

type MetadataServiceOptions

type MetadataServiceOptions struct {
	UseConfigDrive bool
}

type MetadataServiceProvider

type MetadataServiceProvider interface {
	Get() MetadataService
}

type MultiSourceMetadataService

type MultiSourceMetadataService struct {
	Services []MetadataService
	// contains filtered or unexported fields
}

func (*MultiSourceMetadataService) GetInstanceID

func (ms *MultiSourceMetadataService) GetInstanceID() (string, error)

func (*MultiSourceMetadataService) GetPublicKey

func (ms *MultiSourceMetadataService) GetPublicKey() (string, error)

func (*MultiSourceMetadataService) GetRegistryEndpoint

func (ms *MultiSourceMetadataService) GetRegistryEndpoint() (string, error)

func (*MultiSourceMetadataService) GetServerName

func (ms *MultiSourceMetadataService) GetServerName() (string, error)

func (*MultiSourceMetadataService) IsAvailable

func (ms *MultiSourceMetadataService) IsAvailable() bool

type Provider

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

func NewProvider

func NewProvider(logger boshlog.Logger, platform boshplatform.Platform, options ProviderOptions) (p Provider)

func (Provider) Get

func (p Provider) Get(name string) (Infrastructure, error)

type ProviderOptions

type ProviderOptions struct {
	MetadataService MetadataServiceOptions
}

type PublicKeyType

type PublicKeyType map[string]string

type Registry

type Registry interface {
	GetSettings() (boshsettings.Settings, error)
}

func NewAwsRegistry

func NewAwsRegistry(metadataService MetadataService) Registry

func NewAzureRegistry

func NewAzureRegistry(metadataService MetadataService) Registry

func NewFileRegistry

func NewFileRegistry(registryFilePath string, fs boshsys.FileSystem) Registry

func NewOpenstackRegistry

func NewOpenstackRegistry(metadataService MetadataService) Registry

type RegistryProvider

type RegistryProvider interface {
	GetRegistry() Registry
}

func NewRegistryProvider

func NewRegistryProvider(
	metadataService MetadataService,
	fallbackFileRegistryPath string,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) RegistryProvider

type UserDataContentsType

type UserDataContentsType struct {
	Registry struct {
		Endpoint string
	}
	Server struct {
		Name string // Name given by CPI e.g. vm-384sd4-r7re9e...
	}
	DNS struct {
		Nameserver []string
	}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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