Documentation ¶
Overview ¶
Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved. See LICENSE.txt for license information.
Index ¶
- Variables
- type AlloyConfig
- type AlloyLiteralValue
- type DBCluster
- type DBInstance
- type DashboardData
- type ElasticSearchDomain
- type IAMAccess
- type Instance
- type Output
- func (o *Output) DBReaders() []string
- func (o *Output) DBWriter() string
- func (o *Output) HasAgents() bool
- func (o *Output) HasAppServers() bool
- func (o *Output) HasDB() bool
- func (o *Output) HasElasticSearch() bool
- func (o *Output) HasJobServer() bool
- func (o *Output) HasKeycloak() bool
- func (o *Output) HasMetrics() bool
- func (o *Output) HasProxy() bool
- func (o *Output) HasRedis() bool
- func (o *Output) HasS3Bucket() bool
- func (o *Output) HasS3Key() bool
- type PanelData
- type PyroscopeConfig
- type PyroscopeProfilingConfig
- type PyroscopeTarget
- type RedisInstance
- type S3Bucket
- type SecurityGroup
- type Tags
- type Terraform
- func (t *Terraform) ClearLicensesData() error
- func (t *Terraform) Config() *deployment.Config
- func (t *Terraform) Create(initData bool) error
- func (t *Terraform) DBStatus() (string, error)
- func (t *Terraform) Destroy() error
- func (t *Terraform) ExecuteCustomSQL() error
- func (t *Terraform) GetCoordinatorStatus() (coordinator.Status, error)
- func (t *Terraform) Info() error
- func (t *Terraform) IngestDump() error
- func (t *Terraform) IngestKeycloakDump() error
- func (t *Terraform) InjectAction(actionID string) (coordinator.Status, error)
- func (t *Terraform) OpenBrowserFor(resource string) error
- func (t *Terraform) OpenSSHFor(resource string) error
- func (t *Terraform) Output() (*Output, error)
- func (t *Terraform) RunSSHCommand(resource string, args []string) error
- func (t *Terraform) StartCoordinator(config *coordinator.Config) error
- func (t *Terraform) StartDB() error
- func (t *Terraform) StopCoordinator() (coordinator.Status, error)
- func (t *Terraform) StopDB() error
- func (t *Terraform) Sync() error
- func (t *Terraform) UploadDashboard(dashboard string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ( // Not found error ErrNotFound = fmt.Errorf("policy not found") )
Functions ¶
This section is empty.
Types ¶
type AlloyConfig ¶ added in v1.21.0
type AlloyConfig struct { Logging struct { Level string `alloy:"level,attr"` } `alloy:"logging,block"` PyroscopeWrite struct { Label string `alloy:",label"` Endpoint struct { URL string `alloy:"url,attr"` } `alloy:"endpoint,block"` } `alloy:"pyroscope.write,block,optional"` PyroscopeScrape struct { Label string `alloy:",label"` Targets []PyroscopeTarget `alloy:"targets,attr"` ForwardTo []AlloyLiteralValue `alloy:"forward_to,attr"` ProfilingConfig PyroscopeProfilingConfig `alloy:"profiling_config,block"` } `alloy:"pyroscope.scrape,block,optional"` }
func NewAlloyConfig ¶ added in v1.21.0
func NewAlloyConfig(mmTargets, ltTargets []string) AlloyConfig
type AlloyLiteralValue ¶ added in v1.21.0
type AlloyLiteralValue string
func (AlloyLiteralValue) AlloyTokenize ¶ added in v1.21.0
func (s AlloyLiteralValue) AlloyTokenize() []builder.Token
type DBCluster ¶
type DBCluster struct { Instances []DBInstance `json:"instances"` ClusterIdentifier string `json:"cluster_identifier"` }
DBCluster defines a RDS cluster instance resource.
type DBInstance ¶ added in v1.22.0
DBInstance defines an RDS instance resource.
type DashboardData ¶ added in v1.15.0
type DashboardData struct {
Panels []PanelData
}
type ElasticSearchDomain ¶
ElasticSearchDomain is an AWS Elasticsearch domain.
type IAMAccess ¶
IAMAccess is a set of credentials that allow API requests to be made as an IAM user.
type Instance ¶
type Instance struct { PrivateIP string `json:"private_ip"` PublicIP string `json:"public_ip"` PublicDNS string `json:"public_dns"` PrivateDNS string `json:"private_dns"` Tags Tags `json:"tags"` }
Instance is an AWS EC2 instance resource.
type Output ¶
type Output struct { ClusterName string Proxies []Instance `json:"proxies"` Instances []Instance `json:"instances"` DBCluster DBCluster `json:"dbCluster"` Agents []Instance `json:"agents"` MetricsServer Instance `json:"metricsServer"` ElasticSearchServer ElasticSearchDomain `json:"elasticServer"` ElasticSearchRoleARN string `json:"elasticRoleARN"` JobServers []Instance `json:"jobServers"` S3Bucket S3Bucket `json:"s3Bucket"` S3Key IAMAccess `json:"s3Key"` DBSecurityGroup []SecurityGroup `json:"dbSecurityGroup"` KeycloakServer Instance `json:"keycloakServer"` KeycloakDatabaseCluster DBCluster `json:"keycloakDatabaseCluster"` RedisServer RedisInstance `json:"redisServer"` }
Output contains the output variables which are created after a deployment.
func (*Output) HasAgents ¶ added in v1.10.0
HasAgents returns whether a deployment includes agent instances.
func (*Output) HasAppServers ¶
HasAppServers returns whether a deployment includes app server instances.
func (*Output) HasDB ¶ added in v1.2.0
HasDB returns whether a deployment has database installed in it or not.
func (*Output) HasElasticSearch ¶
HasElasticSearch returns whether a deployment has ElasticSaearch installed in it or not.
func (*Output) HasJobServer ¶ added in v1.3.0
HasJobServer returns whether a deployment has a dedicated job server.
func (*Output) HasKeycloak ¶ added in v1.17.0
HasKeycloak returns whether a deployment has Keycloak installed in it or not.
func (*Output) HasMetrics ¶
HasMetrics returns whether a deployment includes the metrics instance.
func (*Output) HasRedis ¶ added in v1.20.0
HasRedis returns whether a deployment has Redis installed in it or not.
func (*Output) HasS3Bucket ¶
HasS3Bucket returns whether a deployment includes the S3 Bucket.
type PyroscopeConfig ¶ added in v1.11.0
type PyroscopeConfig struct { Server struct { HTTPListenPort int `yaml:"http_listen_port"` } `yaml:"server"` Limits struct { MaxQueryLookback model.Duration `yaml:"max_query_lookback"` } `yaml:"limits"` SelfProfiling struct { DisablePush bool `yaml:"disable_push"` } `yaml:"self_profiling"` }
func NewPyroscopeConfig ¶ added in v1.11.0
func NewPyroscopeConfig() PyroscopeConfig
type PyroscopeProfilingConfig ¶ added in v1.21.0
type PyroscopeProfilingConfig struct { ProcessCPU struct { Enabled bool `alloy:"enabled,attr"` } `alloy:"profile.process_cpu,block"` Memory struct { Enabled bool `alloy:"enabled,attr"` } `alloy:"profile.memory,block"` Block struct { Enabled bool `alloy:"enabled,attr"` } `alloy:"profile.block,block"` Goroutine struct { Enabled bool `alloy:"enabled,attr"` } `alloy:"profile.goroutine,block"` }
type PyroscopeTarget ¶ added in v1.21.0
type RedisInstance ¶ added in v1.20.0
type SecurityGroup ¶ added in v1.10.0
SecurityGroup is an AWS security group resource.
type Tags ¶
type Tags struct {
Name string `json:"Name"`
}
Tags are the values attached to resource.
type Terraform ¶
type Terraform struct {
// contains filtered or unexported fields
}
Terraform manages all operations related to interacting with an AWS environment using Terraform.
func New ¶
func New(id string, cfg deployment.Config) (*Terraform, error)
New returns a new Terraform instance.
func (*Terraform) ClearLicensesData ¶ added in v1.17.0
ClearLicensesData runs a SQL query to delete all data from old licenses in the database. It does it by first stopping the server, then running the query, then restarting the server again.
func (*Terraform) Config ¶ added in v1.3.0
func (t *Terraform) Config() *deployment.Config
Config returns the deployment config associated with the Terraform instance.
func (*Terraform) ExecuteCustomSQL ¶ added in v1.17.0
ExecuteCustomSQL executes provided custom SQL files in the app instances.
func (*Terraform) GetCoordinatorStatus ¶
func (t *Terraform) GetCoordinatorStatus() (coordinator.Status, error)
GetCoordinatorStatus returns information about the status of the coordinator in the current load-test deployment.
func (*Terraform) IngestDump ¶ added in v1.10.0
IngestDump works on an already deployed terraform setup and restores the DB dump file to the Mattermost server. It uses the deployment config for the dump URI.
func (*Terraform) IngestKeycloakDump ¶ added in v1.17.0
func (*Terraform) InjectAction ¶ added in v1.10.0
func (t *Terraform) InjectAction(actionID string) (coordinator.Status, error)
InjectAction injects a named action for all agents that is run once.
func (*Terraform) OpenBrowserFor ¶
OpenBrowserFor opens a web browser for the resource
func (*Terraform) OpenSSHFor ¶
OpenSSHFor starts a ssh connection to the resource
func (*Terraform) Output ¶
Output reads the current terraform output and caches it internally for future use. The output is guaranteed to be up to date after calls to Create and Destroy.
func (*Terraform) RunSSHCommand ¶ added in v1.3.0
RunSSHCommand runs a command on a given machine.
func (*Terraform) StartCoordinator ¶
func (t *Terraform) StartCoordinator(config *coordinator.Config) error
StartCoordinator starts the coordinator in the current load-test deployment.
func (*Terraform) StopCoordinator ¶
func (t *Terraform) StopCoordinator() (coordinator.Status, error)
StopCoordinator stops the coordinator in the current load-test deployment.