config

package
v0.0.0-...-1127b50 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	Enabled bool `yaml:"enabled"`

	// Route53Domain is the route 53 domain to set up the cluster in.
	Route53Domain string `yaml:"route53_domain"`

	// VPCID is the VPC ID to set up AWS instances in.
	VPCID string `yaml:"vpc_id"`

	// The AMI to use.
	AMI string `yaml:"ami"`
}

AWSConfig is configuration for the AWS provider.

type BuilderConfig

type BuilderConfig struct {
	// SkipBuild indicates whether we should skip building Teleport.
	SkipBuild bool `yaml:"skip_build"`

	// SourceDir is the source directory for Teleport.
	SourceDir string `yaml:"source_dir"`

	// BuildType is the what type of Teleport binary to generate.
	BuildType string `yaml:"build_type"`
}

BuilderConfig is configuration for the Teleport builder.

type ClusterConfig

type ClusterConfig struct {
	// StoreDir is a store for the local program state.
	StoreDir string `yaml:"store_dir"`

	// ServerConfig is the configuration for the Teleport server.
	ServerConfig string `yaml:"server_config"`

	// PrivateKeyFile is the private key file used to connect to remote instances.
	PrivateKeyFile string `yaml:"private_key_file,omitempty"`

	// PrivateKeyPassphrase is the passphrase to use for the private key.
	PrivateKeyPassphrase string `yaml:"private_key_passphrase,omitempty"`

	// PublicKeyFile is the public key file used to connect to remote instances.
	PublicKeyFile string `yaml:"public_key_file"`

	// LetsEncryptEmail is the e-mail address to use with let's encrypt.
	LetsEncryptEmail string `yaml:"lets_encrypt_email"`

	// License is the Teleport license.
	LicenseFile string `yaml:"license_file"`

	// TerraformConfig is the configuration for the Terraform client.
	TerraformConfig *TerraformConfig `yaml:"terraform"`

	// AWSConfig is the configuration for AWS provider (if used).
	AWSConfig *AWSConfig `yaml:"aws,omitempty"`

	// BuilderConfig is the configuration for the Teleport builder (if used).
	BuilderConfig *BuilderConfig `yaml:"builder"`

	// ProvisionerConfig is the configuration for the Teleport provisioner (if used).
	ProvisionerConfig *ProvisionerConfig `yaml:"provisioner"`

	// NodeConfigs is Teleport configuration files for each node.
	NodeConfigs map[string]NodeRolesAndConfig `yaml:"nodes"`
	// contains filtered or unexported fields
}

ClusterrConfig is the configuration for the cluster.

func (*ClusterConfig) GetLicense

func (c *ClusterConfig) GetLicense() []byte

GetLicense gets the contents of the license key file.

func (*ClusterConfig) GetPrivateKey

func (c *ClusterConfig) GetPrivateKey() []byte

GetPrivateKey gets the contents of the private key file.

func (*ClusterConfig) GetPublicKey

func (c *ClusterConfig) GetPublicKey() []byte

GetPublicKey gets the contents of the public key file.

type Config

type Config struct {
	// Log is the logger for the entire application.
	Log *logrus.Logger

	// ClusterName is the name of the cluster to operate on.
	ClusterName string

	// ClusterConfig is the cluster configuration.
	ClusterConfig *ClusterConfig
}

Config is a config for the entire deployment application.

func New

func New(log *logrus.Logger, clusterName, configFile string) (*Config, error)

New will create a new config file by loading most of the values from configFile.

type NodeRolesAndConfig

type NodeRolesAndConfig struct {
	Roles  []string `yaml:"roles"`
	Config string   `yaml:"config"`
}

NodeRoelsAndConfig contains the node rules and config.

type ProvisionerConfig

type ProvisionerConfig struct {
	// User is the user to use to SSH into a node.
	User string `yaml:"user"`

	// TeleportTarURL is the URL of the Teleport tarball to use. If this is used, the builder
	// will not be run and this URL will be downloaded instead.
	TeleportTarURL string `yaml:"teleport_tar_url"`
}

ProvisionerConfig is the configuration for the provisioner.

type TerraformConfig

type TerraformConfig struct {
	// ExecPath is an optional path to Terraform if a user wants to use a locally installed Terraform.
	ExecPath string `yaml:"exec_path"`

	// Version is the version of Terraform to install.
	Version string `yaml:"version"`
	// contains filtered or unexported fields
}

TerraformConfig is configuration for the Terraform exec wrapper.

func (*TerraformConfig) GetVersion

func (c *TerraformConfig) GetVersion() *version.Version

GetVersion returns the parsed version of the version string.

Jump to

Keyboard shortcuts

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