boshinit

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCPCPIReleaseName = "bosh-google-cpi"
	GCPCPIURL         = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-google-cpi-24.2.0.tgz"
	GCPCPISHA         = "80d3ef039cb0ed014e97eeea10569598804659d3"
	GCPCPIJobName     = "google_cpi"

	GCPStemcellURL = "https://storage.googleapis.com/bosh-cpi-artifacts/light-bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent.tgz"
	GCPStemcellSHA = "1f44ee6fc5fd495113694aa772d636bf1a8d645a"
)
View Source
const (
	PhotonCPIReleaseName = "bosh-photon-cpi"
	PhotonCPIURL         = "https://github.com/enaml-ops/bosh-photon-cpi-release/releases/download/v0.9.0/bosh-photon-cpi-0.9.0.dev.1.tgz"
	PhotonCPISHA         = "dc90202ee3981087a237fa0eb249d3345157a1e4"
	PhotonCPIJobName     = "cpi"

	PhotonStemcellURL = "https://bosh.io/d/stemcells/bosh-vsphere-esxi-ubuntu-trusty-go_agent?v=3232.1"
	PhotonStemcellSHA = "169df93e3e344cd84ac6ef16d76dd0276e321a25"
)

Variables

View Source
var RequiredBoshFlags = []string{
	"cidr",
	"gateway",
	"dns",
	"bosh-private-ip",
	"bosh-release-url",
	"bosh-release-sha",
	"bosh-cpi-release-url",
	"bosh-cpi-release-sha",
	"go-agent-release-url",
	"go-agent-release-sha",
	"director-name",
	"uaa-release-url",
	"uaa-release-sha",
	"ntp-server",
}

Functions

func BoshFlags added in v0.0.6

func BoshFlags(defaults *BoshBase) []cli.Flag

func NewAzureBosh

func NewAzureBosh(cfg AzureInitConfig, boshbase *BoshBase) *enaml.DeploymentManifest

func NewAzureCloudProvider

func NewAzureCloudProvider(myazure cpi.Azure, cpiTemplate enaml.Template, pubip, keypath string, ntpProperty []string) enaml.CloudProvider

func NewAzureProperty

func NewAzureProperty(azureenv, subid, tenantid, clientid, clientsecret, resourcegroup, storageaccount, securitygroup, sshuser, sshkey string) cpi.Azure

func NewHealthMonitor

func NewHealthMonitor(resurrectorEnabled bool) health_monitor.Hm

func NewNTP

func NewNTP(ntp ...string) []string

func NewNats

func NewNats(user, pass string) *director.Nats

func NewVSphereBosh

func NewVSphereBosh(cfg VSphereInitConfig, boshbase *BoshBase) *enaml.DeploymentManifest

NewVSphereBosh creates a new enaml deployment manifest for vSphere

Types

type AWSBosh added in v0.0.6

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

func (*AWSBosh) CreateCPIJobProperties added in v0.0.10

func (s *AWSBosh) CreateCPIJobProperties() map[string]interface{}

func (*AWSBosh) CreateCPIRelease added in v0.0.6

func (s *AWSBosh) CreateCPIRelease() enaml.Release

func (*AWSBosh) CreateCPITemplate added in v0.0.6

func (s *AWSBosh) CreateCPITemplate() (template enaml.Template)

func (*AWSBosh) CreateCloudProvider added in v0.0.6

func (s *AWSBosh) CreateCloudProvider() (provider enaml.CloudProvider)

func (*AWSBosh) CreateDeploymentManifest added in v0.0.6

func (s *AWSBosh) CreateDeploymentManifest() *enaml.DeploymentManifest

func (*AWSBosh) CreateDiskPool added in v0.0.6

func (s *AWSBosh) CreateDiskPool() enaml.DiskPool

func (*AWSBosh) CreateJobNetwork added in v0.0.6

func (s *AWSBosh) CreateJobNetwork() *enaml.Network

func (*AWSBosh) CreateManualNetwork added in v0.0.6

func (s *AWSBosh) CreateManualNetwork() (net enaml.ManualNetwork)

func (*AWSBosh) CreateResourcePool added in v0.0.6

func (s *AWSBosh) CreateResourcePool() (resourcePool enaml.ResourcePool)

func (*AWSBosh) CreateVIPNetwork added in v0.0.6

func (s *AWSBosh) CreateVIPNetwork() (net enaml.VIPNetwork)

type AWSInitConfig added in v0.0.11

type AWSInitConfig struct {
	AWSAvailabilityZone string
	AWSInstanceSize     string
	AWSSubnet           string
	AWSPEMFilePath      string
	AWSAccessKeyID      string
	AWSSecretKey        string
	AWSRegion           string
	AWSSecurityGroups   []string
	AWSKeyName          string
}

type Ar

type Ar aws_cpi.Registry

type AzureInitConfig added in v0.0.11

type AzureInitConfig struct {
	AzureInstanceSize         string
	AzureVnet                 string
	AzureSubnet               string
	AzureSubscriptionID       string
	AzureTenantID             string
	AzureClientID             string
	AzureClientSecret         string
	AzureResourceGroup        string
	AzureStorageAccount       string
	AzureDefaultSecurityGroup string
	AzureSSHPubKey            string
	AzureSSHUser              string
	AzureEnvironment          string
	AzurePrivateKeyPath       string
}

type BoshBase added in v0.0.6

type BoshBase struct {
	Mode                 string
	NetworkCIDR          string
	NetworkGateway       string
	NetworkDNS           []string
	DirectorName         string
	DirectorPassword     string
	DBPassword           string
	CPIJobName           string
	NtpServers           []string
	PrivateStaticIPs     []string
	PrivateReservedRange string
	NatsPassword         string
	MBusPassword         string
	PrivateIP            string
	PublicIP             string
	SSLCert              string
	SSLKey               string
	PrivateKey           string
	PublicKey            string
	HealthMonitorSecret  string
	LoginSecret          string
	RegistryPassword     string
	CACert               string
	BoshReleaseSHA       string
	BoshReleaseURL       string
	CPIReleaseSHA        string
	CPIReleaseURL        string
	GOAgentSHA           string
	GOAgentReleaseURL    string
	UAAReleaseSHA        string
	UAAReleaseURL        string
	TrustedCerts         string
}

func GetAWSBoshBase added in v0.0.11

func GetAWSBoshBase() *BoshBase

func GetAzureDefaults added in v0.0.11

func GetAzureDefaults() *BoshBase

func GetVSphereDefaults added in v0.0.11

func GetVSphereDefaults() *BoshBase

func NewBoshBase added in v0.0.6

func NewBoshBase(c *cli.Context) (base *BoshBase, err error)

func NewGCPBoshBase added in v0.0.11

func NewGCPBoshBase() *BoshBase

func NewPhotonBoshBase added in v0.0.11

func NewPhotonBoshBase() *BoshBase

func (*BoshBase) CreateDeploymentManifest added in v0.0.6

func (s *BoshBase) CreateDeploymentManifest() *enaml.DeploymentManifest

func (*BoshBase) CreateJob added in v0.0.6

func (s *BoshBase) CreateJob() enaml.Job

func (*BoshBase) GetRoutableIP added in v0.0.10

func (s *BoshBase) GetRoutableIP() string

func (*BoshBase) InitializeCerts added in v0.0.9

func (s *BoshBase) InitializeCerts() (err error)

InitializeCerts - initializes certs needed for UAA and health monitor

func (*BoshBase) InitializeKeys added in v0.0.9

func (s *BoshBase) InitializeKeys() (err error)

InitializeKeys - initializes public/private keys

func (*BoshBase) InitializePasswords added in v0.0.9

func (s *BoshBase) InitializePasswords()

func (*BoshBase) IsBasic added in v0.0.9

func (s *BoshBase) IsBasic() bool

IsBasic - is this a basic Bosh director

func (*BoshBase) IsUAA added in v0.0.9

func (s *BoshBase) IsUAA() bool

IsUAA - is this a UAA enabled bosh director

type DirectorProperty

type DirectorProperty struct {
	director.Director `yaml:",inline"`
	Address           string
}

type GCPBosh added in v0.0.11

type GCPBosh struct {
	BoshInitConfig *GCPBoshInitConfig
	Base           *BoshBase
}

func (*GCPBosh) CreateCPIJobProperties added in v0.0.11

func (g *GCPBosh) CreateCPIJobProperties() map[string]interface{}

func (*GCPBosh) CreateCPIRelease added in v0.0.11

func (g *GCPBosh) CreateCPIRelease() enaml.Release

func (*GCPBosh) CreateCPITemplate added in v0.0.11

func (g *GCPBosh) CreateCPITemplate() enaml.Template

func (*GCPBosh) CreateCloudProvider added in v0.0.11

func (g *GCPBosh) CreateCloudProvider() enaml.CloudProvider

func (*GCPBosh) CreateDeploymentManifest added in v0.0.11

func (g *GCPBosh) CreateDeploymentManifest() *enaml.DeploymentManifest

func (*GCPBosh) CreateDiskPool added in v0.0.11

func (g *GCPBosh) CreateDiskPool() enaml.DiskPool

func (*GCPBosh) CreateJobNetwork added in v0.0.11

func (g *GCPBosh) CreateJobNetwork() *enaml.Network

func (*GCPBosh) CreateManualNetwork added in v0.0.11

func (g *GCPBosh) CreateManualNetwork() enaml.ManualNetwork

func (*GCPBosh) CreateResourcePool added in v0.0.11

func (g *GCPBosh) CreateResourcePool() enaml.ResourcePool

func (*GCPBosh) CreateVIPNetwork added in v0.0.11

func (g *GCPBosh) CreateVIPNetwork() enaml.VIPNetwork

type GCPBoshInitConfig added in v0.0.11

type GCPBoshInitConfig struct {
	NetworkName       string
	SubnetworkName    string
	DefaultZone       string
	Project           string
	MachineType       string
	DiskType          string
	DNSRecursor       string
	BlobstoreProvider string
}

type IAASManifestProvider added in v0.0.6

type IAASManifestProvider interface {
	CreateCPIRelease() enaml.Release
	CreateCPITemplate() enaml.Template
	CreateDiskPool() enaml.DiskPool
	CreateResourcePool() enaml.ResourcePool
	CreateManualNetwork() enaml.ManualNetwork
	CreateVIPNetwork() enaml.VIPNetwork
	CreateJobNetwork() *enaml.Network
	CreateCloudProvider() enaml.CloudProvider
	CreateCPIJobProperties() map[string]interface{}
	CreateDeploymentManifest() *enaml.DeploymentManifest
}

func NewAWSIaaSProvider added in v0.0.6

func NewAWSIaaSProvider(cfg AWSInitConfig, boshBase *BoshBase) IAASManifestProvider

func NewGCPIaaSProvider added in v0.0.11

func NewGCPIaaSProvider(cfg *GCPBoshInitConfig, boshBase *BoshBase) IAASManifestProvider

func NewPhotonIaaSProvider added in v0.0.11

func NewPhotonIaaSProvider(cfg *PhotonBoshInitConfig, boshBase *BoshBase) IAASManifestProvider

type Network

type Network struct {
	Name    string
	Range   string
	Gateway string
	DNS     []string
}

type PgSql

type PgSql struct {
	User     string
	Host     string
	Password string
	Database string
	Adapter  string
}

type PhotonBosh added in v0.0.11

type PhotonBosh struct {
	BoshInitConfig *PhotonBoshInitConfig
	Base           *BoshBase
}

func (*PhotonBosh) CreateCPIJobProperties added in v0.0.11

func (g *PhotonBosh) CreateCPIJobProperties() map[string]interface{}

func (*PhotonBosh) CreateCPIRelease added in v0.0.11

func (g *PhotonBosh) CreateCPIRelease() enaml.Release

func (*PhotonBosh) CreateCPITemplate added in v0.0.11

func (g *PhotonBosh) CreateCPITemplate() enaml.Template

func (*PhotonBosh) CreateCloudProvider added in v0.0.11

func (g *PhotonBosh) CreateCloudProvider() enaml.CloudProvider

func (*PhotonBosh) CreateDeploymentManifest added in v0.0.11

func (g *PhotonBosh) CreateDeploymentManifest() *enaml.DeploymentManifest

func (*PhotonBosh) CreateDiskPool added in v0.0.11

func (g *PhotonBosh) CreateDiskPool() enaml.DiskPool

func (*PhotonBosh) CreateJobNetwork added in v0.0.11

func (g *PhotonBosh) CreateJobNetwork() *enaml.Network

func (*PhotonBosh) CreateManualNetwork added in v0.0.11

func (g *PhotonBosh) CreateManualNetwork() enaml.ManualNetwork

func (*PhotonBosh) CreateResourcePool added in v0.0.11

