manifests

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const MBUS_PASSWORD_PREFIX = "mbus-"
View Source
const MBUS_USERNAME_PREFIX = "mbus-user-"
View Source
const PASSWORD_LENGTH = 15

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSProperties

type AWSProperties struct {
	AccessKeyId           string   `yaml:"access_key_id"`
	SecretAccessKey       string   `yaml:"secret_access_key"`
	DefaultKeyName        string   `yaml:"default_key_name"`
	DefaultSecurityGroups []string `yaml:"default_security_groups"`
	Region                string   `yaml:"region"`
}

type AgentProperties

type AgentProperties struct {
	MBus string `yaml:"mbus"`
}

type BlobstoreJobProperties

type BlobstoreJobProperties struct {
	Address  string      `yaml:"address"`
	Director Credentials `yaml:"director"`
	Agent    Credentials `yaml:"agent"`
}

type BlobstoreProperties

type BlobstoreProperties struct {
	Provider string `yaml:"provider"`
	Path     string `yaml:"path"`
}

type CloudProvider

type CloudProvider struct {
	Template   Template                `yaml:"template"`
	SSHTunnel  SSHTunnel               `yaml:"ssh_tunnel"`
	MBus       string                  `yaml:"mbus"`
	Properties CloudProviderProperties `yaml:"properties"`
}

type CloudProviderManifestBuilder

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

func NewCloudProviderManifestBuilder

func NewCloudProviderManifestBuilder(stringGenerator stringGenerator) CloudProviderManifestBuilder

func (CloudProviderManifestBuilder) Build

type CloudProviderProperties

type CloudProviderProperties struct {
	AWS       AWSProperties       `yaml:"aws,omitempty"`
	Google    GoogleProperties    `yaml:"google,omitempty"`
	Agent     AgentProperties     `yaml:"agent"`
	Blobstore BlobstoreProperties `yaml:"blobstore"`
}

type Credentials

type Credentials struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type DefaultSSHOptions added in v1.2.0

type DefaultSSHOptions struct {
	GatewayHost string `yaml:"gateway_host"`
}

type DirectorJobProperties

type DirectorJobProperties struct {
	Address                     string                   `yaml:"address"`
	Name                        string                   `yaml:"name"`
	CPIJob                      string                   `yaml:"cpi_job"`
	Workers                     int                      `yaml:"workers"`
	EnableDedicatedStatusWorker bool                     `yaml:"enable_dedicated_status_worker"`
	EnablePostDeploy            bool                     `yaml:"enable_post_deploy"`
	DB                          PostgresProperties       `yaml:"db"`
	UserManagement              UserManagementProperties `yaml:"user_management"`
	SSL                         SSLProperties            `yaml:"ssl"`
	DefaultSSHOptions           DefaultSSHOptions        `yaml:"default_ssh_options"`
}

type DiskPool

type DiskPool struct {
	Name            string                   `yaml:"name"`
	DiskSize        int                      `yaml:"disk_size"`
	CloudProperties DiskPoolsCloudProperties `yaml:"cloud_properties"`
}

type DiskPoolsCloudProperties

type DiskPoolsCloudProperties struct {
	Type      string `yaml:"type"`
	Encrypted bool   `yaml:"encrypted,omitempty"`
}

type DiskPoolsManifestBuilder

type DiskPoolsManifestBuilder struct{}

func NewDiskPoolsManifestBuilder

func NewDiskPoolsManifestBuilder() DiskPoolsManifestBuilder

func (DiskPoolsManifestBuilder) Build

func (r DiskPoolsManifestBuilder) Build(iaas string) []DiskPool

type EphemeralDisk

type EphemeralDisk struct {
	Size int    `yaml:"size"`
	Type string `yaml:"type"`
}

type GoogleProperties

type GoogleProperties struct {
	Project string `yaml:"project"`
	JsonKey string `yaml:"json_key"`
}

type HMJobProperties

type HMJobProperties struct {
	DirectorAccount    Credentials `yaml:"director_account"`
	ResurrectorEnabled bool        `yaml:"resurrector_enabled"`
}

type HTTPProperties

type HTTPProperties struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type InternalCredentials

type InternalCredentials struct {
	MBusUsername              string `json:"mbusUsername"`
	NatsUsername              string `json:"natsUsername"`
	PostgresUsername          string `json:"postgresUsername"`
	RegistryUsername          string `json:"registryUsername"`
	BlobstoreDirectorUsername string `json:"blobstoreDirectorUsername"`
	BlobstoreAgentUsername    string `json:"blobstoreAgentUsername"`
	HMUsername                string `json:"hmUsername"`
	MBusPassword              string `json:"mbusPassword"`
	NatsPassword              string `json:"natsPassword"`
	PostgresPassword          string `json:"postgresPassword"`
	RegistryPassword          string `json:"registryPassword"`
	BlobstoreDirectorPassword string `json:"blobstoreDirectorPassword"`
	BlobstoreAgentPassword    string `json:"blobstoreAgentPassword"`
	HMPassword                string `json:"hmPassword"`
}

