Skip to content

Commit 67975d7

Browse files
authored
Deployment patterns (#675)
* Progressive tutorial with no-code * Fixed split figures * fixed split deployment * Updated doc structure * Removed two knative specific tutorials * modified knative quickstart check * pptx * Corrected gh workflow * updated documentation for deployment patterns
1 parent 4bbb66f commit 67975d7

File tree

22 files changed

+1193
-467
lines changed

22 files changed

+1193
-467
lines changed

.github/workflows/knative-e2e-tests.yaml

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- name: Check if experiment is complete and successful
6161
run: |
6262
export ITER8=$(pwd)
63+
export EXPERIMENT=quickstart-exp
6364
source $ITER8/samples/knative/quickstart/check.sh
6465
6566
canary:
@@ -159,8 +160,8 @@ jobs:
159160
export ITER8=$(pwd)
160161
source $ITER8/samples/knative/conformance/check.sh
161162
162-
canary-progressive-helm:
163-
name: progressive canary experiment using helm
163+
progressive:
164+
name: progressive experiment
164165
runs-on: ubuntu-latest
165166
steps:
166167
- name: Checkout repository
@@ -219,6 +220,54 @@ jobs:
219220
export ITER8=$(pwd)
220221
source $ITER8/samples/knative/canaryprogressive/check.sh
221222
223+
fixedsplit:
224+
name: fixed-split experiment
225+
runs-on: ubuntu-latest
226+
steps:
227+
- name: Checkout repository
228+
uses: actions/checkout@v2
229+
230+
- uses: engineerd/[email protected]
231+
- name: platform setup
232+
run: |
233+
export ITER8=$(pwd)
234+
$ITER8/samples/knative/quickstart/platformsetup.sh contour
235+
236+
- name: create Knative service and readiness check
237+
run: |
238+
export ITER8=$(pwd)
239+
kubectl apply -f $ITER8/samples/knative/quickstart/baseline.yaml
240+
kubectl apply -f $ITER8/samples/knative/fixed-split/experimentalservice.yaml
241+
kubectl wait --for=condition=Ready ksvc/sample-app --timeout=240s
242+
243+
- name: create Fortio job and create experiment
244+
run: |
245+
export ITER8=$(pwd)
246+
sed -i "s/6000s/120s/g" $ITER8/samples/knative/quickstart/fortio.yaml
247+
URL_VALUE=$(kubectl get ksvc sample-app -o json | jq .status.address.url)
248+
sed "s+URL_VALUE+${URL_VALUE}+g" $ITER8/samples/knative/quickstart/fortio.yaml | kubectl apply -f -
249+
250+
# Wait for Fortio to be ready
251+
pod_name=$(kubectl get pods --selector=job-name=fortio -o jsonpath='{.items[*].metadata.name}')
252+
kubectl wait --for=condition=Ready pods/"$pod_name" --timeout=240s
253+
254+
# Define metrics
255+
kubectl apply -f $ITER8/samples/knative/quickstart/metrics.yaml
256+
257+
# Starting the experiment
258+
kubectl apply -f $ITER8/samples/knative/fixed-split/experiment.yaml
259+
260+
- name: Sleep until end of experiment
261+
run: |
262+
sleep 150.0
263+
kubectl get experiment fixedsplit-exp -o yaml
264+
265+
- name: Check if experiment is complete and successful
266+
run: |
267+
export ITER8=$(pwd)
268+
export EXPERIMENT=fixedsplit-exp
269+
source $ITER8/samples/knative/quickstart/check.sh
270+
222271
canary-fixedsplit-kustomize:
223272
name: fixedsplit canary experiment with kustomize
224273
runs-on: ubuntu-latest

mkdocs/docs/concepts/buildingblocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Iter8 can optionally **promote the recommended version** at the end of an experi
104104

105105
## Resource config tools
106106

107-
Iter8 can be easily easily with Helm and Kustomize. This integration is especially useful if you use these tools for configuring Kubernetes resources needed for releases of your app/ML model.
107+
Iter8 can be easily integrated with Helm and Kustomize. This integration is especially useful if you use these tools for configuring Kubernetes resources needed for releases of your app/ML model.
108108

109109
=== "Helm charts"
110110
An experiment that uses `helm` charts for version promotion is illustrated below.

mkdocs/docs/getting-started/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ template: main.html
44

55
# Quick Start
66

7-
!!! tip "Scenario: A/B testing and progressive deployment"
7+
!!! tip "Scenario: A/B testing"
88
[A/B testing](../../concepts/buildingblocks/#testing-pattern) enables you to compare two versions of an app/ML model, and select a winner based on a (business) reward metric and objectives (SLOs). In this tutorial, you will:
99

1010
1. Perform A/B testing.
@@ -241,6 +241,7 @@ Choose the K8s stack over which you are performing the A/B testing experiment.
241241
```shell
242242
kubectl apply -f $ITER8/samples/knative/quickstart/baseline.yaml
243243
kubectl apply -f $ITER8/samples/knative/quickstart/experimentalservice.yaml
244+
kubectl wait --for=condition=Ready ksvc/sample-app
244245
```
245246

246247
??? info "Look inside baseline.yaml"
@@ -351,7 +352,6 @@ Choose the K8s stack over which you are performing the A/B testing experiment.
351352
Generate requests using [Fortio](https://github.com/fortio/fortio) as follows.
352353

353354
```shell
354-
kubectl wait --for=condition=Ready ksvc/sample-app
355355
# URL_VALUE is the URL where your Knative application serves requests
356356
URL_VALUE=$(kubectl get ksvc sample-app -o json | jq .status.address.url)
357357
sed "s+URL_VALUE+${URL_VALUE}+g" $ITER8/samples/knative/quickstart/fortio.yaml | kubectl apply -f -
145 KB
Loading
154 KB
Loading
Binary file not shown.
286 KB
Binary file not shown.

0 commit comments

Comments
 (0)