Jump to content

Featured Replies

Posted

Azure Chaos Studio supports new fault for Azure Event Hubs.

 

Azure Chaos Studio is a managed service that uses chaos engineering to help you measure, understand, and improve your cloud application and service resilience. Chaos engineering is a methodology by which you inject real-world faults into your application to run controlled fault injection experiments.

 

Azure Chaos Studio has added a new fault action for Azure Event Hubs called Change Event Hub State.

 

This fault action lets users disable entities within a targeted Azure Event Hubs namespace either partially or fully to test messaging infrastructure for maintenance or failure scenarios for an application dependent on an Event Hub.

 

The fault can be used in the Azure portal by designing experiments, deploying templates, or using the REST API. The fault library contains more information and examples.

 

 

 

This article will cover the how-to setup the fault action in Azure Chaos Studio for Azure Event Hub called Change Event Hub State.

 

 

 

Create Event Hubs namespace

 

 

 

Step 1: Go to Azure Portal - Microsoft Azure ; Login with your userId and password.

 

Step 2: Click on Create a resource and then select Event Hubs.

 

 

 

largevv2px999.jpg.08fd4f672b2ffc2213a0fc3f15533a8e.jpg

 

 

 

Step 3: Click on Create event hubs namespace.

 

 

 

largevv2px999.jpg.1f28a788fad33b6994c22786a76c4cd9.jpg

 

 

 

 

 

Step 4: Click on Review + Create.

 

largevv2px999.jpg.cc347bb295408765d16af6584c45b415.jpg

 

 

 

Step 5: Click on Create.

 

 

 

 

 

largevv2px999.jpg.489811727b94592507dd1e07931e4f33.jpg

 

mediumvv2px400.png.a18491a5a7812aea88d7e40847560e65.png

 

Step 6: Click on Go to resource.

 

 

 

 

 

largevv2px999.jpg.c960f1d204a7ebcab10ce9fc48cb9868.jpg

 

 

 

 

 

 

 

 

 

Create Event Hub

 

 

 

Step 1: Now create the Event Hub.

 

 

 

largevv2px999.jpg.f8fc662340e7de84f016290b1ba41d60.jpg

 

 

 

 

 

 

 

Step 2: Click on Event Hub

 

largevv2px999.jpg.805d1df7f13288debe7f78237d7641f8.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 3: Provide a suitable name to the event Hub. Then Click on review & Create.

 

largevv2px999.jpg.33e1915afcf70f0d1de91fa60c295a02.jpg

 

 

 

Step 4: Click on Create.

 

largevv2px999.jpg.420798fa225ef8acba7cff5e84986acb.jpg

 

 

 

The Event Hub is created.

 

 

 

largevv2px999.jpg.92f351be7c203742abe1dbcd90dc2a69.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

Chaos Studio

 

Step 1: Now Create Chaos Studio

 

largevv2px999.jpg.b300bd27ff944cb48f7dba1346a211b0.jpg

 

 

 

Step 2: Click on Target

 

 

 

largevv2px999.jpg.eb96605ae9b29c229200b9eeecf07e08.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 3: You will be able to view the Event Hub namespace created by earlier.

 

 

 

largevv2px999.jpg.1fe2f5b8f19ff427fd6ef53afafbbb65.jpg

 

 

 

 

 

 

 

 

 

Step 4: Select on Eventhubnamespace Created and click on “Enable targets”.

 

largevv2px999.jpg.079b492debf96e64759f8a08bf27148f.jpg

 

Step 5: Click on Review+ Enable

 

largevv2px999.jpg.46b6838e63e0dbfd3a52d557f9960135.jpg

 

 

 

 

 

Step 6: Click on Enable

 

largevv2px999.jpg.f11b10a42437250a39e53804c8656d6a.jpg

 

 

 

 

 

 

 

Step 7: Click on Go to Resource

 

 

 

 

 

largevv2px999.jpg.4e4ce2e2e9da62953b9be662982a11bd.jpg

 

 

 

 

 

 

 

 

 

Step 7: Go to Chaos Studio, by searching Chaos Studio in the Search bar.

 

 

 

 

 

largevv2px999.jpg.85e9a962a416e989ee2569d40671853d.jpg

 

 

 

 

 

