Documentation
¶
Index ¶
- Constants
- type AMI
- type Client
- func (c Client) BuildEFSDisk(which string) *EFSDisk
- func (c Client) CreateDNSRecords(nodeIPs []string) (*DNSRecord, error)
- func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bool, ...) (string, error)
- func (c Client) DeleteDNSRecords(dnsRecord *DNSRecord) error
- func (c Client) DestroyNodes(nodeIDs []string) error
- func (c Client) GetDNSRecords() ([]*route53.ResourceRecordSet, error)
- func (c Client) GetNode(id string) (*Node, error)
- type ClientConfig
- type Credentials
- type DNSRecord
- type EFSDisk
- type InstanceType
- type Node
Constants ¶
const ( // StateAvailable is the AWS string returned when machine is available StateAvailable = ec2.StateAvailable // Ubuntu1604LTSEast is the AMI for Ubuntu 16.04 LTS Ubuntu1604LTSEast = AMI("ami-29f96d3e") // CentOS7East is the AMI for CentOS 7 CentOS7East = AMI("ami-6d1c2007") // RedHat7East is the AMI for RedHat 7 RedHat7East = AMI("ami-c998b6b2") // T2Micro is the T2 Micro instance type T2Micro = InstanceType(ec2.InstanceTypeT2Micro) // T2Medium is the T2 Medium instance type T2Medium = InstanceType(ec2.InstanceTypeT2Medium) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Config ClientConfig Credentials Credentials // contains filtered or unexported fields }
Client for provisioning machines on AWS
func (Client) BuildEFSDisk ¶
NOTE: Building EFS file systems and mount points takes time and the only cost is storage. So rather than create a new one each time and destroy it, as we do with instances, we create if it's not there and reuse if it is.
func (Client) CreateDNSRecords ¶
CreateDNSRecords generates an Route53 configured with the master nodes
func (Client) CreateNode ¶
func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bool, customTags map[string]string) (string, error)
CreateNode is for creating a machine on AWS using the given AMI and InstanceType. Returns the ID of the newly created machine.
func (Client) DeleteDNSRecords ¶
DeleteDNSRecords deletes the specified Record Set
func (Client) DestroyNodes ¶
DestroyNodes destroys the nodes identified by the ID.
func (Client) GetDNSRecords ¶
func (c Client) GetDNSRecords() ([]*route53.ResourceRecordSet, error)
GetDNSRecords returns all Record Sets for the Hosted Zone
type ClientConfig ¶
type ClientConfig struct { Region string SubnetID string Keyname string SecurityGroupID string HostedZoneID string }
ClientConfig of the AWS client
type Credentials ¶
Credentials to be used for accessing the AI