You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Finally, push the code. This will trigger the Code Pipeline which will run the tests in the Fargate cluster.
94
+
Finally, push the code.
93
95
94
96
```bash
95
97
git push -u origin master
96
98
```
97
99
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).
99
102
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:
102
105
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
+

106
107
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
110
109
111
-

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
+

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
+

112
127
113
128
## Launch in Additional Regions (Optional)
114
129
@@ -140,10 +155,19 @@ steps:
140
155
Name | Value
141
156
---------------------|---------------------
142
157
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)
144
159
145
160
Save the changes and you are done! You can repeat those steps for every additional region.
146
161
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
+

170
+
147
171
## How to Run Locally
148
172
149
173
It's a good practice to run your tests locally before pushing them to CodeCommit to make sure they run correctly in a
0 commit comments