digitalocean

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSHKEY          = "apprenda-key"
	KET_INSTALL_DIR = "/ket"
)

Variables

This section is empty.

Functions

func BlockUntilSSHOpen

func BlockUntilSSHOpen(host, publicIP, sshUser, sshKey string)

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

func Cmd

func Cmd() *cobra.Command

func DOCreateCmd

func DOCreateCmd() *cobra.Command

func DODeleteCmd

func DODeleteCmd() *cobra.Command

func ExecuteCmd

func ExecuteCmd(cmd, hostname, user, sshKey string) (string, error)

func GetProvisioner

func GetProvisioner() (*doProvisioner, bool)

func WaitForSSH

func WaitForSSH(ProvisionedNodes ProvisionedNodes, sshKey string) error

Types

type Client

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

Client for provisioning machines on AWS

func (Client) CreateKey

func (c Client) CreateKey(token string, config KeyConfig) (KeyConfig, error)

func (Client) CreateNode

func (c Client) CreateNode(token string, config NodeConfig, keyconfig KeyConfig) (Droplet, error)

func (Client) DeleteDropletsByTag

func (c Client) DeleteDropletsByTag(token string, tag string, keyname string) error

func (Client) DeleteKeyByName

func (c Client) DeleteKeyByName(token string, keyName string) error

func (Client) FindKeyByName

func (c Client) FindKeyByName(token string, keyName string) (KeyConfig, error)

func (Client) GetDroplet

func (c Client) GetDroplet(token string, dropletID int) (Droplet, error)

type DOOpts

type DOOpts struct {
	Token           string
	ClusterTag      string
	EtcdNodeCount   uint16
	MasterNodeCount uint16
	WorkerNodeCount uint16
	NoPlan          bool
	InstanceType    string
	WorkerType      string
	Image           string
	Region          string
	Storage         bool
	SSHUser         string
	SSHKeyName      string
	SSHPrivateKey   string
	SSHPublicKey    string
	BootstrapNode   bool
	RemoveKey       bool
	BootstrapFile   string
}

type Droplet

type Droplet struct {
	ID        int
	Name      string
	PrivateIP string
	PublicIP  string
	SSHUser   string
}

Droplet

type KeyConfig

type KeyConfig struct {
	ID            int
	Name          string
	PublicKeyFile string
	Fingerprint   string
}

type LinuxDistro

type LinuxDistro string

type NodeConfig

type NodeConfig struct {
	Image             string
	Name              string
	Region            string
	Size              string
	UserData          string
	Keys              []string
	Tags              []string
	PrivateNetworking bool
}

type NodeCount

type NodeCount struct {
	Etcd     uint16
	Master   uint16
	Worker   uint16
	Boostrap uint16
}

func (NodeCount) Total

func (nc NodeCount) Total() uint16

type ProvisionedNodes

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

type TokenSource

type TokenSource struct {
	AccessToken string
}

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Jump to

Keyboard shortcuts

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