29 Commits
Author SHA1 Message Date
Konstantin Sykulev 6613872eda Terraform for mock AMAPI for loading testing (#48919)
Related issue: Resolves https://github.com/fleetdm/fleet/issues/26225

## Testing
- [x] QA'd all new/changed functionality manually

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Added an Android AMAPI mock service for load testing.
- Added configurable image version selection and optional Google API
request forwarding.
- Added routing for mock and API requests through the internal load
balancer.
- Added secure storage and optional access to Google service-account
credentials.
- Exposed the mock service endpoint for downstream load-test
configuration.
- Configured the load-testing environment to use the new internal proxy
endpoint.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-05 13:04:19 -05:00
Victor Lyuboslavsky 05b44f9473 Updated loadtest from recent Windows run. (#49832)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #48340 


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Enabled enhanced database performance monitoring for load-testing
environments.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-23 12:00:00 -05:00
Victor Lyuboslavsky 426de4e5a8 Loadtest: make MySQL max open conns tunable (#44802) (#48472)
Replace the hardcoded FLEET_MYSQL_MAX_OPEN_CONNS=10 in the loadtest
terraform (both the root ecs.tf stack and the infra/ stack) with a
mysql_max_open_conns variable, applied to both the writer and
read-replica pools.

Also document per-tier connection pool sizing in the AWS reference
architecture: 20 for R-class instances (25k+ hosts), 10 for the smaller
T-class instances (5k/10k hosts) whose low default max_connections
(~90/135) leaves little headroom.

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #44802



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a configurable setting for MySQL connection limits in the load
testing environment.
* Connection settings now use a shared input value instead of fixed
defaults, making it easier to tune database load behavior across
container types.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-04 06:48:22 +01:00
Victor Lyuboslavsky 67fce02a29 Updated TF to use OTEL deployment.environment best practice (#47651)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #47573



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated observability and telemetry configuration for improved
deployment monitoring.
* Enhanced infrastructure environment variables including logging,
database connection management, and Fleet service settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-16 10:18:39 +01:00
Tim Lee 60cd943643 Add Redis 8.x/Valkey CI test matrix and optional Valkey loadtests (#47180) 2026-06-12 07:26:22 -06:00
Victor Lyuboslavsky 408764c953 Fixes several loadtest issues (#47006)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35405

- fixes broken osquery_perf
- lower max connection lifetime so that loadtest can spread load across
readers faster (we often cause issues and need to recover)
- fixed broken signoz `terraform destroy`
- added README.md for pmm

# Checklist for submitter

## Testing

- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Improved load-testing image build process for more reliable binary
creation.
* Reduced MySQL connection pool timeouts to recycle connections more
frequently.
* Added robust, idempotent infrastructure cleanup steps during teardown
to avoid resource finalizer hangs and release cloud load balancers and
volumes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-08 16:23:00 +01:00
Konstantin Sykulev 6dfcee310a adding PMM to loadtest environment (#45567)
Taking local PMM setup from
https://github.com/fleetdm/fleet/tree/main/tools/percona/pmm and
adapting it to be an optional component to spin up for load tests.

## Testing

- [x] QA'd all new/changed functionality manually



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added an internal PMM UI URL and admin-password secret for easier
access.
* Enabled internal HTTPS on the load balancer and exposed ALB/RDS
integration information for workplace-scoped routing and DNS.

* **Chores**
  * Deploy PMM on ECS Fargate behind the internal load balancer.
* Automatically store PMM admin password and register MySQL monitoring
using stored credentials.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/45567?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-19 13:26:13 -05:00
Jorge Falcon 66b2908042 Load test - Enable standard performance insights (#44694)
- Enable `standard` RDS database performance insights

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **Chores**
* Enhanced database monitoring capabilities by enabling Database
Insights for load testing infrastructure.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 16:23:38 -04:00
Jorge Falcon 1c95f5c886 Load test terraform fixes (#44678)
- Disable performance insights
- Allow redis instance count >=1
- Properly set ecs_cluster logging config path
- Targeted apply with auto approve for pre-creating fleet and execution
roles

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced ECS cluster logging with CloudWatch integration and extended
log retention to 365 days.
* Adjusted RDS monitoring configuration and disabled performance
insights for operational optimization.
* Reduced minimum Redis instance requirement from 3 to 1 for greater
deployment flexibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 13:59:01 -05:00
Jorge Falcon 473fbffff5 Terraform module updates (#43543) 2026-04-29 17:18:40 -05:00
Jorge Falcon 34cb7ab6d1 Loadtest internal alb logging and osquery-perf scaling updates (#42581)
- Configures internal alb to log to the same bucket as the public alb
- Adds support for osquery-perf task size (cpu/memory) configuration
- Updates defaults for osquery-perf extra_flags
- Updates default enroll.sh loop sleep_time from 60s -> 300s
2026-03-31 11:15:07 -04:00
Jorge Falcon 2d09916f60 Fix loadtest/infra docker_image resource (#42537)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves # N/A

- Resolves an issue that prevents some locally pulled docker images from
being pushed to ECR.
2026-03-27 01:17:37 -04:00
Jorge Falcon 42b02483d4 Dogfood & Loadtest - Updating mysql engine version to 8.0.mysql_aurora.3.10.3 (#42120)
- Bumps Dogfood and Loadtest environment Aurora MySQL engine verison
from `8.0.mysql_aurora.3.08.2` -> `8.0.mysql_aurora.3.10.3`
2026-03-19 21:05:24 -05:00
Jorge Falcon 115e00decd Configure software_installers defaults in Loadtest terraform (#41207)
- Adds software_installers {} configuration to loadtest terraform
- Modifies template/cloudfront.tf.disabled to use pkcs#8 format for the
private key
2026-03-19 20:17:54 -04:00
Jorge Falcon 45c4e47fab Dogfood and loadtest - mysql require secure transport on (#40211)
- Adds require_secure_transport for mysql connections to the db_cluster
parameter group for dogfood and loadtest environments.

```
    db_cluster_parameters = {
      require_secure_transport = "ON"
    }
```
2026-02-20 15:57:10 -05:00
Robert FairburnandJorge Falcon dac2ef18f0 Ensure terraform docker compatibility with github actions (#39988)
Co-authored-by: Jorge Falcon <22119513+BCTBB@users.noreply.github.com>
2026-02-17 15:09:50 -05:00
Robert Fairburn 9f60dadae0 Allow gzip responses (#39700) 2026-02-12 10:24:49 -06:00
Jorge Falcon 502351dcde Add FLEET_MYSQL_READ_REPLICA_TLS_CONFIG environment variable to dogfood and loadtesting (#39692)
- Adds `FLEET_MYSQL_READ_REPLICA_TLS_CONFIG = "custom"` to dogfood and
loadtesting environments.
2026-02-11 13:05:11 -05:00
Jorge Falcon 7ac24d8752 Loadtest (new) - MDM Updates (#37420)
- Adds `FLEET_DEV_MDM_APPLE_DISABLE_PUSH = 1`
- Adds `FLEET_DEV_MDM_APPLE_DISABLE_DEVICE_INFO_CERT_VERIFY = 1`
- Updates osquery_perf/README.md, providing an example fetching and
using mdm scep challenge secret.
2025-12-17 17:55:13 -05:00
Jorge Falcon fb5c90ad9c Dogfood and loadtest module updates (#35990)
Updates `module.main` to `1.18.3` (dogfood)
- Adds `memory_tracking_target_value = 70` (dogfood and loadtesting)
- Adds `cpu_tracking_target_value = 70`  (dogfood and loadtesting)

Updates `module.migrations` to `2.2.1` (dogfood)
- Adds `max_capacity`

Updates `module.logging_alb` to `1.6.2` (dogfood)

Updates `module.monitoring` to `1.8.0` (dogfood)
- Adds `log_monitoring` configuration
2025-11-19 22:04:17 -05:00
George Karr ca5d02d471 Adding changes for Fleet v4.76.1 (#35760) 2025-11-18 14:35:31 -06:00
Jorge Falcon 776cd67647 Loadtest - Firehose logging removal, adds filesystem logging, and module updates (#35735)
- Removes `firehose` logging from loadtesting environment
- Sets `filesystem` logging in loadtesting environment
- Updates fleet image to 4.76.0 as the default value
- Updates `migrations` and `logging_alb` modules with latest versions
2025-11-13 19:16:00 -05:00
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
Victor Lyuboslavsky 73501e5755 Infra changes after latest loadtest (#35083)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34500

Terraform changes after my latest loadtest.

VPC consolidation: updated (and deployed) shared VPC so that Signoz
backend can now use it

  - Removed eks-vpc/ directory
  - Moved VPC management to shared/vpc.tf
  - Updated shared/init.tf to reflect VPC changes

  Infra improvements

- infra/internal_alb.tf - changed suffix from -internal to -int since I
hit max 32 characters issue

OTEL

- OTEL Collector configuration overrides for production stability
2025-11-03 11:02:15 -06:00
Jorge Falcon 6ea9185c1c Loadtesting - osquery_perf docker image build fixes (#34901)
- Bumps docker provider from 2.16.0 to 3.6.x
- Moves builds from `docker_registry_image` to new `docker_image`
resource
2025-10-29 08:33:46 -04:00
Robert FairburnandJorge Falcon 30c4798ec6 Switch git providers for loadtesting tf (#34180)
untested end-to-end but works as a replacement for plans and doesn't
require a local arm64 build to work.

Co-authored-by: Jorge Falcon <22119513+BCTBB@users.noreply.github.com>
2025-10-23 14:53:13 -04:00
Victor Lyuboslavsky e4e3c3f9ff Fix issues with OTEL SigNoz deployments for loadtests (#34694)
SigNoz converted from child module to standalone root module with
independent state.

  **Critical Impact**

  Deployment order is now required:
  1. Deploy infrastructure/loadtesting/terraform/signoz/ FIRST
  2. Then deploy infrastructure/loadtesting/terraform/infra/

  Communication between modules via Terraform remote state.

  **Key Configuration Changes**

  - SigNoz creates its own EKS cluster: signoz-${workspace}
- Instance type: t3.xlarge (upgraded from t3.large for resource
headroom)
  - ClickHouse disk: 200Gi (was 20Gi) with 2-day retention
  - Resource limits configured to prevent OOMKills during loadtest
  - wait_for_jobs = false to avoid Helm deployment deadlock


<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #32331
2025-10-23 12:49:36 -05:00
Victor Lyuboslavsky aef9b8400c Added terraform files for Signoz OTEL backend. (#34058)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #32331 

This PR allows us to run loadtest with SigNoz OTEL backend by adding
`-var=enable_otel=true`
SigNoz is deployed via Helm chart.

Enhancements needed (in future PR):
- put SigNoz UI behind VPN
- combine the new eks-vpc with shared fleet-vpc
- make SigNoz shared, so multiple loadtests use the same instance? (But
what about updating to it to latest version?)

Next steps:
- Enable SigNoz in Dogfood environment
- SigNoz by default [keeps 15 days of logs and
traces](https://signoz.io/docs/userguide/retention-period), which is
quite a bit. How much would that cost us and should we reduce it?

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Optional OpenTelemetry tracing with SigNoz via a new enable_otel flag.
- Conditional deployment of a SigNoz stack (managed EKS, storage,
Helm-based apps) with internal OTLP collector endpoint.
- New outputs to retrieve OTLP endpoint, cluster name, and a kubectl
configuration command.

- Documentation
  - Added guidance for deploying and using SigNoz with load testing.
  - Updated examples to include -var=enable_otel=true.

- Chores
- Introduced required providers to support Helm and Kubernetes
resources.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-10 21:53:04 -05:00
Jorge Falcon e952ef06c0 Loadtesting IAC updates (#32629)
# Github Actions (New)
- New workflow to deploy/destroy loadtest infrastructure with one-click
(Needs to be tested)
- Common inputs drive configuration and deployment of loadtest
infrastructure
    - tag
    - fleet_task_count
    - fleet_task_memory
    - fleet_task_cpu
    - fleet_database_instance_size
    - fleet_database_instance_count
    - fleet_redis_instance_size
    - fleet_redis_instance_count
    - terraform_workspace
    - terraform_action
- New workflow to deploy/destroy osquery-perf to loadtest infrastructure
with one-click (Needs to be tested)
- Common inputs drive configuration and deployment of osquery-perf
resources
    - tag
    - git_branch
    - loadtest_containers
    - extra_flags
    - terraform_workspace
    - terraform_action
- New workflow to deploy shared loadtest resources with one-click (Needs
to be tested)

# Loadtest Infrastructure (New)
- New directory (`infrastructure/loadtesting/terraform/infra`) for
one-click deployment
- Loadtest environment updated to use [fleet-terraform
modules](https://github.com/fleetdm/fleet-terraform)
- [Deployment documentation
updated](https://github.com/fleetdm/fleet/blob/0c254bca4018bcf2421ae37f652f9191fb028adf/infrastructure/loadtesting/terraform/infra/README.md)
to reflect new steps

# Osquery-perf deployment (New)
- New directory (`infrastructure/loadtesting/terraform/osquery-perf`)
for the deployment of osquery-perf
- osquery-perf updated to use [fleet-terraform
modules](https://github.com/fleetdm/fleet-terraform)
- [Deployment documentation
updated](https://github.com/fleetdm/fleet/tree/0c254bca4018bcf2421ae37f652f9191fb028adf/infrastructure/loadtesting/terraform/osquery_perf)
to reflect new steps
2025-10-08 15:31:37 -04:00