func NewInternalCredentials

func NewInternalCredentials(credentials map[string]string) InternalCredentials

func (InternalCredentials) ToMap

func (c InternalCredentials) ToMap() map[string]string

type Job

type Job struct {
	Name               string        `yaml:"name"`
	Instances          int           `yaml:"instances"`
	ResourcePool       string        `yaml:"resource_pool"`
	PersistentDiskPool string        `yaml:"persistent_disk_pool"`
	Templates          []Template    `yaml:"templates"`
	Networks           []JobNetwork  `yaml:"networks"`
	Properties         JobProperties `yaml:"properties"`
}

type JobNetwork

type JobNetwork struct {
	Name      string   `yaml:"name"`
	StaticIPs []string `yaml:"static_ips"`
	Default   []string `yaml:"default,omitempty"`
}

type JobProperties

type JobProperties struct {
	NATS      NATSJobProperties      `yaml:"nats"`
	Postgres  PostgresProperties     `yaml:"postgres"`
	Registry  RegistryJobProperties  `yaml:"registry"`
	Blobstore BlobstoreJobProperties `yaml:"blobstore"`
	Director  DirectorJobProperties  `yaml:"director"`
	HM        HMJobProperties        `yaml:"hm"`
	AWS       AWSProperties          `yaml:"aws,omitempty"`
	Agent     AgentProperties        `yaml:"agent"`
	Google    GoogleProperties       `yaml:"google,omitempty"`
}

type JobPropertiesManifestBuilder

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

func NewJobPropertiesManifestBuilder

func NewJobPropertiesManifestBuilder(natsUsername, postgresUsername, registryUsername, blobstoreDirectorUsername, blobstoreAgentUsername, hmUsername, natsPassword, postgresPassword, registryPassword, blobstoreDirectorPassword, blobstoreAgentPassword, hmPassword string) JobPropertiesManifestBuilder

func (JobPropertiesManifestBuilder) Agent

func (JobPropertiesManifestBuilder) Blobstore

func (JobPropertiesManifestBuilder) Director

func (j JobPropertiesManifestBuilder) Director(iaas string, manifestProperties ManifestProperties) DirectorJobProperties

func (JobPropertiesManifestBuilder) HM

func (JobPropertiesManifestBuilder) NATS

func (JobPropertiesManifestBuilder) Postgres

func (JobPropertiesManifestBuilder) Registry

type JobsManifestBuilder

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

func NewJobsManifestBuilder

func NewJobsManifestBuilder(stringGenerator stringGenerator) JobsManifestBuilder

func (JobsManifestBuilder) Build

func (j JobsManifestBuilder) Build(iaas string, manifestProperties ManifestProperties) ([]Job, ManifestProperties, error)

type LocalProperties

type LocalProperties struct {
	Users []UserProperties `yaml:"users"`
}

type Manifest

type Manifest struct {
	Name          string         `yaml:"name"`
	Releases      []Release      `yaml:"releases"`
	ResourcePools []ResourcePool `yaml:"resource_pools"`
	DiskPools     []DiskPool     `yaml:"disk_pools"`
	Networks      []Network      `yaml:"networks"`
	Jobs          []Job          `yaml:"jobs"`
	CloudProvider CloudProvider  `yaml:"cloud_provider"`
}

func (Manifest) DirectorSSLKeyPair

func (m Manifest) DirectorSSLKeyPair() ssl.KeyPair

type ManifestBuilder

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

func NewManifestBuilder

func NewManifestBuilder(input ManifestBuilderInput, logger logger, sslKeyPairGenerator sslKeyPairGenerator, stringGenerator stringGenerator, cloudProviderManifestBuilder cloudProviderManifestBuilder, jobsManifestBuilder jobsManifestBuilder) ManifestBuilder

func (ManifestBuilder) Build

func (m ManifestBuilder) Build(iaas string, manifestProperties ManifestProperties) (Manifest, ManifestProperties, error)

type ManifestBuilderInput added in v1.1.0

type ManifestBuilderInput struct {
	BOSHURL         string
	BOSHSHA1        string
	BOSHAWSCPIURL   string
	BOSHAWSCPISHA1  string
	BOSHGCPCPIURL   string
	BOSHGCPCPISHA1  string
	AWSStemcellURL  string
	AWSStemcellSHA1 string
	GCPStemcellURL  string
	GCPStemcellSHA1 string
}

type ManifestProperties

type ManifestProperties struct {
	DirectorName     string
	DirectorUsername string
	DirectorPassword string
	CACommonName     string
	ExternalIP       string
	SSLKeyPair       ssl.KeyPair
	Credentials      InternalCredentials
	AWS              ManifestPropertiesAWS
	GCP              ManifestPropertiesGCP
}

type ManifestPropertiesAWS

type ManifestPropertiesAWS struct {
	SubnetID         string
	AvailabilityZone string
	AccessKeyID      string
	SecretAccessKey  string
	Region           string
	SecurityGroup    string
	DefaultKeyName   string
}

