Documentation ¶
Index ¶
- Variables
- func CheckUserIPInSg(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) 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) GetInstancePublicIPs(nodeIDs []string) (map[string]string, error)
- func (c *AwsCloud) GetUbuntuAMIID() (string, error)
- func (c *AwsCloud) ListRegions() ([]string, error)
- func (c *AwsCloud) SetupSecurityGroup(ipAddress, securityGroupName string) (string, error)
- func (c *AwsCloud) StopAWSNode(nodeConfig models.NodeConfig, clusterName string) error
- func (c *AwsCloud) StopInstance(instanceID, publicIP string, releasePublicIP bool) error
- func (c *AwsCloud) UploadSSHIdentityKeyPair(keyName string, identity string) error
- func (c *AwsCloud) WaitForEC2Instances(nodeIDs []string) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckUserIPInSg ¶
func CheckUserIPInSg(sg *types.SecurityGroup, currentIP string, port int32) bool
CheckUserIPInSg checks if the user 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) 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) ([]string, error)
CreateEC2Instances creates EC2 instances
func (*AwsCloud) CreateSecurityGroup ¶
CreateSecurityGroup creates a security group
func (*AwsCloud) GetInstancePublicIPs ¶
GetInstancePublicIPs returns a map from instance ID to public IP
func (*AwsCloud) GetUbuntuAMIID ¶
GetUbuntuAMIID returns the ID of the latest Ubuntu Amazon Machine Image (AMI).
func (*AwsCloud) ListRegions ¶ added in v1.4.0
ListRegions returns a list of all AWS regions.
func (*AwsCloud) SetupSecurityGroup ¶
SetupSecurityGroup sets up a security group for the AwsCloud instance.
func (*AwsCloud) StopAWSNode ¶
func (c *AwsCloud) StopAWSNode(nodeConfig models.NodeConfig, clusterName string) error
StopAWSNode stops an EC2 instance with the given ID.
func (*AwsCloud) StopInstance ¶
StopInstance stops an EC2 instance with the given ID.
func (*AwsCloud) UploadSSHIdentityKeyPair ¶ added in v1.3.7
UploadSSHIdentityKeyPair uploads a key pair from ssh-agent identity to the AWS cloud.
func (*AwsCloud) WaitForEC2Instances ¶
WaitForEC2Instances waits for the EC2 instances to be running