Run a Verification with Docker
Create a Verification¶
Verifications can also run on the Docker image. First you will need to create a Verification. Select Verifications in the ChaosIQ Sidebar, and then select the Create a New Verification button. Select an objective to link the Verification, once an Object has been selected you should see:
Select a Frequency and a Duration, for that sake of running a quick Verification, use something like a Frequency of something like 5 seconds and a Duration of 30 seconds. For the purpose of this, leave the No Condition option set and use the default Verification name, then select the Create Verification and View Execution Steps button, you will be take to the Run Verification page:
From the Run Verification page, you can Copy the verify command and extract the URL from the command, this can be used in the Run Verification section.
Run the Verification¶
A Verification runs using a different runtime pattern from an experiment, it will also populate the Insights view on ChaosIQ, the Run and Verify page details the differences between run and verify.
You can then run the Verification with the following command:
docker run -v `pwd`/ctk:/home/svc -v `pwd`/ctk_config:/tmp/settings \ chaosiq/chaostoolkit --settings /tmp/settings/settings.yaml verify \ https://console.chaosiq.dev/assets/verifications/e2cd334c-e5f5-4af0-b82c-47e852e9eb95.json
You should replace the URL in the above command with your own URL obtained from the Run Verification page.
When the verification has completed you should be able to go to the ChaosIQ Insights page and see the Insight generated by the Verification execution:
You could equally download the Verification by selecting the Download Verification button and save this to the
./ctk in a file called
Verification.json. You can then run this file locally as follows:
docker run -v `pwd`/ctk:/home/svc \ -v `pwd`/ctk_config:/tmp/settings chaosiq/chaostoolkit \ --settings /tmp/settings/settings.yaml verify verification.json
Again the insights will be displayed on ChaosIQ.
That’s it! We have covered using the ChaosIQ chaosiq/chaostoolkit Docker image to run simple experiments and verifications. This can be used as the basis on running with Docker in many different environments which we will cover in further ChaosIQ How To docs.