func (g *PhotonBosh) CreateResourcePool() enaml.ResourcePool

func (*PhotonBosh) CreateVIPNetwork added in v0.0.11

func (g *PhotonBosh) CreateVIPNetwork() enaml.VIPNetwork

type PhotonBoshInitConfig added in v0.0.11

type PhotonBoshInitConfig struct {
	photoncpi.Photon
	MachineType string
	NetworkName string
}

type Postgres

type Postgres interface {
	GetDirectorDB() *director.DirectorDb
	GetRegistryDB() *registry.Db
	GetPostgresDB() postgres.Postgres
}

type RegistryProperty

type RegistryProperty struct {
	Rr      `yaml:",inline"`
	Ar      `yaml:",inline"`
	Address string `yaml:"address"`
}

type ResourcePool added in v0.0.11

type ResourcePool struct {
	ResourcePool string `yaml:"resource_pool"`
}

type Rr

type Rr registry.Registry

type UAAClient added in v0.0.6

type UAAClient struct {
	ID                   string      `yaml:"id,omitempty"`
	Secret               string      `yaml:"secret,omitempty"`
	Scope                string      `yaml:"scope,omitempty"`
	AuthorizedGrantTypes string      `yaml:"authorized-grant-types,omitempty"`
	Authorities          string      `yaml:"authorities,omitempty"`
	AutoApprove          interface{} `yaml:"autoapprove,omitempty"`
	Override             bool        `yaml:"override,omitempty"`
	RedirectURI          string      `yaml:"redirect-uri,omitempty"`
	AccessTokenValidity  int         `yaml:"access-token-validity,omitempty"`
	RefreshTokenValidity int         `yaml:"refresh-token-validity,omitempty"`
	ResourceIDs          string      `yaml:"resource_ids,omitempty"`
	Name                 string      `yaml:"name,omitempty"`
	AppLaunchURL         string      `yaml:"app-launch-url,omitempty"`
	ShowOnHomepage       bool        `yaml:"show-on-homepage,omitempty"`
	AppIcon              string      `yaml:"app-icon,omitempty"`
}

UAAClient - Structure to represent map of client priviledges

type VSphereDatacenter

type VSphereDatacenter struct {
	Name                       string                    `yaml:"name"`                         // [String, required]: vSphere datacenter name.
	VMFolder                   string                    `yaml:"vm_folder"`                    // [String, required]: The folder to create PCF VMs in.
	TemplateFolder             string                    `yaml:"template_folder"`              // [String, required]: The folder to store stemcells in.
	DatastorePattern           string                    `yaml:"datastore_pattern"`            // [String, required]: The pattern to the vSphere datastore.
	PersistentDatastorePattern string                    `yaml:"persistent_datastore_pattern"` // [String, required]: The pattern to the vSphere datastore for persistent disks.
	DiskPath                   string                    `yaml:"disk_path"`                    // [String, required]: The disk path.
	Clusters                   []map[string]ResourcePool `yaml:"clusters"`                     // [[]String], required]: The vSphere cluster(s).
}

type VSphereDatacenters

type VSphereDatacenters []VSphereDatacenter

type VSphereInitConfig added in v0.0.11

type VSphereInitConfig struct {
	VSphereAddress        string
	VSphereUser           string
	VSpherePassword       string
	VSphereDatacenterName string
	VSphereVMFolder       string
	VSphereTemplateFolder string
	VSphereDataStore      string
	VSphereDiskPath       string
	VSphereResourcePool   string
	VSphereClusters       []string
	VSphereNetworks       []Network
}

type VSpherecloudpropertiesNetwork

type VSpherecloudpropertiesNetwork struct {
	Name string `yaml:"name,omitempty"` // [String, required]: vSphere network name.
}

type VSpherecloudpropertiesResourcePool

type VSpherecloudpropertiesResourcePool struct {
	CPU         int                `yaml:"cpu,omitempty"`  // [Integer, required]: Number of CPUs.
	RAM         int                `yaml:"ram,omitempty"`  // [Integer, required]: Specified the amount of RAM in megabytes.
	Disk        int                `yaml:"disk,omitempty"` // [Integer, required]: Specifies the disk size in megabytes.
	Datacenters VSphereDatacenters `yaml:"datacenters,omitempty"`
}

Jump to

Keyboard shortcuts

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