cluster

package
v0.0.0-...-a9d5b60 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package cluster contains asset targets that generates the terraform file, prepare the infra, and bootstrap the cluster.

Index

Constants

View Source
const (
	// TfVarsFileName is the filename for Terraform variables.
	TfVarsFileName = "terraform.tfvars"

	// TfPlatformVarsFileName is a template for platform-specific
	// Terraform variable files.
	//
	// https://www.terraform.io/docs/configuration/variables.html#variable-files
	TfPlatformVarsFileName = "terraform.%s.auto.tfvars"
)

Variables

This section is empty.

Functions

func LoadMetadata

func LoadMetadata(dir string) (*types.ClusterMetadata, error)

LoadMetadata loads the cluster metadata from an asset directory.

Types

type Cluster

type Cluster struct {
	FileList []*asset.File
}

Cluster uses the terraform executable to launch a cluster with the given terraform tfvar and generated templates.

func (*Cluster) Dependencies

func (c *Cluster) Dependencies() []asset.Asset

Dependencies returns the direct dependency for launching the cluster.

func (*Cluster) Files

func (c *Cluster) Files() []*asset.File

Files returns the FileList generated by the asset.

func (*Cluster) Generate

func (c *Cluster) Generate(parents asset.Parents) (err error)

Generate launches the cluster and generates the terraform state file on disk.

func (*Cluster) Load

func (c *Cluster) Load(f asset.FileFetcher) (found bool, err error)

Load returns error if the tfstate file is already on-disk, because we want to prevent user from accidentally re-launching the cluster.

func (*Cluster) Name

func (c *Cluster) Name() string

Name returns the human-friendly name of the asset.

type Metadata

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

Metadata contains information needed to destroy clusters.

func (*Metadata) Dependencies

func (m *Metadata) Dependencies() []asset.Asset

Dependencies returns the direct dependencies for the metadata asset.

func (*Metadata) Files

func (m *Metadata) Files() []*asset.File

Files returns the FileList generated by the asset.

func (*Metadata) Generate

func (m *Metadata) Generate(parents asset.Parents) (err error)

Generate generates the metadata asset.

func (*Metadata) Load

func (m *Metadata) Load(f asset.FileFetcher) (found bool, err error)

Load is a no-op, because we never want to load broken metadata from the disk.

func (*Metadata) Name

func (m *Metadata) Name() string

Name returns the human-friendly name of the asset.

type TerraformVariables

type TerraformVariables struct {
	FileList []*asset.File
}

TerraformVariables depends on InstallConfig and Ignition to generate the terrafor.tfvars.

func (*TerraformVariables) Dependencies

func (t *TerraformVariables) Dependencies() []asset.Asset

Dependencies returns the dependency of the TerraformVariable

func (*TerraformVariables) Files

func (t *TerraformVariables) Files() []*asset.File

Files returns the files generated by the asset.

func (*TerraformVariables) Generate

func (t *TerraformVariables) Generate(parents asset.Parents) error

Generate generates the terraform.tfvars file.

func (*TerraformVariables) Load

func (t *TerraformVariables) Load(f asset.FileFetcher) (found bool, err error)

Load reads the terraform.tfvars from disk.

func (*TerraformVariables) Name

func (t *TerraformVariables) Name() string

Name returns the human-friendly name of the asset.

Directories

Path Synopsis
Package aws extracts AWS metadata from install configurations.
Package aws extracts AWS metadata from install configurations.
Package libvirt extracts libvirt metadata from install configurations.
Package libvirt extracts libvirt metadata from install configurations.
Package openstack extracts OpenStack metadata from install configurations.
Package openstack extracts OpenStack metadata from install configurations.

Jump to

Keyboard shortcuts

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