provision

package
Version: v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 17 Imported by: 1

README

Provision

PkgGoDev

This package contains provisioning API calls to virtual private server providers.

Currently supported services include:

Documentation

Overview

Package provision contains Inertia's VPS instance provisioning API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2CreateInstanceOptions

type EC2CreateInstanceOptions struct {
	Name        string
	ProjectName string
	Ports       []int64
	DaemonPort  int64

	ImageID      string
	InstanceType string
	Region       string
}

EC2CreateInstanceOptions defines parameters with which to create an EC2 instance

type EC2Provisioner

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

EC2Provisioner creates Amazon EC2 instances

func NewEC2Provisioner

func NewEC2Provisioner(user, keyID, key string, out ...io.Writer) (*EC2Provisioner, error)

NewEC2Provisioner creates a client to interact with Amazon EC2 using the given credentials

func NewEC2ProvisionerFromEnv

func NewEC2ProvisionerFromEnv(user string, out ...io.Writer) (*EC2Provisioner, error)

NewEC2ProvisionerFromEnv creates a client to interact with Amazon EC2 using credentials from environment

func NewEC2ProvisionerFromProfile added in v0.4.3

func NewEC2ProvisionerFromProfile(user, profile, path string, out ...io.Writer) (*EC2Provisioner, error)

NewEC2ProvisionerFromProfile creates a client to interact with Amazon EC2 using credentials for user (optional) from given profile file

func (*EC2Provisioner) CreateInstance

func (p *EC2Provisioner) CreateInstance(opts EC2CreateInstanceOptions) (*cfg.Remote, error)

CreateInstance creates an EC2 instance with given properties

func (*EC2Provisioner) GetUser

func (p *EC2Provisioner) GetUser() string

GetUser returns the user attached to given credentials

func (*EC2Provisioner) ListImageOptions

func (p *EC2Provisioner) ListImageOptions(region string) ([]string, error)

ListImageOptions lists available Amazon images for your given region

func (*EC2Provisioner) WithRegion added in v0.5.1

func (p *EC2Provisioner) WithRegion(region string)

WithRegion assigns a region to the client

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL