• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D15-Jul-2021875 3829

README.mdH A D15-Jul-20211.7 KiB3630

consul.tfH A D15-Jul-20214 KiB141100

main.tfH A D15-Jul-20211.2 KiB3824

outputs.tfH A D15-Jul-20210 10

providers.tfH A D15-Jul-2021116 98

test-servers.tfH A D15-Jul-20211.9 KiB7160

user-data-client.shH A D15-Jul-20211 KiB269

user-data-server.shH A D15-Jul-20211 KiB259

variables.tfH A D15-Jul-20213.5 KiB11280

README.md

1# Terraform Consul Load Testing
2## How to use
31. Build an image with the desired Consul version and a load test image in the Packer folder [here](../packer).
42. Create your own `vars.tfvars` file in this directory.
53. Place the appropriate AMI IDs in the `consul_ami_id` and `test_server_ami` variables. If no AMI ID is specified it will default
6to pulling from latest.
74. Set either `consul_version` or `consul_download_url`. If neither is set it will default to utilizing Consul 1.9.0
85. AWS Variables are set off of environment variables. Make sure to export necessary variables [shown here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables).
96. Run `terraform plan -var-file=vars.tfvars`, and then `terraform apply -var-file=vars.tfvars` when ready.
107. Upon completion k6 should run and push metrics to the desired Datadog dashboard.
11
12An example of a `vars.tfvars` :
13
14```
15vpc_name             = "consul-test-vpc"
16vpc_cidr             = "11.0.0.0/16"
17public_subnet_cidrs  = ["11.0.1.0/24", "11.0.3.0/24"]
18private_subnet_cidrs = ["11.0.2.0/24"]
19vpc_az               = ["us-east-2a", "us-east-2b"]
20test_instance_type   = "t2.micro"
21test_server_ami      = "ami-0ad7711e837ebe166"
22cluster_name         = "ctest"
23test_public_ip       = "true"
24instance_type        = "t2.micro"
25ami_owners           = ["******"]
26consul_ami_id        = "ami-016d80ff5472346f0"
27````
28
29## Customization
30All customization for infrastructure that is available can be found by looking through the `variables.tf` file.
31
32## How to SSH
33After `terraform apply` is run Terraform should create a `keys/` directory which will give access to all instances created.
34For example, `ssh -i "keys/[cluster-name]-spicy-banana.pem" ubuntu@[IPADDRESS]`
35
36