fleet/infrastructure/loadtesting/terraform/infra/.header.md
Jorge Falcon e2085bfd86
Loadtesting documentation - Removes (Coming Soon) from README (#35649)
- Removes `(Coming Soon)` from
`infrastructure/loadtesting/infra/README.md` with regards to deployment
via Github Actions
- Moves Signoz steps to `.header.md` to preserve steps in generated
`README.md`
2025-11-12 16:54:14 -05:00

3.6 KiB

Deploy Loadtesting Infrastructure

Before we begin

Although deployments through the github action should be prioritized, for manual deployments you will need.

  • Terraform v1.10.2
  • Docker
  • Go

Additionally, refer to the Reference Architecture sizing recommendations for loadtest infrastructure sizing.

Deploy with Github Actions

Deploy/Destroy environment with Github Action

  1. Navigate to the github action

  2. On the top right corner, select the Run Workflow dropdown.

  3. Fill out the details for the deployment.

  4. After all details have been filled out, you will hit the green Run Workflow button, directly under the inputs. For terraform_action select Plan, Apply, or Destroy.

    • Plan will show you the results of a dry-run
    • Apply will deploy changes to the environment
    • Destroy will destroy your environment

Deploy environment manually

  1. Clone the repository

  2. Initialize terraform

    terraform init
    
  3. Create a new the terraform workspace or select an existing workspace for your environment. The terraform workspace will be used in different area's of Terraform to drive uniqueness and access to the environment.

    terraform workspace new <workspace_name>
    

    or, if your workspace already exists

    terraform workspace list
    terraform workspace select <workspace_name>
    
  4. Ensure that your new or existing workspace is in use.

    terraform workspace show
    
  5. Deploy the environment (will also trigger migrations automatically)

    Note: Terraform will prompt you for confirmation to trigger the deployment. If everything looks ok, submitting yes will trigger the deployment.

    terraform apply -var=tag=v4.72.0
    

    or, you can add the additional supported terraform variables, to overwrite the default values. You can choose which ones are included/overwritten. If a variable is not defined, the default value configured in ./variables.tf is used.

    Below is an example with all available variables.

    terraform apply -var=tag=v4.72.0 -var=fleet_task_count=20 -var=fleet_task_memory=4096 -var=fleet_task_cpu=512 -var=database_instance_size=db.t4g.large -var=database_instance_count=3 -var=redis_instance_size=cache.t4g.small -var=redis_instance_count=3 -var=enable_otel=true
    

OpenTelemetry tracing with SigNoz

By default, the loadtest environment uses Elastic APM. You can optionally use OpenTelemetry with SigNoz instead by setting enable_otel=true:

terraform apply -var=tag=v4.72.0 -var=enable_otel=true

This deploys both Fleet and SigNoz in a single command. See ../signoz/README.md for architecture details.

Accessing the SigNoz UI

After deploying with enable_otel=true, get the SigNoz UI URL:

$(terraform output -raw signoz_configure_kubectl) && kubectl get svc signoz -n signoz -o jsonpath='http://{.status.loadBalancer.ingress[0].hostname}:8080'

Destroy environment manually

  1. Clone the repository (if not already cloned)

  2. Initialize terraform

    terraform init
    
  3. Select your workspace

    terraform workspace list
    terraform workspace select <workspace_name>
    
  4. Destroy the environment

    terraform destroy
    

Delete the workspace

Once all resources have been removed from the terraform workspace, remove the terraform workspace.

terraform workspace delete <workspace_name>