Documentation ¶
Index ¶
- Constants
- func NewAwsProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)
- type Configuration
- type CreateInput
- type Ec2Instance
- func (wrapper Ec2Instance) AmiExists(ami string) bool
- func (wrapper Ec2Instance) AttachInstance(instanceName string, controlPlane bool, nodeIndex int) (providers.ProviderHandler, error)
- func (instance *Ec2Instance) Create(nodeGroup string, instanceType types.InstanceType, userData string, ...) (err error)
- func (wrapper Ec2Instance) CreateInstance(instanceName string, instanceType string, controlPlane bool, nodeIndex int) (providers.ProviderHandler, error)
- func (instance *Ec2Instance) Delete() error
- func (wrapper Ec2Instance) Exists(name string) bool
- func (wrapper Ec2Instance) GetAvailableGpuTypes() map[string]string
- func (wrapper Ec2Instance) GetEc2Instance(instanceName string) (*Ec2Instance, error)
- func (wrapper Ec2Instance) GetFileName() string
- func (wrapper Ec2Instance) GetMode() bool
- func (wrapper Ec2Instance) GetRoute53AccessKey() string
- func (wrapper Ec2Instance) GetRoute53AccessToken() string
- func (wrapper Ec2Instance) GetRoute53Profile() string
- func (wrapper Ec2Instance) GetRoute53Region() string
- func (wrapper Ec2Instance) GetRoute53SecretKey() string
- func (wrapper Ec2Instance) InstanceExists(name string) bool
- func (wrapper Ec2Instance) Logf(classification logging.Classification, format string, v ...interface{})
- func (instance *Ec2Instance) NewContext() *context.Context
- func (instance *Ec2Instance) NewContextWithTimeout(timeout time.Duration) *context.Context
- func (instance *Ec2Instance) PowerOff() error
- func (instance *Ec2Instance) PowerOn() error
- func (instance *Ec2Instance) RegisterDNS(name, address string, wait bool) error
- func (wrapper Ec2Instance) SetMode(test bool)
- func (instance *Ec2Instance) ShutdownGuest() error
- func (instance *Ec2Instance) Status() (status providers.InstanceStatus, err error)
- func (instance *Ec2Instance) Terminate() error
- func (wrapper Ec2Instance) UUID(instanceName string) (string, error)
- func (instance *Ec2Instance) UnRegisterDNS(name string, wait bool) error
- func (instance *Ec2Instance) WaitForIP(callback providers.CallbackWaitSSHReady) (string, error)
- func (instance *Ec2Instance) WaitForPowered() error
- type MetadataOptionsConfiguration
- type Network
- type NetworkInterface
- type Route53
- type Tag
- type UserDefinedNetworkInterface
- type VirtualMachinePowerState
Constants ¶
const ( // VirtualMachinePowerStatePoweredOff state VirtualMachinePowerStatePoweredOff = VirtualMachinePowerState("poweredOff") // VirtualMachinePowerStatePoweredOn state VirtualMachinePowerStatePoweredOn = VirtualMachinePowerState("poweredOn") // VirtualMachinePowerStateSuspended state VirtualMachinePowerStateSuspended = VirtualMachinePowerState("suspended") )
Variables ¶
This section is empty.
Functions ¶
func NewAwsProviderConfiguration ¶
func NewAwsProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)
Types ¶
type Configuration ¶
type Configuration struct { AccessKey string `json:"accessKey,omitempty"` SecretKey string `json:"secretKey,omitempty"` Token string `json:"token,omitempty"` Filename string `json:"filename,omitempty"` Profile string `json:"profile,omitempty"` Region string `json:"region,omitempty"` Timeout time.Duration `json:"timeout"` ImageID string `json:"ami"` IamRole string `json:"iam-role-arn"` KeyName string `json:"keyName"` VolumeType types.VolumeType `default:"gp3" json:"volume-type"` Tags []Tag `json:"tags,omitempty"` Network Network `json:"network"` AvailableGPUTypes map[string]string `json:"gpu-types"` MetadataOptions MetadataOptionsConfiguration `json:"metadata-options"` // contains filtered or unexported fields }
Configuration declares aws connection info
type CreateInput ¶
type CreateInput struct {
*providers.InstanceCreateInput
}
type Ec2Instance ¶
type Ec2Instance struct { NodeIndex int InstanceName string PrivateDNSName string InstanceID string Region string Zone string AddressIP *string // contains filtered or unexported fields }
Ec2Instance Running instance
func (Ec2Instance) AttachInstance ¶
func (*Ec2Instance) Create ¶
func (instance *Ec2Instance) Create(nodeGroup string, instanceType types.InstanceType, userData string, diskType types.VolumeType, diskSize int, desiredENI *UserDefinedNetworkInterface) (err error)
Create will create a named VM not powered memory and disk are in megabytes
func (Ec2Instance) CreateInstance ¶
func (*Ec2Instance) Delete ¶
func (instance *Ec2Instance) Delete() error
Delete a VM by name and don't wait for terminated status
func (Ec2Instance) GetAvailableGpuTypes ¶
func (Ec2Instance) GetEc2Instance ¶
func (wrapper Ec2Instance) GetEc2Instance(instanceName string) (*Ec2Instance, error)
GetEc2Instance return an existing instance from name
func (Ec2Instance) GetFileName ¶
func (wrapper Ec2Instance) GetFileName() string
func (Ec2Instance) GetRoute53AccessKey ¶
func (wrapper Ec2Instance) GetRoute53AccessKey() string
GetRoute53AccessKey return route53 access key or default
func (Ec2Instance) GetRoute53AccessToken ¶
func (wrapper Ec2Instance) GetRoute53AccessToken() string
GetRoute53AccessToken return route53 token or default
func (Ec2Instance) GetRoute53Profile ¶
func (wrapper Ec2Instance) GetRoute53Profile() string
GetRoute53Profile return route53 profile or default
func (Ec2Instance) GetRoute53Region ¶
func (wrapper Ec2Instance) GetRoute53Region() string
GetRoute53Profile return route53 region or default
func (Ec2Instance) GetRoute53SecretKey ¶
func (wrapper Ec2Instance) GetRoute53SecretKey() string
GetRoute53SecretKey return route53 secret key or default
func (Ec2Instance) InstanceExists ¶
func (Ec2Instance) Logf ¶ added in v1.30.0
func (wrapper Ec2Instance) Logf(classification logging.Classification, format string, v ...interface{})
Log logging
func (*Ec2Instance) NewContext ¶
func (instance *Ec2Instance) NewContext() *context.Context
NewContext create instance context
func (*Ec2Instance) NewContextWithTimeout ¶
func (instance *Ec2Instance) NewContextWithTimeout(timeout time.Duration) *context.Context
func (*Ec2Instance) PowerOff ¶
func (instance *Ec2Instance) PowerOff() error
PowerOff power off a VM by name
func (*Ec2Instance) PowerOn ¶
func (instance *Ec2Instance) PowerOn() error
PowerOn power on a VM by name
func (*Ec2Instance) RegisterDNS ¶
func (instance *Ec2Instance) RegisterDNS(name, address string, wait bool) error
RegisterDNS register EC2 instance in Route53
func (*Ec2Instance) ShutdownGuest ¶
func (instance *Ec2Instance) ShutdownGuest() error
ShutdownGuest power off a VM by name
func (*Ec2Instance) Status ¶
func (instance *Ec2Instance) Status() (status providers.InstanceStatus, err error)
Status return the current status of VM by name
func (*Ec2Instance) Terminate ¶
func (instance *Ec2Instance) Terminate() error
Terminate a VM by name and wait until status is terminated
func (*Ec2Instance) UnRegisterDNS ¶
func (instance *Ec2Instance) UnRegisterDNS(name string, wait bool) error
UnRegisterDNS unregister EC2 instance in Route53
func (*Ec2Instance) WaitForIP ¶
func (instance *Ec2Instance) WaitForIP(callback providers.CallbackWaitSSHReady) (string, error)
WaitForIP wait ip a VM by name
func (*Ec2Instance) WaitForPowered ¶
func (instance *Ec2Instance) WaitForPowered() error
WaitForPowered wait ip a VM by name
type MetadataOptionsConfiguration ¶ added in v1.30.0
type MetadataOptionsConfiguration struct { HttpEndpoint types.InstanceMetadataEndpointState `default:"enabled" json:"http-endpoint" type:"string" enum:"InstanceMetadataEndpointState"` HttpProtocolIpv6 types.InstanceMetadataProtocolState `default:"disabled" json:"http-protocol-ipv6" type:"string" enum:"InstanceMetadataProtocolState"` HttpPutResponseHopLimit int32 `default:"2" json:"http-put-responsehop-limit" type:"integer"` HttpTokens types.HttpTokensState `default:"required" json:"http-tokens" type:"string" enum:"HttpTokensState"` InstanceMetadataTags types.InstanceMetadataTagsState `default:"enabled" json:"instance-metadata-tags" type:"string" enum:"InstanceMetadataTagsState"` }
type Network ¶
type Network struct { Route53 Route53 `json:"route53,omitempty"` CniPlugin string `json:"cni-plugin,omitempty"` ENI []NetworkInterface `json:"eni,omitempty"` }
Network declare network Configuration
type NetworkInterface ¶
type NetworkInterface struct { SubnetsID []string `json:"subnets"` SecurityGroupID string `json:"securityGroup"` PublicIP bool `json:"publicIP"` }
NetworkInterface declare ENI interface
func (*NetworkInterface) GetNextSubnetsID ¶
func (eni *NetworkInterface) GetNextSubnetsID(nodeIndex int) string
type Route53 ¶
type Route53 struct { ZoneID string `json:"zoneID,omitempty"` PrivateZoneName string `json:"privateZoneName,omitempty"` AccessKey string `json:"accessKey,omitempty"` SecretKey string `json:"secretKey,omitempty"` Token string `json:"token,omitempty"` Profile string `json:"profile,omitempty"` Region string `json:"region,omitempty"` }
type UserDefinedNetworkInterface ¶
type UserDefinedNetworkInterface struct { NetworkInterfaceID string `json:"networkInterfaceId"` SubnetID string `json:"subnets"` SecurityGroupID string `json:"securityGroup"` PrivateAddress string `json:"privateAddress,omitempty"` PublicIP bool `json:"publicIP"` }
UserDefinedNetworkInterface declare a network interface interface overriding default Eni
type VirtualMachinePowerState ¶
type VirtualMachinePowerState string
VirtualMachinePowerState alias string