Documentation ¶
Index ¶
Constants ¶
View Source
const (
EnvVarTCPNoDelay = "MM_LOADTEST_TCPNODELAY"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AWSProfile is the name of the AWS profile to use for all AWS commands AWSProfile string `default:"mm-loadtest"` // AWSRegion is the region used to deploy all resources. AWSRegion string `default:"us-east-1"` // AWSAMI is the AMI to use for all EC2 instances. AWSAMI string `default:"ami-0fa37863afb290840"` // ClusterName is the name of the cluster. ClusterName string `default:"loadtest" validate:"alpha"` // ClusterVpcID is the id of the VPC associated to the resources. ClusterVpcID string // ClusterSubnetID is the id of the subnet associated to the resources. ClusterSubnetID string // Number of application instances. AppInstanceCount int `default:"1" validate:"range:[0,)"` // Type of the EC2 instance for app. AppInstanceType string `default:"c5.xlarge" validate:"notempty"` // Number of agents, first agent and coordinator will share the same instance. AgentInstanceCount int `default:"2" validate:"range:[1,)"` // Type of the EC2 instance for agent. AgentInstanceType string `default:"c5.xlarge" validate:"notempty"` // Logs the command output (stdout & stderr) to home directory. EnableAgentFullLogs bool `default:"true"` // Type of the EC2 instance for proxy. ProxyInstanceType string `default:"m4.xlarge" validate:"notempty"` // Path to the SSH public key. SSHPublicKey string `default:"~/.ssh/id_rsa.pub" validate:"notempty"` // Terraform database connection and provision settings. TerraformDBSettings TerraformDBSettings // External database connection settings ExternalDBSettings ExternalDBSettings // URL from where to download Mattermost release. // This can also point to a local binary path if the user wants to run loadtest // on a custom build. The path should be prefixed with "file://". In that case, // only the binary gets replaced, and the rest of the build comes from the latest // stable release. MattermostDownloadURL string `default:"https://latest.mattermost.com/mattermost-enterprise-linux" validate:"url"` // Path to the Mattermost EE license file. MattermostLicenseFile string `default:"" validate:"file"` // Optional path to a partial Mattermost config file to be applied as patch during // app server deployment. MattermostConfigPatchFile string `default:""` // Mattermost instance sysadmin e-mail. AdminEmail string `default:"sysadmin@sample.mattermost.com" validate:"email"` // Mattermost instance sysadmin user name. AdminUsername string `default:"sysadmin" validate:"notempty"` // Mattermost instance sysadmin password. AdminPassword string `default:"Sys@dmin-sample1" validate:"notempty"` // URL from where to download load-test-ng binaries and configuration files. // The configuration files provided in the package will be overridden in // the deployment process. LoadTestDownloadURL string `` /* 153-byte string literal not displayed */ ElasticSearchSettings ElasticSearchSettings JobServerSettings JobServerSettings LogSettings logger.Settings Report report.Config // Directory under which the .terraform directory and state files are managed. // It will be created if it does not exist TerraformStateDir string `default:"/var/lib/mattermost-load-test-ng" validate:"notempty"` // URI of an S3 bucket whose contents are copied to the bucket created in the deployment S3BucketDumpURI string `default:"" validate:"s3uri"` }
Config contains the necessary data to deploy and provision a load test environment.
func ReadConfig ¶
ReadConfig reads the configuration file from the given string. If the string is empty, it will return a config with default values.
type ElasticSearchSettings ¶
type ElasticSearchSettings struct { // Elasticsearch instances number. InstanceCount int // Elasticsearch instance type to be created. InstanceType string // Elasticsearch version to be deployed. Version float64 // Id of the VPC associated with the instance to be created. VpcID string // Set to true if the AWSServiceRoleForAmazonElasticsearchService role should be created. CreateRole bool }
ElasticSearchSettings contains the necessary data to configure an ElasticSearch instance to be deployed and provisioned.
type ExternalDBSettings ¶ added in v1.2.0
type ExternalDBSettings struct { // Mattermost database driver DriverName string `default:"" validate:"oneof:{mysql, postgres, cockroach}"` // DSN to connect to the database DataSource string `default:""` // DSN to connect to the database replicas DataSourceReplicas []string `default:""` // DSN to connect to the database search replicas DataSourceSearchReplicas []string `default:""` }
ExternalDBSettings contains the necessary data to configure an instance to be deployed and provisioned.
type JobServerSettings ¶ added in v1.3.0
type JobServerSettings struct { // Job server instances count. InstanceCount int `default:"0" validate:"range:[0,1]"` // Job server instance type to be created. InstanceType string `default:"c5.xlarge"` }
JobServerSettings contains the necessary data to deploy a job server.
type TerraformDBSettings ¶ added in v1.2.0
type TerraformDBSettings struct { // Number of DB instances. InstanceCount int `default:"1" validate:"range:[0,)"` // Type of the DB instance. InstanceType string `default:"db.r4.large" validate:"notempty"` // Type of the DB instance - postgres or mysql. InstanceEngine string `default:"aurora-postgresql" validate:"oneof:{aurora-mysql, aurora-postgresql}"` // Username to connect to the DB. UserName string `default:"mmuser" validate:"notempty"` // Password to connect to the DB. Password string `default:"mostest80098bigpass_" validate:"notempty"` // If set to true enables performance insights for the created DB instances. EnablePerformanceInsights bool `default:"false"` }
TerraformDBSettings contains the necessary data to configure an instance to be deployed and provisioned.
Click to show internal directories.
Click to hide internal directories.