cloudup

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2016 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEY_NAME = "name"
	KEY_TYPE = "_type"
)
View Source
const DefaultMasterMachineTypeAWS = "m3.large"
View Source
const DefaultMasterMachineTypeGCE = "n1-standard-2"
View Source
const DefaultNodeMachineTypeAWS = "t2.medium"
View Source
const DefaultNodeMachineTypeGCE = "n1-standard-2"
View Source
const MaxAttemptsWithNoProgress = 3
View Source
const TargetDirect = "direct"
View Source
const TargetDryRun = "dryrun"
View Source
const TargetTerraform = "terraform"

Variables

View Source
var EtcdClusters = []string{"main", "events"}

Functions

func BuildCloud

func BuildCloud(cluster *api.Cluster) (fi.Cloud, error)

func PopulateClusterSpec

func PopulateClusterSpec(cluster *api.Cluster, clusterRegistry *api.ClusterRegistry) (*api.Cluster, error)

PopulateClusterSpec takes a user-specified cluster spec, and computes the full specification that should be set on the cluster. We do this so that we don't need any real "brains" on the node side.

func PopulateInstanceGroupSpec

func PopulateInstanceGroupSpec(cluster *api.Cluster, input *api.InstanceGroup) (*api.InstanceGroup, error)

PopulateInstanceGroupSpec sets default values in the InstanceGroup The InstanceGroup is simpler than the cluster spec, so we just populate in place (like the rest of k8s)

Types

type ApplyClusterCmd

type ApplyClusterCmd struct {
	Cluster *api.Cluster

	InstanceGroups []*api.InstanceGroup

	// NodeUpSource is the location from which we download nodeup
	NodeUpSource string

	// Models is a list of cloudup models to apply
	Models []string

	// TargetName specifies how we are operating e.g. direct to GCE, or AWS, or dry-run, or terraform
	TargetName string

	// Target is the fi.Target we will operate against
	Target fi.Target

	// OutDir is a local directory in which we place output, can cache files etc
	OutDir string

	// Assets is a list of sources for files (primarily when not using everything containerized)
	// Formats:
	//  raw url: http://... or https://...
	//  url with hash: <hex>@http://... or <hex>@https://...
	Assets []string

	// ClusterRegistry manages the cluster configuration storage
	ClusterRegistry *api.ClusterRegistry

	// DryRun is true if this is only a dry run
	DryRun bool
}

func (*ApplyClusterCmd) Run

func (c *ApplyClusterCmd) Run() error

type Loader

type Loader struct {
	Cluster *api.Cluster

	WorkDir string

	ModelStore vfs.Path

	Tags              map[string]struct{}
	TemplateFunctions template.FuncMap

	Resources map[string]fi.Resource
	// contains filtered or unexported fields
}

func (*Loader) AddTypes

func (l *Loader) AddTypes(types map[string]interface{})

func (*Loader) BuildTasks

func (l *Loader) BuildTasks(modelStore vfs.Path, models []string) (map[string]fi.Task, error)

func (*Loader) Init

func (l *Loader) Init()

type SpecBuilder

type SpecBuilder struct {
	OptionsLoader *loader.OptionsLoader

	Tags map[string]struct{}
}

func (*SpecBuilder) BuildCompleteSpec

func (l *SpecBuilder) BuildCompleteSpec(clusterSpec *api.ClusterSpec, modelStore vfs.Path, models []string) (*api.ClusterSpec, error)

type TemplateFunctions

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

func (*TemplateFunctions) AddTo

func (tf *TemplateFunctions) AddTo(dest template.FuncMap)

func (*TemplateFunctions) AdminCIDR

func (tf *TemplateFunctions) AdminCIDR() (string, error)

AdminCIDR returns the single CIDR that is allowed access to the admin ports of the cluster (22, 443 on master)

func (*TemplateFunctions) EtcdClusterMemberTags

func (tf *TemplateFunctions) EtcdClusterMemberTags(etcd *api.EtcdClusterSpec, m *api.EtcdMemberSpec) map[string]string

func (*TemplateFunctions) IAMPrefix

func (tf *TemplateFunctions) IAMPrefix() string

IAMPrefix returns the prefix for AWS ARNs in the current region, for use with IAM it is arn:aws everywhere but in cn-north, where it is arn:aws-cn

func (*TemplateFunctions) IAMServiceEC2

func (tf *TemplateFunctions) IAMServiceEC2() string

IAMServiceEC2 returns the name of the IAM service for EC2 in the current region it is ec2.amazonaws.com everywhere but in cn-north, where it is ec2.amazonaws.com.cn

func (*TemplateFunctions) Image

func (tf *TemplateFunctions) Image(component string) (string, error)

Image returns the docker image name for the specified component

func (*TemplateFunctions) SharedVPC

func (tf *TemplateFunctions) SharedVPC() bool

SharedVPC is a simple helper function which makes the templates for a shared VPC clearer

func (*TemplateFunctions) WellKnownServiceIP

func (tf *TemplateFunctions) WellKnownServiceIP(id int) (net.IP, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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