Step 8: Click on Create.

 

 

 

largevv2px999.jpg.47b598bd400aa6ddf5622589d784b037.jpg

 

 

 

 

 

 

 

Step 9: Provide a suitable name to the experiment. Click on Experiment Designer.

 

 

 

 

 

largevv2px999.jpg.6fe23afd40661760bc7eb9c6fd465426.jpg

 

 

 

 

 

 

 

Step 10: Add the Action.

 

 

 

largevv2px999.jpg.b353f0a2cb86d5dd357ce7ed2e14570e.jpg

 

 

 

 

 

 

 

Step 11: Firstly, add the fault to disable the Azure Event Hub.

 

 

 

largevv2px999.jpg.3ba1f4470135a9348310ffc57e70963a.jpg

 

 

 

 

 

 

 

 

 

 

 

Step 12: In Faults dropdown select the Change Event Hub State.

 

Chage the event hub state to “Disable”.

 

 

 

 

 

 

 

largevv2px999.jpg.e4fd990b2fa6f2e77d9f8e86206c8117.jpg

 

 

 

Step 13: Click on Target Resources.

 

 

 

largevv2px999.jpg.041516ff79826ae8684d82ba206221a7.jpg

 

 

 

 

 

Step 14: On Target Resources Select the radio button “Manually select from a list”. Select your Event hub namespace. And Click on Add.

 

 

 

largevv2px999.jpg.0e2dc274c178625870cac1841083f758.jpg

 

 

 

 

 

Step 15: Click on Add Delay.

 

Then change the Duration to the desired delay. In this case, I have added a 1-minute delay. Click on Add.

 

This means that when this experiment runs, it will first disable the Event Hub for the duration of 1 minute.

 

In the next step, we will change the Event Hub State back to Active.

 

 

 

largevv2px999.jpg.f7a2e8296d6ab5a3d38a539cf31fb9b8.jpg

 

 

 

Step 16: Now again add the fault and select the Change Event Hub state, like you did in Step 11.

 

 

 

 

 

largevv2px999.jpg.7010a2cc6a4e4e1ccfaa01b417136951.jpg

 

 

 

 

 

 

 

Step 17: Now set the desiredState as Active.

 

 

 

largevv2px999.jpg.6fe3dfd2c700b82f2d1ddf834c7495ef.jpg

 

 

 

 

 

 

 

Step 18: Click on Target Resources and select the Event Hub namespace like you did in previous step and click on Add.

 

largevv2px999.jpg.93cab8f0dcf799b71bf59fbb3be57296.jpg

 

 

 

 

 

 

 

 

 

Step 19: Click on Review and Create.

 

largevv2px999.jpg.a639f243ef5a51e9bdd9370f2a5e1493.jpg

 

 

 

 

 

 

 

Step 20: Click on Create.

 

 

 

largevv2px999.jpg.27014a217a16244d8b8603e37ff35d98.jpg

 

 

 

 

 

 

 

Step 21: Click on Go to resource.

 

largevv2px999.jpg.f87cb1a015e3923bcc35c3f54c707a05.jpg

 

 

 

 

 

 

 

Step 22: Now click on Identity.

 

largevv2px999.jpg.123b77bc3cfdd4ed1697e1126fbfec86.jpg

 

 

 

 

 

 

 

Step 23: Click on Azure Add role assignments. Change the role to Azure Event Hub Data Owner and Save it.

 

largevv2px999.jpg.6f526dc958784c4698c5de23333dbe9b.jpg

 

 

 

 

 

 

 

 

 

Step 24: Click on Overview. The status will change to Running after approximately a min.

 

 

 

largevv2px999.jpg.bcee33792abad4f4ced0de102f78f543.jpg

 

 

 

 

Step 25: Once the state is running. Go to your Event Hub. You will notice that state is disabled.

 

 

 

 

largevv2px999.jpg.7237c14aad4b1a04feaef01a17765c43.jpg

 

 

 

 

 

 

 

Step 26: As we have added the delay of 1 min in our experiment setup earlier, the event hub state change to Active after a minute.

 

 

 

 

 

 

largevv2px999.jpg.d3595c1241a3050139fd8cc3eabac5d6.jpg

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...