cockroach: github.com/cockroachdb/cockroach/pkg/cmd/roachprod/vm/aws Index | Files | Directories

package aws

import "github.com/cockroachdb/cockroach/pkg/cmd/roachprod/vm/aws"

Index

Package Files

aws.go config.go embedded.go keys.go support.go

Constants

const ProviderName = "aws"

ProviderName is aws.

func Asset Uses

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDigest Uses

func AssetDigest(name string) ([sha256.Size]byte, error)

AssetDigest returns the digest of the file with the given name. It returns an error if the asset could not be found or the digest could not be loaded.

func AssetDir Uses

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"}, AssetDir("data/img") would return []string{"a.png", "b.png"}, AssetDir("foo.txt") and AssetDir("notexist") would return an error, and AssetDir("") will return []string{"data"}.

func AssetInfo Uses

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames Uses

func AssetNames() []string

AssetNames returns the names of the assets.

func AssetString Uses

func AssetString(name string) (string, error)

AssetString returns the asset contents as a string (instead of a []byte).

func Digests Uses

func Digests() (map[string][sha256.Size]byte, error)

Digests returns a map of all known files and their checksums.

func MustAsset Uses

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func MustAssetString Uses

func MustAssetString(name string) string

MustAssetString is like AssetString but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset Uses

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory.

func RestoreAssets Uses

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively.

type Provider Uses

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

Provider implements the vm.Provider interface for AWS.

func (*Provider) Active Uses

func (p *Provider) Active() bool

Active is part of the vm.Provider interface.

func (*Provider) CleanSSH Uses

func (p *Provider) CleanSSH() error

CleanSSH is part of vm.Provider. This implementation is a no-op, since we depend on the user's local identity file.

func (*Provider) ConfigSSH Uses

func (p *Provider) ConfigSSH() error

ConfigSSH ensures that for each region we're operating in, we have a <user>-<hash> keypair where <hash> is a hash of the public key. We use a hash since a user probably has multiple machines they're running roachprod on and these machines (ought to) have separate ssh keypairs. If the remote keypair doesn't exist, we'll upload the user's ~/.ssh/id_rsa.pub file or ask them to generate one.

func (*Provider) Create Uses

func (p *Provider) Create(names []string, opts vm.CreateOpts) error

Create is part of the vm.Provider interface.

func (*Provider) Delete Uses

func (p *Provider) Delete(vms vm.List) error

Delete is part of vm.Provider. This will delete all instances in a single AWS command.

func (*Provider) Extend Uses

func (p *Provider) Extend(vms vm.List, lifetime time.Duration) error

Extend is part of the vm.Provider interface. This will update the Lifetime tag on the instances.

func (*Provider) FindActiveAccount Uses

func (p *Provider) FindActiveAccount() (string, error)

FindActiveAccount is part of the vm.Provider interface. This queries the AWS command for the current IAM user or role.

func (*Provider) Flags Uses

func (p *Provider) Flags() vm.ProviderFlags

Flags is part of the vm.Provider interface.

func (*Provider) List Uses

func (p *Provider) List() (vm.List, error)

List is part of the vm.Provider interface.

func (*Provider) Name Uses

func (p *Provider) Name() string

Name is part of the vm.Provider interface. This returns "aws".

Directories

PathSynopsis
terraformgenCommand terraformgen generate the terraform file used to configure AWS for multiregion support.

Package aws imports 25 packages (graph) and is imported by 1 packages. Updated 2019-11-18. Refresh now. Tools for package owners.