Documentation ¶
Index ¶
- Variables
- func CheckIPInSg(sg *types.SecurityGroup, currentIP string, port int32) bool
- type AwsCloud
- func (c *AwsCloud) AddSecurityGroupRule(groupID, direction, protocol, ip string, port int32) error
- func (c *AwsCloud) AssociateEIP(instanceID, allocationID string) error
- func (c *AwsCloud) ChangeInstanceType(instanceID, instanceType string) error
- func (c *AwsCloud) CheckKeyPairExists(kpName string) (bool, error)
- func (c *AwsCloud) CheckSecurityGroupExists(sgName string) (bool, types.SecurityGroup, error)
- func (c *AwsCloud) CreateAndDownloadKeyPair(keyName string, privateKeyFilePath string) error
- func (c *AwsCloud) CreateEC2Instances(prefix string, count int, amiID, instanceType, keyName, securityGroupID string, ...) ([]string, error)
- func (c *AwsCloud) CreateEIP(prefix string) (string, string, error)
- func (c *AwsCloud) CreateSecurityGroup(groupName, description string) (string, error)
- func (c *AwsCloud) DeleteSecurityGroupRule(groupID, direction, protocol, ip string, port int32) error
- func (c *AwsCloud) DestroyAWSNode(nodeConfig models.NodeConfig, clusterName string) error
- func (c *AwsCloud) DestroyInstance(instanceID, publicIP string, releasePublicIP bool) error
- func (c *AwsCloud) GetInstancePublicIPs(nodeIDs []string) (map[string]string, error)
- func (c *AwsCloud) GetInstanceTypeArch(instanceType string) (string, error)
- func (c *AwsCloud) GetRootVolumeID(instanceID string) (string, error)
- func (c *AwsCloud) GetUbuntuAMIID(arch string, ubuntuVerLTS string) (string, error)
- func (c *AwsCloud) IsInstanceTypeSupported(instanceType string) (bool, error)
- func (c *AwsCloud) ListRegions() ([]string, error)
- func (c *AwsCloud) ResizeVolume(volumeID string, newSizeInGB int32) error
- func (c *AwsCloud) SetupSecurityGroup(ipAddress, securityGroupName string) (string, error)
- func (c *AwsCloud) UploadSSHIdentityKeyPair(keyName string, identity string) error
- func (c *AwsCloud) WaitForEC2Instances(nodeIDs []string, state types.InstanceStateName) error
- func (c *AwsCloud) WaitForVolumeModificationState(volumeID string, targetState string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckIPInSg ¶
func CheckIPInSg(sg *types.SecurityGroup, currentIP string, port int32) bool
CheckIPInSg checks if the IP is present in the SecurityGroup.
Types ¶
type AwsCloud ¶
type AwsCloud struct {
// contains filtered or unexported fields
}
func NewAwsCloud ¶
NewAwsCloud creates an AWS cloud
func (*AwsCloud) AddSecurityGroupRule ¶
AddSecurityGroupRule adds a rule to the given security group
func (*AwsCloud) AssociateEIP ¶
AssociateEIP associates an Elastic IP address with an EC2 instance.
func (*AwsCloud) ChangeInstanceType ¶
ChangeInstanceType resizes the given instance to the new instance type.
func (*AwsCloud) CheckKeyPairExists ¶
CheckKeyPairExists checks if the specified key pair exists in the AWS Cloud.
func (*AwsCloud) CheckSecurityGroupExists ¶
CheckSecurityGroupExists checks if the given security group exists
func (*AwsCloud) CreateAndDownloadKeyPair ¶
CreateAndDownloadKeyPair creates a new key pair and downloads the private key material to the specified file path.
func (*AwsCloud) CreateEC2Instances ¶
func (c *AwsCloud) CreateEC2Instances(prefix string, count int, amiID, instanceType, keyName, securityGroupID string, forMonitoring bool, iops, throughput int, volumeType types.VolumeType, volumeSize int) ([]string, error)
CreateEC2Instances creates EC2 instances
func (*AwsCloud) CreateSecurityGroup ¶
CreateSecurityGroup creates a security group
func (*AwsCloud) DeleteSecurityGroupRule ¶
func (c *AwsCloud) DeleteSecurityGroupRule(groupID, direction, protocol, ip string, port int32) error
DeleteSecurityGroupRule removes a rule from the given security group
func (*AwsCloud) DestroyAWSNode ¶
func (c *AwsCloud) DestroyAWSNode(nodeConfig models.NodeConfig, clusterName string) error
DestroyAWSNode terminates an EC2 instance with the given ID.
func (*AwsCloud) DestroyInstance ¶
DestroyInstance terminates an EC2 instance with the given ID.
func (*AwsCloud) GetInstancePublicIPs ¶
GetInstancePublicIPs returns a map from instance ID to public IP
func (*AwsCloud) GetInstanceTypeArch ¶
GetInstanceTypeArch returns the architecture of the given instance type.
func (*AwsCloud) GetRootVolumeID ¶
GetRootVolume returns a volume IDs attached to the given which is used as a root volume
func (*AwsCloud) GetUbuntuAMIID ¶
GetUbuntuAMIID returns the ID of the latest Ubuntu Amazon Machine Image (AMI).
func (*AwsCloud) IsInstanceTypeSupported ¶
IsInstanceTypeSupported checks if the given instance type is supported by the AWS cloud.
func (*AwsCloud) ListRegions ¶
ListRegions returns a list of all AWS regions.
func (*AwsCloud) ResizeVolume ¶
ResizeVolume resizes the given volume to the new size.
func (*AwsCloud) SetupSecurityGroup ¶
SetupSecurityGroup sets up a security group for the AwsCloud instance.
func (*AwsCloud) UploadSSHIdentityKeyPair ¶
UploadSSHIdentityKeyPair uploads a key pair from ssh-agent identity to the AWS cloud.
func (*AwsCloud) WaitForEC2Instances ¶
func (c *AwsCloud) WaitForEC2Instances(nodeIDs []string, state types.InstanceStateName) error
WaitForEC2Instances waits for the EC2 instances to be running