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

Remove helm #625

Merged
merged 11 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/knative-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ jobs:

- uses: azure/setup-helm@v1

- name: RBAC rules for helm
run: |
export ITER8=$(pwd)
kubectl apply -f ${ITER8}/samples/knative/canaryprogressive/helm-rbac.yaml

- name: create Knative app with canary
run: |
export ITER8=$(pwd)
Expand Down
8 changes: 4 additions & 4 deletions mkdocs/docs/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ title: Installation
Install Iter8 in your Kubernetes cluster as follows.

```shell
export TAG=v0.3.0
export TAG=v0.3.2
curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install.sh | bash
```

Expand All @@ -26,7 +26,7 @@ curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install
set -e
Copy link
Member

Choose a reason for hiding this comment

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

@kalantar If you agree, I am in favor of removing the ??? info "Look inside install.sh" tooltip altogether in install.md. It is more work for us in terms of ensuring consistency/correctness of the documentation

Copy link
Member Author

Choose a reason for hiding this comment

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

agree. done.


# Step 0: Export TAG
export TAG="${TAG:-v0.3.0}"
export TAG="${TAG:-v0.3.2}"

# Step 1: Install Iter8
echo "Installing Iter8"
Expand All @@ -45,7 +45,7 @@ curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install
Install Iter8's Prometheus add-on in your cluster as follows. This step assumes you have installed Iter8 following Step 1 above.

```shell
export TAG=v0.3.0
export TAG=v0.3.2
curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install-prom-add-on.sh | bash
```

Expand All @@ -56,7 +56,7 @@ curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install
set -e
Copy link
Member

Choose a reason for hiding this comment

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

@kalantar If you agree, I am in favor of removing the ??? info "Look inside instal-prom-add-on.sh" tooltip altogether in install.md. It is more work for us in terms of ensuring consistency/correctness of the documentation. Of course, folks can navigate to the GitHub page and look inside!

Copy link
Member Author

Choose a reason for hiding this comment

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

agree. done.


# Step 0: Export TAG
export TAG="${TAG:-v0.3.0}"
export TAG="${TAG:-v0.3.2}"

# Step 1: Install Prometheus add-on
# This step assumes you have installed Iter8 using install.sh
Expand Down
2 changes: 2 additions & 0 deletions mkdocs/docs/getting-started/quick-start/with-knative.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export ITER8=$(pwd)
## 3. Install Knative and Iter8
Knative can work with multiple networking layers. So can Iter8's Knative extension. Choose a networking layer for Knative.

This also installs sample metrics for Knative and Iter8's Prometheus add-on. These optional components are used by the sample experiment below.

=== "Contour"

```shell
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/tutorials/knative/canary-fixedsplit.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You will create the following resources in this tutorial.
- eventually replaces `baseline` with `candidate` using Kustomize

???+ warning "Before you begin, you will need... "
**Kubernetes cluster:** Ensure that you have Kubernetes cluster with Iter8 and Knative installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).
**Kubernetes cluster:** Ensure that you have a Kubernetes cluster with Iter8, Knative, Iter8 sample metrics for Knative, and Prometheus installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).

**Cleanup:** If you ran an Iter8 tutorial earlier, run the associated cleanup step.

Expand Down
20 changes: 14 additions & 6 deletions mkdocs/docs/tutorials/knative/canary-progressive.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@ You will create the following resources in this tutorial.
- eventually replaces `baseline` with `candidate` using Helm

???+ warning "Before you begin, you will need... "
**Kubernetes cluster:** Ensure that you have Kubernetes cluster with Iter8 and Knative installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).
**Kubernetes cluster:** Ensure that you have a Kubernetes cluster with Iter8, Knative, Iter8 sample metrics for Knative, and Prometheus installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).

**Cleanup:** If you ran an Iter8 tutorial earlier, run the associated cleanup step.

**ITER8:** Ensure that `ITER8` environment variable is set to the root directory of your cloned Iter8 repo. See [Step 2 of the quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/#2-clone-iter8-repo) for example.

**[Helm v3](https://helm.sh/) and [`iter8ctl`](../../../getting-started/install/#optional-step-3-iter8ctl):** This tutorial uses Helm v3 and `iter8ctl`.

## 1. Create versions
## 1. Give Permission to Iter8 to Call `helm upgrade`

Helm uses secrets to record information about releases. This tutorial uses an experiment that invokes Helm. Enable this experiment using the following RBAC.

```shell
kubectl apply -f ${ITER8}/samples/knative/canaryprogressive/helm-rbac.yaml
```

## 2. Create versions
```shell
helm install --repo https://raw.githubusercontent.com/iter8-tools/iter8/master/samples/knative/canaryprogressive/helm-repo sample-app sample-app --namespace=iter8-system
kubectl wait ksvc/sample-app --for condition=Ready --timeout=120s
Expand Down Expand Up @@ -60,7 +68,7 @@ helm upgrade --install --repo https://raw.githubusercontent.com/iter8-tools/iter
percent: 0
```

## 2. Generate requests
## 3. Generate requests
```shell
kubectl wait --for=condition=Ready ksvc/sample-app
URL_VALUE=$(kubectl get ksvc sample-app -o json | jq .status.address.url)
Expand Down Expand Up @@ -98,7 +106,7 @@ sed "s+URL_VALUE+${URL_VALUE}+g" $ITER8/samples/knative/canaryprogressive/fortio
restartPolicy: Never
```

## 3. Create Iter8 experiment
## 4. Create Iter8 experiment
Copy link
Member

Choose a reason for hiding this comment

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

When you look inside the Iter8-experiment, it still says --namespace=iter8-system. The new experiment should be copied in here...

```shell
kubectl apply -f $ITER8/samples/knative/canaryprogressive/experiment.yaml
```
Expand Down Expand Up @@ -169,7 +177,7 @@ kubectl apply -f $ITER8/samples/knative/canaryprogressive/experiment.yaml
value: candidate
```

## 4. Observe experiment
## 5. Observe experiment
Observe the experiment in realtime. Paste commands from the tabs below in separate terminals.

=== "iter8ctl"
Expand Down Expand Up @@ -203,7 +211,7 @@ Observe the experiment in realtime. Paste commands from the tabs below in separa

As the experiment progresses, you should see traffic progressively shift from `sample-app-v1` to `sample-app-v2`. When the experiment completes, all of the traffic will be sent to the winner, `sample-app-v2`.

## 5. Cleanup
## 6. Cleanup
```shell
kubectl delete -f $ITER8/samples/knative/canaryprogressive/experiment.yaml
kubectl delete -f $ITER8/samples/knative/canaryprogressive/fortio.yaml
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/tutorials/knative/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You will create the following resources in this tutorial.
3. An **Iter8 experiment** that verifies that `baseline` satisfies mean latency, 95th percentile tail latency, and error rate `objectives`.

???+ warning "Before you begin, you will need... "
**Kubernetes cluster:** Ensure that you have Kubernetes cluster with Iter8 and Knative installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).
**Kubernetes cluster:** Ensure that you have a Kubernetes cluster with Iter8, Knative, Iter8 sample metrics for Knative, and Prometheus installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/).

**Cleanup:** If you ran an Iter8 tutorial earlier, run the associated cleanup step.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/tutorials/knative/mirroring.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You will create the following resources in this tutorial.
4. An **Iter8 experiment** that verifies that the dark version satisfies mean latency, 95th percentile tail latency, and error rate `objectives`.

???+ warning "Before you begin, you will need... "
**Kubernetes cluster with Iter8, Knative and Istio:** Ensure that you have Kubernetes cluster with Iter8 and Knative installed, and that Knative uses the Istio networking layer. You can do so by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/), and selecting Istio during Step 3.
**Kubernetes cluster with Iter8, Knative and Istio:** Ensure that you have a Kubernetes cluster with Iter8, Knative with the Istio networking layer, Iter8 sample metrics for Knative, and Prometheus installed. You can do so by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/), and selecting Istio during Step 3.

**Cleanup:** If you ran an Iter8 tutorial earlier, run the associated cleanup step.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/tutorials/knative/traffic-segmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You will create the following resources in this tutorial.
4. An **Iter8 experiment** which verifies that the `candidate` satisfies mean latency, 95th percentile tail latency, and error rate `objectives`, and progressively increases the proportion of traffic with `country: wakanda` header that is routed to the `candidate`.

???+ warning "Before you begin, you will need... "
**Kubernetes cluster with Iter8, Knative and Istio:** Ensure that you have Kubernetes cluster with Iter8 and Knative installed, and that Knative uses the Istio networking layer. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/), and selecting Istio during Step 3.
**Kubernetes cluster with Iter8, Knative and Istio:** Ensure that you have a Kubernetes cluster with Iter8, Knative with the Istio networking layer, Iter8 sample metrics for Knative, and Prometheus installed. You can do this by following Steps 1, 2, and 3 of the [quick start tutorial for Knative](../../../getting-started/quick-start/with-knative/), and selecting Istio during Step 3.

**Cleanup:** If you ran an Iter8 tutorial earlier, run the associated cleanup step.

Expand Down
53 changes: 53 additions & 0 deletions samples/knative/canaryprogressive/helm-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This role enables writing secrets;
# Iter8 handler uses this role during Helm release tasks
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: secret-writer
rules:
- apiGroups:
- ""
resources:
- secrets
verbs: ["create", "update", "patch", "delete"]
---
# Helm v3 uses secrets to store Helm release information.
#
# By default, when Helm is used within Iter8 experiments, secrets
# will be located in the Iter8 namespace.
Copy link
Member

Choose a reason for hiding this comment

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

No longer true.

#
# This role binding enables Iter8 handler to read
Copy link
Member

Choose a reason for hiding this comment

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

Default namespace

# secrets in the namespace where Iter8 is installed
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: secret-reader-handler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: secret-reader
subjects:
- kind: ServiceAccount
name: handlers
namespace: iter8-system
---
# Helm v3 uses secrets to store Helm release information.
#
# By default, when Helm is used within Iter8 experiments, secrets
Copy link
Member

Choose a reason for hiding this comment

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

This is not true any longer.

# will be located in the Iter8 namespace.
#
# This role binding enables Iter8 handler to write
# secrets in the namespace where Iter8 is installed
Copy link
Member

Choose a reason for hiding this comment

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

default namespace

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: secret-writer-handler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: secret-writer
subjects:
- kind: ServiceAccount
name: handlers
namespace: iter8-system
---
11 changes: 7 additions & 4 deletions samples/knative/quickstart/platformsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if [[ ! " ${NETWORK_LAYERS[@]} " =~ " ${1} " ]]; then
fi

# Step 1: Export correct tags for install artifacts
export GIT_ACCOUNT="${GIT_ACCOUNT:-iter8-tools}"
export TAG="${TAG:-v0.3.0}"
Copy link
Member

Choose a reason for hiding this comment

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

Tag needs to change here to v0.3.2

export KNATIVE_TAG="${KNATIVE_TAG:-v0.21.0}"
echo "TAG = $TAG"
Expand Down Expand Up @@ -114,12 +115,14 @@ fi
### Note: the preceding steps perform domain install; following steps perform Iter8 install

# Step 5: Install Iter8
echo "Installing Iter8"
curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install.sh | bash
echo "Installing Iter8 with Knative support"
curl -s https://raw.githubusercontent.com/${GIT_ACCOUNT}/iter8-install/${TAG}/install.sh | bash
Copy link
Member

Choose a reason for hiding this comment

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

${TAG} needs to be replaced with main

Copy link
Member Author

Choose a reason for hiding this comment

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

@sriumcp I don't understand why this is the case. Why do we not want to install a particular version that the sample was written/tested against?

Copy link
Member

@sriumcp sriumcp Apr 19, 2021

Choose a reason for hiding this comment

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

What we want to ensure is that a specific version of iter8 corresponds to a specific version of iter8-install (and iter8ctl).

Once you pin the version of iter8-install, by extension, you also pin the version of handler, etc3 and iter8-analytics.

If each tutorial points to a different version of iter8-install, then we will pretty soon be staring at an unmanageable mess in terms of dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

Re: testing, we do want to test the samples against the iter8-install version that install.md points to.

If the tutorials break for the version installed by install.md, we have a problem, and shouldn't be merging in the first place.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok. I think I follow the expected behavior. I have undone most of the changes in this script.


# Step 6: Install Iter8's Prometheus add-on
# Step 6: Install sample metrics for Knative and Iter8's Prometheus add-on
echo "Installing sample metrics"
kubectl apply -f https://raw.githubusercontent.com/${GIT_ACCOUNT}/iter8-install/${TAG}/metrics/build.yaml
Copy link
Member

Choose a reason for hiding this comment

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

This ${TAG} is fine as it is.

echo "Installing Iter8's Prometheus add-on"
curl -s https://raw.githubusercontent.com/iter8-tools/iter8-install/main/install-prom-add-on.sh | bash
curl -s https://raw.githubusercontent.com/${GIT_ACCOUNT}/iter8-install/${TAG}/install-prom-add-on.sh | bash
Copy link
Member

Choose a reason for hiding this comment

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

${TAG} needs to change to main


# Step 7: Verify Iter8 installation
echo "Verifying installation"
Expand Down