deploy

package
v0.0.0-...-d58163c Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: GPL-3.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DeployOrder dictates what order the deployed components should happen in
	DeployOrder = []string{
		vpc,
		datastore,
		firehose,
		configs,
		secrets,
		autoscaling,
		carver,
	}

	ElasticDeployOrder = []string{
		vpc,
		datastore,
		elasticsearch,
		elasticsearchFirehose,
		elasticsearchConfig,
		secrets,
		elasticsearchAutoscaling,
		carver,
	}

	// OsqueryOpts holds all deploy options for osquery
	OsqueryOpts = []string{
		packs,
		configs,
		scripts,
	}
)

Functions

func AllComponents

func AllComponents(config DeploymentConfig, environ string) error

AllComponents deploys all components

func Component

func Component(config DeploymentConfig, component, envName string) error

Component deploys both aws components and osquery components

func CreateDeployDirectory

func CreateDeployDirectory(environ string) error

CreateDeployDirectory Creates deployment director based on environment

func CreateDirIfNotExists

func CreateDirIfNotExists(path string) error

CreateDirIfNotExists creates directory if it does not exist

func DestroyAllComponents

func DestroyAllComponents(config DeploymentConfig, envName string) error

DestroyAllComponents destroys all components, in reverse order

func DestroyComponent

func DestroyComponent(component, envName string) error

DestroyComponent is a wrapper to match the `deploy.Component` interface style

func FindAndReplace

func FindAndReplace(filename, original, replacement string) error

FindAndReplace finds a string and resplaces it with replacement

func SetS3Backend

func SetS3Backend(d DeploymentConfig, component string) error

func UserAwsCredFile

func UserAwsCredFile() (string, error)

UserAwsCredFile returns a users aws credential file from their home dir

func Wizard

func Wizard() error

Wizard walks through setting up an environment config and deploys

Types

type DeploymentConfig

type DeploymentConfig struct {
	Environment                 string   `json:"environment"`
	AWSProfile                  string   `json:"aws_profile"`
	UserIPAddress               string   `json:"user_ip_address"`
	SgtOsqueryResultsBucketName string   `json:"sgt_osquery_results_bucket_name"`
	SgtConfigBucketName         string   `json:"sgt_config_bucket_name"`
	Domain                      string   `json:"domain"`
	Subdomain                   string   `json:"subdomain"`
	AwsKeypair                  string   `json:"aws_keypair"`
	FullSslCertchain            string   `json:"full_ssl_certchain"`
	SslPrivateKey               string   `json:"ssl_private_key"`
	SgtNodeSecret               string   `json:"sgt_node_secret"`
	SgtAppSecret                string   `json:"sgt_app_secret"`
	CreateElasticsearch         int      `json:"create_elasticsearch"`
	AsgDesiredSize              int      `json:"asg_desired_size"`
	AWSRegion                   string   `json:"aws_region"`
	Users                       []string `json:"users"`
	MailDomain                  string   `json:"mail_domain"`
	TerraformBackendBucketName  string   `json:"terraform_backend_bucket_name"`
	AutoApproveNodes            string   `json:"auto_approve_nodes"`
}

DeploymentConfig configuration file used by all environment deployments

func ParseDeploymentConfig

func ParseDeploymentConfig(environ string) (DeploymentConfig, error)

ParseDeploymentConfig returns the loaded config given its path on disk or exits with status 1 on failure

Jump to

Keyboard shortcuts

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