type ManifestPropertiesGCP

type ManifestPropertiesGCP struct {
	Zone           string
	NetworkName    string
	SubnetworkName string
	BOSHTag        string
	InternalTag    string
	Project        string
	JsonKey        string
}

type NATSJobProperties

type NATSJobProperties struct {
	Address  string `yaml:"address"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type Network

type Network struct {
	Name    string   `yaml:"name"`
	Type    string   `yaml:"type"`
	Subnets []Subnet `yaml:"subnets,omitempty"`
}

type NetworksCloudProperties

type NetworksCloudProperties struct {
	Subnet              string   `yaml:"subnet,omitempty"`
	NetworkName         string   `yaml:"network_name,omitempty"`
	SubnetworkName      string   `yaml:"subnetwork_name,omitempty"`
	EphemeralExternalIP *bool    `yaml:"ephemeral_external_ip,omitempty"`
	Tags                []string `yaml:"tags,omitempty"`
}

type NetworksManifestBuilder

type NetworksManifestBuilder struct{}

func NewNetworksManifestBuilder

func NewNetworksManifestBuilder() NetworksManifestBuilder

func (NetworksManifestBuilder) Build

func (r NetworksManifestBuilder) Build(manifestProperties ManifestProperties) []Network

type PostgresProperties

type PostgresProperties struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type RegistryJobProperties

type RegistryJobProperties struct {
	Host     string                     `yaml:"host"`
	Address  string                     `yaml:"address"`
	Username string                     `yaml:"username"`
	Password string                     `yaml:"password"`
	DB       RegistryPostgresProperties `yaml:"db"`
	HTTP     HTTPProperties             `yaml:"http"`
}

type RegistryPostgresProperties

type RegistryPostgresProperties struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type Release

type Release struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
	SHA1 string `yaml:"sha1"`
}

type ReleaseManifestBuilder

type ReleaseManifestBuilder struct{}

func NewReleaseManifestBuilder

func NewReleaseManifestBuilder() ReleaseManifestBuilder

func (ReleaseManifestBuilder) Build

func (r ReleaseManifestBuilder) Build(boshURL, boshSHA1, boshCPIName, boshCPIURL, boshCPISHA1 string) []Release

type ResourcePool

type ResourcePool struct {
	Name            string                      `yaml:"name"`
	Network         string                      `yaml:"network"`
	Stemcell        Stemcell                    `yaml:"stemcell"`
	CloudProperties ResourcePoolCloudProperties `yaml:"cloud_properties"`
}

type ResourcePoolCloudProperties

type ResourcePoolCloudProperties struct {
	InstanceType     string        `yaml:"instance_type,omitempty"`
	EphemeralDisk    EphemeralDisk `yaml:"ephemeral_disk,omitempty"`
	AvailabilityZone string        `yaml:"availability_zone,omitempty"`

	Zone           string   `yaml:"zone,omitempty"`
	MachineType    string   `yaml:"machine_type,omitempty"`
	RootDiskSizeGB int      `yaml:"root_disk_size_gb,omitempty"`
	RootDiskType   string   `yaml:"root_disk_type,omitempty"`
	ServiceScopes  []string `yaml:"service_scopes,omitempty"`
}

type ResourcePoolsManifestBuilder

type ResourcePoolsManifestBuilder struct{}

func NewResourcePoolsManifestBuilder

func NewResourcePoolsManifestBuilder() ResourcePoolsManifestBuilder

func (ResourcePoolsManifestBuilder) Build

func (r ResourcePoolsManifestBuilder) Build(iaas string, manifestProperties ManifestProperties, stemcellURL string, stemcellSHA1 string) []ResourcePool

type SSHTunnel

type SSHTunnel struct {
	Host       string `yaml:"host"`
	Port       int    `yaml:"port"`
	User       string `yaml:"user"`
	PrivateKey string `yaml:"private_key"`
}

type SSLProperties

type SSLProperties struct {
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
}

type SharedPropertiesManifestBuilder

type SharedPropertiesManifestBuilder struct {
}

func NewSharedPropertiesManifestBuilder

func NewSharedPropertiesManifestBuilder() *SharedPropertiesManifestBuilder

func (SharedPropertiesManifestBuilder) AWS

func (SharedPropertiesManifestBuilder) Google

type Stemcell

type Stemcell struct {
	URL  string `yaml:"url"`
	SHA1 string `yaml:"sha1"`
}

type Subnet

type Subnet struct {
	Range           string                  `yaml:"range"`
	Gateway         string                  `yaml:"gateway"`
	DNS             []string                `yaml:"dns"`
	CloudProperties NetworksCloudProperties `yaml:"cloud_properties"`
}

type Template

type Template struct {
	Name    string `yaml:"name"`
	Release string `yaml:"release"`
}

type UserManagementProperties

type UserManagementProperties struct {
	Local LocalProperties `yaml:"local"`
}

type UserProperties

type UserProperties struct {
	Name     string `yaml:"name"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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