Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit 3b93a61

Browse files
committed
Finalized instructions in README, added screenshots that help with
the setup
1 parent 13531e0 commit 3b93a61

File tree

6 files changed

+44
-20
lines changed

6 files changed

+44
-20
lines changed

README.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,43 +72,58 @@ To learn more about the syntax of this file, check the Taurus docs: https://gett
7272
7373
### 4. Push to CodeCommit
7474
75-
One of the resources that gets created when deploying this solution is a CodeCommit repository that stores your
76-
your load test scenarios. A CodePipeline was also created and connected to the CodeCommit repository, such that when you
77-
push a new commit the pipeline will be triggered automatically, build your load test scenarios into a Docker image, push
78-
the image to the ECR registry and then run the tests into the Fargate cluster; all of this automatically!
79-
80-
First, remove the current Git origin of the project because you just cloned it from Github.
75+
One of the resources that gets created when deploying this solution is a CodeCommit repository and a CodePipeline connected
76+
to it. On every commit the pipeline will run automatically, build the load test scenarios into a Docker image and push
77+
the image to the ECR registry and finally run the load tests into the Fargate clusters.
78+
79+
Now, remove the current Git origin of the project because you just cloned it from Github and you want your remote origin
80+
to be the CodeCommit repository instead.
8181
8282
```bash
8383
git remote rm origin
8484
```
8585

86-
Now, set the origin to be your new CodeCommit repository.
86+
Now, set the origin to be your new CodeCommit repository. An easy way to find the repository URL is in the `Outputs` section
87+
of the CloudFormation stack you launched on Step 1. [See the following screenshot](docs/cfn-outputs.png). The URL
88+
should look something like this: `https://git-codecommit.us-west-2.amazonaws.com/v1/repos/distributed-load-testing-using-aws-fargate`.
8789

8890
```bash
8991
git remote add origin {code_commit_repository_url}
9092
```
9193

92-
Finally, push the code. This will trigger the Code Pipeline which will run the tests in the Fargate cluster.
94+
Finally, push the code.
9395

9496
```bash
9597
git push -u origin master
9698
```
9799

98-
### 5. Monitor the test execution in CloudWatch
100+
**Note** If you get a permission denied error when pushing, you may not have configured CodeCommit credentials. Follow this
101+
steps to get your authentication setup: [Git Credentials for AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html).
99102

100-
The CloudFormation template should have created a [CloudWatch Metric Filter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html)
101-
that will capture the average response time for each HTTP request that was issued to your system under test.
103+
If the push was successful, go to CodePipeline and check how the build progresses all the way to the last step, which will
104+
run the tests in the Fargate cluster. The pipeline should look like this:
102105

103-
What this filter is doing, is parsing the Taurus logs that match that given format and assigning a variable name to each
104-
value in the log. We are going to ignore all values in the log except for `avgRt` which is captured as a new metric and
105-
stored in your CloudWatch Metrics.
106+
![Pipeline](docs/pipeline.png)
106107

107-
Once the filter is in place, I recommend to centralize the metrics from the different regions into a single CloudWatch
108-
Dashboard. To pull metrics from different regions into one Dashboard [follow this steps](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cross_region_dashboard.html).
109-
The Dashboard will look something like this:
108+
### 5. Monitor the test execution
110109

111-
![CloudWatch](docs/cloudwatch.jpg)
110+
When the last step of the pipeline has finished successfully, it means that your load tests are now running on Fargate.
111+
Go to the ECS Console to find your Fargate cluster, click on it and you should see 3 tasks running:
112+
113+
![FargateTasks](docs/fargate.png)
114+
115+
Finally, this solution also created a [CloudWatch Metric Filter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html)
116+
that will capture the average response times for each HTTP request that is issued to your system under test by the
117+
Docker tasks running on Fargate.
118+
119+
What this filter is doing, is parsing the Taurus logs and assigning a variable name to each value in the log. It ignores
120+
all values in the log except for `avgRt` which is captured as a new metric and stored in your CloudWatch Metrics. To learn
121+
more about how this metric filter was created, check the CloudFormation template `cloudformation/fargate-cluster.yaml`.
122+
123+
Go to CloudWatch and you should see a Dashboard that was created automatically for you under the Dashboards section. It
124+
will display the metrics captured by the filter described above and display it in a nice graph:
125+
126+
![Dashboard](docs/dashboard.png)
112127

113128
## Launch in Additional Regions (Optional)
114129

@@ -140,10 +155,19 @@ steps:
140155
Name | Value
141156
---------------------|---------------------
142157
REGION_2 | Additional region (i.e. us-east-1)
143-
REGION_2_STACK_NAME | CloudFormation stack name of the additional region (i.e. DistributedLoadTesting)
158+
REGION_2_STACK_NAME | CloudFormation stack name (i.e. DistributedLoadTesting)
144159

145160
Save the changes and you are done! You can repeat those steps for every additional region.
146161

162+
### Monitor All Regions
163+
164+
When you launch this solution in multiple regions, I recommend you centralize the monitoring into the same CloudWatch
165+
Dashboard for easier visibility. In order to do this, you need to pull metrics from different regions into the Dashboard
166+
by [follow this steps](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cross_region_dashboard.html). Once
167+
configured, the multi-region Dashboard will look something like this:
168+
169+
![CloudWatch](docs/cloudwatch.jpg)
170+
147171
## How to Run Locally
148172

149173
It's a good practice to run your tests locally before pushing them to CodeCommit to make sure they run correctly in a

docs/cfn-outputs.png

190 KB
Loading

docs/dashboard.png

106 KB
Loading

docs/fargate.png

235 KB
Loading

docs/pipeline.png

186 KB
Loading

examples/http/taurus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ execution:
2121
scenarios:
2222
aws-website-test:
2323
requests:
24-
- http://aws.amazon.com
24+
- https://aws.amazon.com

0 commit comments

Comments
 (0)