Documentation
¶
Index ¶
- func DeleteVM(vm *object.VirtualMachine) error
- func GetVMIP(vm *object.VirtualMachine) (string, error)
- type GeneratedKey
- type MgmtBootstrap
- type MgmtBootstrapCAPV
- type MgmtBootstrapRKE
- type Session
- func (s *Session) CloneTemplate(template *object.VirtualMachine, name string, bootScript string, ...) (*object.VirtualMachine, error)
- func (s *Session) CloneTemplates(clonesSpec ...cloneSpec) (map[string]*object.VirtualMachine, error)
- func (s *Session) CreateVMFolders(folderPath string) (map[string]*object.Folder, error)
- func (s *Session) DeleteVMFolder(folder *object.Folder) (*object.Task, error)
- func (s *Session) DeployOVATemplates(templatePaths ...string) (map[string]*object.VirtualMachine, error)
- func (s *Session) GetAllFolders() ([]*object.Folder, error)
- func (s *Session) GetDatacenter(name string) (*object.Datacenter, error)
- func (s *Session) GetDatastore(name string) (*object.Datastore, error)
- func (s *Session) GetFolder(name string) (*object.Folder, error)
- func (s *Session) GetNetwork(name string) (object.NetworkReference, error)
- func (s *Session) GetResourcePool(name string) (*object.ResourcePool, error)
- func (s *Session) GetVM(name string) (*object.VirtualMachine, error)
- type TrackedResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GeneratedKey ¶
GeneratedKey is the key pair generated for the run
type MgmtBootstrap ¶
type MgmtBootstrap struct { provider.Spec `yaml:",inline" json:",inline" mapstructure:",squash"` vsphereConfig.ProviderVsphere `yaml:",inline" json:",inline" mapstructure:",squash"` Session *Session `yaml:"-" json:"-" mapstructure:"-"` TrackedResources TrackedResources `yaml:"-" json:"-" mapstructure:"-"` Prerequisites string `yaml:"-" json:"-" mapstructure:"-"` }
MgmtBootstrap spec for CAPV
func (*MgmtBootstrap) Client ¶
func (v *MgmtBootstrap) Client() error
Client setups connection to remote vCenter
func (*MgmtBootstrap) Events ¶
func (v *MgmtBootstrap) Events() progress.Events
Events returns the channel of progress messages
func (*MgmtBootstrap) Finalize ¶
func (v *MgmtBootstrap) Finalize() error
Finalize handles saving deliverables and cleaning up the bootstrap VM
func (*MgmtBootstrap) Progress ¶
func (v *MgmtBootstrap) Progress() error
Progress monitors the of the management cluster bootstrapping process
type MgmtBootstrapCAPV ¶
type MgmtBootstrapCAPV struct { MgmtBootstrap `yaml:",inline" json:",inline" mapstructure:",squash"` cluster.CAPIConfig `yaml:",inline" json:",inline" mapstructure:",squash"` }
MgmtBootstrapCAPV is the spec for bootstrapping a CAPV management cluster
func NewMgmtBootstrapCAPV ¶
func NewMgmtBootstrapCAPV(full *MgmtBootstrapCAPV) *MgmtBootstrapCAPV
NewMgmtBootstrapCAPV is a new rke provider
func (*MgmtBootstrapCAPV) Prepare ¶
func (v *MgmtBootstrapCAPV) Prepare() error
Prepare bootstrap VM for capv deployment
func (*MgmtBootstrapCAPV) Provision ¶
func (v *MgmtBootstrapCAPV) Provision() error
Provision calls the process to create the management cluster for CAPV
type MgmtBootstrapRKE ¶
type MgmtBootstrapRKE struct { MgmtBootstrap `yaml:",inline" json:",inline" mapstructure:",squash"` BootstrapIP string `yaml:"BootstrapIP" json:"bootstrapIP"` Nodes map[string]string `yaml:"Nodes" json:"nodes"` RKEConfigPath string `yaml:"RKEConfigPath"` Hostname string `yaml:"Hostname" json:"hostname"` GeneratedKey GeneratedKey `yaml:"-" json:"-" mapstructure:"-"` }
MgmtBootstrapRKE is the spec for bootstrapping a RKE management cluster
func NewMgmtBootstrapRKE ¶
func NewMgmtBootstrapRKE(full *MgmtBootstrapRKE) *MgmtBootstrapRKE
NewMgmtBootstrapRKE is a new rke provider
func (*MgmtBootstrapRKE) Prepare ¶
func (v *MgmtBootstrapRKE) Prepare() error
Prepare bootstrap VM for rke deployment
func (*MgmtBootstrapRKE) Provision ¶
func (v *MgmtBootstrapRKE) Provision() error
Provision calls the process to create the management cluster for RKE
type Session ¶
type Session struct { Conn *govmomi.Client Datacenter *object.Datacenter Datastore *object.Datastore Folder *object.Folder ResourcePool *object.ResourcePool Network object.NetworkReference }
Session holds govmomi connection details
func (*Session) CloneTemplate ¶
func (s *Session) CloneTemplate(template *object.VirtualMachine, name string, bootScript string, publicKeys []string, osUser string) (*object.VirtualMachine, error)
CloneTemplate creates a VM from a template
func (*Session) CloneTemplates ¶
func (s *Session) CloneTemplates(clonesSpec ...cloneSpec) (map[string]*object.VirtualMachine, error)
CloneTemplates clones multiple VMs asynchronously
func (*Session) CreateVMFolders ¶
CreateVMFolders creates all folders in a path like "one/two/three"
func (*Session) DeleteVMFolder ¶
DeleteVMFolder removes a folder from vcenter
func (*Session) DeployOVATemplates ¶
func (s *Session) DeployOVATemplates(templatePaths ...string) (map[string]*object.VirtualMachine, error)
DeployOVATemplates deploys multiple OVAs asynchronously
func (*Session) GetAllFolders ¶
GetAllFolders returns all folder object in a datacenter
func (*Session) GetDatacenter ¶
func (s *Session) GetDatacenter(name string) (*object.Datacenter, error)
GetDatacenter returns the govmomi object for a datacenter
func (*Session) GetDatastore ¶
GetDatastore returns the govmomi object for a datastore
func (*Session) GetNetwork ¶
func (s *Session) GetNetwork(name string) (object.NetworkReference, error)
GetNetwork returns the govmomi object for a network
func (*Session) GetResourcePool ¶
func (s *Session) GetResourcePool(name string) (*object.ResourcePool, error)
GetResourcePool returns the govmomi object for a resource pool
type TrackedResources ¶
type TrackedResources struct { Folders map[string]*object.Folder VMs map[string]*object.VirtualMachine }
TrackedResources are vmware objects created during the bootstrap process