aws

package
v1.3.1-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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-b63769a1")
	// 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 AMI

type AMI string

AMI is the Amazon Machine Image

type Client

type Client struct {
	Config      ClientConfig
	Credentials Credentials
	// contains filtered or unexported fields
}

Client for provisioning machines on AWS

func (Client) BuildEFSDisk added in v1.2.0

func (c Client) BuildEFSDisk(which string) *EFSDisk

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 added in v1.0.1

func (c Client) CreateDNSRecords(nodeIPs []string) (*DNSRecord, error)

CreateDNSRecords generates an Route53 configured with the master nodes

func (Client) CreateNode

func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bool) (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 added in v1.0.1

func (c Client) DeleteDNSRecords(dnsRecord *DNSRecord) error

DeleteDNSRecords deletes the specified Record Set

func (Client) DestroyNodes

func (c Client) DestroyNodes(nodeIDs []string) error

DestroyNodes destroys the nodes identified by the ID.

func (Client) GetDNSRecords added in v1.0.1

func (c Client) GetDNSRecords() ([]*route53.ResourceRecordSet, error)

GetDNSRecords returns all Record Sets for the Hosted Zone

func (Client) GetNode

func (c Client) GetNode(id string) (*Node, error)

GetNode returns information about a specific node. The consumer of this method is responsible for checking that the information it needs has been returned in the Node. (i.e. it's possible for the hostname, public IP to be empty)

type ClientConfig

type ClientConfig struct {
	Region          string
	SubnetID        string
	Keyname         string
	SecurityGroupID string
	HostedZoneID    string
}

ClientConfig of the AWS client

type Credentials

type Credentials struct {
	ID     string
	Secret string
}

Credentials to be used for accessing the AI

type DNSRecord added in v1.0.1

type DNSRecord struct {
	Name   string
	Values []string
}

DNSRecord in Router53 on AWS

type EFSDisk added in v1.2.0

type EFSDisk struct {
	Name         string
	IpAddress    string
	FileSystemId string
}

type InstanceType

type InstanceType string

InstanceType is the type of the Amazon machine

type Node

type Node struct {
	PrivateDNSName string
	PrivateIP      string
	PublicIP       string
	SSHUser        string
	State          string
	ImageID        string
}

A Node on AWS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL