boshcli

package
v0.0.0-...-4f22f6d Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSEnvironment

type AWSEnvironment struct {
	AccessKeyID           string
	ATCSecurityGroup      string
	AZ                    string
	BlobstoreBucket       string
	CustomOperations      string
	DBCACert              string
	DBHost                string
	DBName                string
	DBPassword            string
	DBPort                string
	DBUsername            string
	DefaultKeyName        string
	DefaultSecurityGroups []string
	ExternalIP            string
	InternalCIDR          string
	InternalGateway       string
	InternalIP            string
	PrivateCIDR           string
	PrivateCIDRGateway    string
	PrivateCIDRReserved   string
	PrivateKey            string
	PrivateSubnetID       string
	PublicCIDR            string
	PublicCIDRGateway     string
	PublicCIDRReserved    string
	PublicCIDRStatic      string
	PublicSubnetID        string
	Region                string
	S3AWSAccessKeyID      string
	S3AWSSecretAccessKey  string
	SecretAccessKey       string
	Spot                  bool
	VersionFile           []byte
	VMSecurityGroup       string
	WorkerType            string
}

Environment holds all the parameters AWS IAAS needs

func (AWSEnvironment) ConcourseStemcellURL

func (e AWSEnvironment) ConcourseStemcellURL() (string, error)

func (AWSEnvironment) ConfigureDirectorCloudConfig

func (e AWSEnvironment) ConfigureDirectorCloudConfig() (string, error)

ConfigureDirectorCloudConfig inserts values from the environment into the config template passed as argument

func (AWSEnvironment) ConfigureDirectorManifestCPI

func (e AWSEnvironment) ConfigureDirectorManifestCPI() (string, error)

ConfigureDirectorManifestCPI interpolates all the Environment parameters and required release versions into ready to use Director manifest

func (AWSEnvironment) ExtractBOSHandBPM

func (e AWSEnvironment) ExtractBOSHandBPM() (util.Resource, util.Resource, error)

type CLI

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

CLI struct holds the abstraction of execCmd

func (*CLI) CreateEnv

func (c *CLI) CreateEnv(createEnvFiles *CreateEnvFiles, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) (*CreateEnvFiles, error)

func (*CLI) Locks

func (c *CLI) Locks(config IAASEnvironment, ip, password, ca string) ([]byte, error)

Locks runs bosh locks

func (*CLI) Recreate

func (c *CLI) Recreate(config IAASEnvironment, ip, password, ca string) error

Recreate runs BOSH recreate

func (*CLI) RunAuthenticatedCommand

func (c *CLI) RunAuthenticatedCommand(action, ip, password, ca string, detach bool, stdout io.Writer, flags ...string) error

RunAuthenticatedCommand runs the bosh command `action` with flags `flags` specifying `detach` will cause the task to detach once a deployment starts `detach` is currently only implemented with the action `deploy`

func (*CLI) UpdateCloudConfig

func (c *CLI) UpdateCloudConfig(config IAASEnvironment, ip, password, ca string) error

UpdateCloudConfig generates cloud config from template and use it to update bosh cloud config

func (*CLI) UploadConcourseStemcell

func (c *CLI) UploadConcourseStemcell(config IAASEnvironment, ip, password, ca string) error

UploadConcourseStemcell uploads a stemcell for the chosen IAAS

type CreateEnvFiles

type CreateEnvFiles struct {
	StateFileContents []byte
	VarsFileContents  []byte
}

type GCPEnvironment

type GCPEnvironment struct {
	CustomOperations    string
	DirectorName        string
	ExternalIP          string
	GcpCredentialsJSON  string
	InternalCIDR        string
	InternalGW          string
	InternalIP          string
	Network             string
	PrivateCIDR         string
	PrivateCIDRGateway  string
	PrivateCIDRReserved string
	PrivateSubnetwork   string
	ProjectID           string
	PublicCIDR          string
	PublicCIDRGateway   string
	PublicCIDRReserved  string
	PublicCIDRStatic    string
	PublicKey           string
	PublicSubnetwork    string
	Spot                bool
	Tags                string
	VersionFile         []byte
	Zone                string
}

Environment holds all the parameters GCP IAAS needs

func (GCPEnvironment) ConcourseStemcellURL

func (e GCPEnvironment) ConcourseStemcellURL() (string, error)

func (GCPEnvironment) ConfigureDirectorCloudConfig

func (e GCPEnvironment) ConfigureDirectorCloudConfig() (string, error)

ConfigureDirectorCloudConfig inserts values from the environment into the config template passed as argument

func (GCPEnvironment) ConfigureDirectorManifestCPI

func (e GCPEnvironment) ConfigureDirectorManifestCPI() (string, error)

ConfigureDirectorManifestCPI interpolates all the Environment parameters and required release versions into ready to use Director manifest

func (GCPEnvironment) ExtractBOSHandBPM

func (e GCPEnvironment) ExtractBOSHandBPM() (util.Resource, util.Resource, error)

type IAASEnvironment

type IAASEnvironment interface {
	ConfigureDirectorManifestCPI() (string, error)
	ConfigureDirectorCloudConfig() (string, error)
	ConcourseStemcellURL() (string, error)
	ExtractBOSHandBPM() (util.Resource, util.Resource, error)
}

type ICLI

type ICLI interface {
	CreateEnv(createEnvFiles *CreateEnvFiles, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) (*CreateEnvFiles, error)
	RunAuthenticatedCommand(action, ip, password, ca string, detach bool, stdout io.Writer, flags ...string) error
	Locks(config IAASEnvironment, ip, password, ca string) ([]byte, error)
	Recreate(config IAASEnvironment, ip, password, ca string) error
	UpdateCloudConfig(config IAASEnvironment, ip, password, ca string) error
	UploadConcourseStemcell(config IAASEnvironment, ip, password, ca string) error
}

func New

func New(boshPath string, execCmdFunc func(string, ...string) *exec.Cmd) ICLI

New provides a new CLI

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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