aws

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 8 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")
	// 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

func RetryWithBackoff added in v1.0.1

func RetryWithBackoff(fn func() error, retries uint) error

RetryWithBackoff will retry a function specified number of times

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) 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) (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 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
}

A Node on AWS

Jump to

Keyboard shortcuts

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