aws

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Ubuntu1604LTSEast is the AMI for Ubuntu 16.04 LTS
	Ubuntu1604LTSEast = AMI("ami-40d28157")
	// CentOS7East is the AMI for CentOS 7
	CentOS7East = AMI("ami-6d1c2007")
	// Redhat7East is the AMI for RedHat 7
	RedHat7East = AMI("ami-b63769a1")
)
View Source
const (
	Ubuntu1604LTS = LinuxDistro("ubuntu1604LTS")
	CentOS7       = LinuxDistro("centos7")
	Redhat7       = LinuxDistro("redhat7")

	AWSTargetRegion = "us-east-1"
	AWSKeyName      = "kismatic-integration-testing"
)

Variables

View Source
var (
	NodeBlueprintMap = make(map[string]NodeBlueprint)
)

Functions

func AWSClientFromEnvironment

func AWSClientFromEnvironment() (*awsProvisioner, bool)

func AWSCreateCmd

func AWSCreateCmd() *cobra.Command

func AWSCreateMinikubeCmd

func AWSCreateMinikubeCmd() *cobra.Command

func AWSDeleteCmd

func AWSDeleteCmd() *cobra.Command

func BlockUntilSSHOpen

func BlockUntilSSHOpen(publicIP, sshUser, sshKey string)

BlockUntilSSHOpen waits until the node with the given IP is accessible via SSH.

func Cmd

func Cmd() *cobra.Command

func WaitForSSH

func WaitForSSH(ProvisionedNodes ProvisionedNodes, sshKey string) error

Types

type AMI

type AMI string

AMI is the Amazon Machine Image

type AWSOpts

type AWSOpts struct {
	EtcdNodeCount   uint16
	MasterNodeCount uint16
	WorkerNodeCount uint16
	LeaveArtifacts  bool
	RunKismatic     bool
	NoPlan          bool
	ForceProvision  bool
	KeyPairName     string
	InstanceType    string
	OS              string
	Storage         bool
}

type Client

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

Client for provisioning machines on AWS

func (Client) CreateNode

func (c Client) CreateNode(ami AMI, instanceType InstanceType, size int64) (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) DestroyNodes

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

DestroyNodes destroys the nodes identified by the ID.

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)

func (Client) GetNodes

func (c Client) GetNodes() ([]string, error)

func (*Client) MaybeProvisionIG

func (c *Client) MaybeProvisionIG(vpc string) (string, error)

func (*Client) MaybeProvisionKeypair

func (c *Client) MaybeProvisionKeypair(keyloc string) error

func (*Client) MaybeProvisionRoute

func (c *Client) MaybeProvisionRoute(vpc, igw, subnet string) (string, error)

func (*Client) MaybeProvisionSGs

func (c *Client) MaybeProvisionSGs(vpc string) (string, error)

func (*Client) MaybeProvisionSubnet

func (c *Client) MaybeProvisionSubnet(vpc string) (string, error)

func (*Client) MaybeProvisionVPC

func (c *Client) MaybeProvisionVPC() (string, error)

func (Client) TagResourceName

func (c Client) TagResourceName(resourceId *string, name string) error

type ClientConfig

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

ClientConfig of the AWS client

type CompositeError

type CompositeError struct {
	// contains filtered or unexported fields
}

An Error made up of many contributing errors that all have equal weight (e.g. do not form a stack)

func (CompositeError) Error

func (c CompositeError) Error() string

type Credentials

type Credentials struct {
	ID     string
	Secret string
}

Credentials to be used for accessing the AI

type InstanceType

type InstanceType string

InstanceType is the type of the Amazon machine

type LinuxDistro

type LinuxDistro string

type Node

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

A Node on AWS

type NodeBlueprint

type NodeBlueprint struct {
	EtcdInstanceType   InstanceType
	EtcdDisk           int64
	MasterInstanceType InstanceType
	MasterDisk         int64
	WorkerInstanceType InstanceType
	WorkerDisk         int64
}

type NodeCount

type NodeCount struct {
	Etcd   uint16
	Master uint16
	Worker uint16
}

func (NodeCount) Total

func (nc NodeCount) Total() uint16

type ProvisionedNodes

type ProvisionedNodes struct {
	Etcd   []plan.Node
	Master []plan.Node
	Worker []plan.Node
}

Jump to

Keyboard shortcuts

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