Skip to content

Commit a0e056c

Browse files
authored
Update README.md
1 parent c8bb88f commit a0e056c

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

terraform/README.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 1. Add a testing suite
22

3-
please add a new tfvars file under `terraform/testing-suites` folder, each tfvar file represent a testing suite.
3+
please add a new tfvars file under `terraform/testing-suites` folder, each tfvar file represent a testing suite.
44

55
### 1.1 add an ecs testing suite
66

@@ -13,6 +13,20 @@ specify below config in the tfvars file
1313
6. [optional] aoc_image_repo, if you have an aoc image you just built with the new component, then set its repo name here
1414
7. [optional] aoc_version, if you have an aoc image you just built with the new component, then set it as its tag name.
1515

16+
an example here:
17+
18+
```shell
19+
sample_app_callable = false
20+
21+
otconfig_path="../template/otconfig/statsd_otconfig.tpl"
22+
ecs_taskdef_path="../template/ecstaskdef/statsd_taskdef.tpl"
23+
24+
# this file is defined in validator/src/main/resources/validations
25+
validation_config="statsd-metric-validation.yml"
26+
27+
data_emitter_image="alpine/socat:latest"
28+
```
29+
1630
### 1.2 add an ec2 testing suite
1731

1832
specify below config in the tfvars file
@@ -21,15 +35,24 @@ specify below config in the tfvars file
2135
3. validation_config, please put a new validation config file under `validator/src/main/resources/validations` folder and specify the filename in the tfvars file.
2236
4. [optional] sample_app_callable, by default it's true, only set it to false when you don't have a web application sample app image
2337
5. [optional] data_emitter_image, if you have a sample app then set its image name here
24-
6. [optional] package_s3_bucket, if you have an aoc rpm/deb/msi built with the new component, and uploaded it to s3, then set its s3 bucket name here.
2538
7. [optional] aoc_version, if you have an aoc rpm/dev/msi you just built with the new component, then set it as its tag name.
2639

27-
please note the rpm/dev/msi s3 object path should be
40+
an example here:
2841

2942
```shell
30-
/amazon_linux/amd64/${aoc_version}/aws-observability-collector.rpm/deb/msi
43+
sample_app_callable = false
44+
45+
otconfig_path="../template/otconfig/statsd_otconfig.tpl"
46+
47+
docker_compose_path="../template/ec2-docker-compose-config"
48+
49+
# this file is defined in validator/src/main/resources/validations
50+
validation_config="statsd-metric-validation.yml"
51+
52+
data_emitter_image="alpine/socat:latest"
3153
```
3254

55+
3356
### 1.3 add an eks testing suite
3457

3558
specify below config in the tfvars file
@@ -41,8 +64,22 @@ specify below config in the tfvars file
4164
6. [optional] aoc_image_repo, if you have an aoc image you just built with the new component, then set its repo name here
4265
7. [optional] aoc_version, if you have an aoc image you just built with the new component, then set it as its tag name.
4366

67+
```shell
68+
sample_app_callable = false
69+
70+
otconfig_path="../template/otconfig/statsd_otconfig.tpl"
71+
eks_pod_config_path="../template/eks-pod-config/statsd-eks-config.tpl"
72+
73+
# this file is defined in validator/src/main/resources/validations
74+
validation_config="statsd-metric-validation.yml"
75+
76+
data_emitter_image="alpine/socat:latest"
77+
```
78+
4479
### 1.4 how to write the configurations?
4580

81+
You are able to use placeholders in your configuration files, the testing framework will replace the placeholders with its runtime value when you run the testing suite.
82+
4683
#### 1.4.1 otconfig
4784

4885
Below are the placeholders you can use in the otconfig
@@ -269,6 +306,10 @@ Below are the placeholders you can use in the expected data pattern.
269306

270307
* metricNamespace
271308
* testingId
309+
* ecsContext.ecsClusterName
310+
* ecsContext.ecsTaskArn
311+
* ecsContext.ecsTaskDefFamily
312+
* ecsContext.ecsTaskDefVersion
272313

273314
an example:
274315

0 commit comments

Comments
 (0)