Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Try Fault Injection Doc #72

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Add Try Fault Injection Doc #72

merged 5 commits into from
Sep 9, 2024

Conversation

noobwei
Copy link
Contributor

@noobwei noobwei commented Sep 5, 2024

No description provided.

Copy link

netlify bot commented Sep 5, 2024

Deploy Preview for kmesh-net ready!

Name Link
🔨 Latest commit 075c95e
🔍 Latest deploy log https://app.netlify.com/sites/kmesh-net/deploys/66de68a8492a6300084f4737
😎 Deploy Preview https://deploy-preview-72--kmesh-net.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


3. Install service granularity waypoint for reviews and ratings service

*The above steps could refer to [Install Waypoint | Kmesh](https://kmesh.net/en/docs/userguide/install_waypoint/#preparation)*
Copy link
Member

@hzxuzhonghu hzxuzhonghu Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*The above steps could refer to [Install Waypoint | Kmesh](https://kmesh.net/en/docs/userguide/install_waypoint/#preparation)*
* The above steps could refer to [Install Waypoint | Kmesh](https://kmesh.net/en/docs/userguide/install_waypoint/#preparation) *

Comment on lines 28 to 30
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-all-v1.yaml

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-reviews-test-v2.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit can we make these yaml in tree

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean add to kmesh samples


### Injecting an HTTP delay fault

To test the Bookinfo application microservices for resiliency, inject a 7s delay between the `reviews:v2` and `ratings` microservices for user `jason`. This test will uncover a bug that was intentionally introduced into the Bookinfo app.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it really mean?

1. Create a fault injection rule to delay traffic coming from the test user `jason`.

```bash
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-ratings-test-delay.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make the yaml intree, so could let us know what really configurred

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


2. Deploy bookinfo as sample application and sleep as curl client

3. Install service granularity waypoint for reviews and ratings service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Install service granularity waypoint for reviews and ratings service
3. Install service granularity waypoint for reviews service

We'd better list the installation stesp of ratings waypoint directly, because it's easy to overlook and it may not be that easy for first-time users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noobwei only display installation steps of ratings waypoint here as step 4, the installation of reviews waypoint has been well explained in Install Waypoint.

2. Confirm the rule was created:

```bash
kubectl get virtualservice ratings -o yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be better to output the result. Simulate terminal format.


`Sorry, product reviews are currently unavailable for this book.`

3. View the web page response times
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. View the web page response times
3. View the web page response time:


1. Create a fault injection rule to send an HTTP abort for user `jason`:

`kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-ratings-test-abort.yaml`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap with codeblock, keep consistent with above

1. Create a fault injection rule to send an HTTP abort for user `jason`:

`kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-ratings-test-abort.yaml`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Display the content of this yaml, the sam as above.

@YaoZengzeng
Copy link
Member

/lgtm

@kmesh-bot kmesh-bot added the lgtm label Sep 9, 2024
@kmesh-bot kmesh-bot merged commit 1534dbd into kmesh-net:main Sep 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants