Iter8 Github Action¶
load-test-http experiment can be invoked as part of a GitHub Actions workflow using the Iter8 Action.
The following example demonstrates the use of the Iter8 Action to benchmark and validate a HTTP service. This is the GitHub Actions equivalent of the CLI-driven basic HTTP example.
# An earlier step in the workflow is assumed to have started the HTTP service # Configure experiment using a YAML file - run: | cat << EOF > myvalues.yaml url: http://127.0.0.1/get EOF # Run Iter8 experiment - uses: iter8-tools/iter8-action@v1 with: chart: load-test-http valuesFile: myvalues.yaml
The basic usage tutorial describes various configurable parameters of the
load-test-http experiment. Their default values are documented in the chart's
values.yaml file and can be viewed as follows.
iter8 hub -c load-test-http cat load-test-http/values.yaml
Automated SLO validation¶
You can specify service-level objectives (SLOs) as part of the
load-test-http experiment. If the SLOs are not satisfied, then the action will fail. You can disable this behavior by setting the
validateSLOs input to
- uses: iter8-tools/iter8-action@v1 with: chart: load-test-http valuesFile: myvalues.yaml validateSLOs: false
The Iter8 Action logs contain the following.
- output of
experiment.yamlfile generated by Iter8
- logs from the experiment run
- output of
- output of
iter8 assert -c completed -c nofailures -c slos
A complete GitHub Actions workflow which exercises the Iter8 Action using the
load-test-http experiment is available as part of the Iter8 docs repo. Run this example as follows.
Fork the Iter8 docs repo: https://github.com/iter8-tools/docs to your organization, myorg.
If necessary, enable workflows on the your forked repository (by navigating to https://github.com/myorg/docs/actions).
Run the workflow:
- Navigate to the Actions tab of your forked repository: https://github.com/myorg/docs/actions.
- Select the workflow end-to-end tests.
- Click the Run workflow button.
When the workflow has completed, there will be a new entry for the execution. Select the latest, then the entry for the local httpbin tests job. The log for each execution of the Iter8 action, can be inspected by inspecting the steps labeled Run iter8-tools/iter8-action@v1.
Iter8 Action inputs¶
The list of inputs that can be configured for the Iter8 GitHub Action is documented here.