From 19927067cab3e7d9029414c05f0314e0e40b78b8 Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Thu, 13 Apr 2023 16:28:46 +0200 Subject: [PATCH 1/3] moved and updated bookinfo readme --- bookinfo/README.md | 37 +++++++++++++++++++++++++++++++++++++ bookinfo/chart/README.md | 35 ----------------------------------- 2 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 bookinfo/README.md delete mode 100644 bookinfo/chart/README.md diff --git a/bookinfo/README.md b/bookinfo/README.md new file mode 100644 index 0000000..03ad6ce --- /dev/null +++ b/bookinfo/README.md @@ -0,0 +1,37 @@ +# bookinfo demo + +## Steps to deploy + +1. Set up a kind cluster + +```bash +kind create cluster +``` + +2. Install the kwasm-operator and annotate all nodes for kwasm + +```bash +helm repo add kwasm http://kwasm.sh/kwasm-operator/ +helm install -n kwasm --create-namespace kwasm-operator kwasm/kwasm-operator +kubectl annotate node --all kwasm.sh/kwasm-node=true +``` + +3. Deploy the Helm chart. Choose one of the provided value files: + +- `chart/values.istio.yaml` deploys the 4 bookinfo components as is from the Istio example +- `chart/values.mixed.yaml` deploys the productinfo dashboard and the ratings service from the Istio image and the details and reviews service as wasm modules +- `chart/values.spin.yaml` deploys all 4 services as wasm modules + +```bash +helm upgrade --install bookinfo ./chart -f chart/values.istio.yaml +``` + +The same command with a different values file can be used to switch between the different combinations. + +4. (Create an image pull secret for pulling the wasm images) + +Should not be necessary any more, but in case we have set the package visibility to private again, you can try creating an image pull secret: + +```bash +kubectl create secret docker-registry ghcr --docker-server=ghcr.io --docker-username="$GITHUB_USERNAME" --docker-password="$GITHUB_PERSONAL_ACCESS_TOKEN" --docker-email="ignore@me.com" +``` diff --git a/bookinfo/chart/README.md b/bookinfo/chart/README.md deleted file mode 100644 index daa22f1..0000000 --- a/bookinfo/chart/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# bookinfo demo - -## Steps to deploy - -1. Set up a kind cluster - -```bash -kind create cluster -``` - -2. Install the kwasm-operator and annotate all nodes for kwasm - -```bash -helm repo add kwasm http://kwasm.sh/kwasm-operator/ -helm install -n kwasm --create-namespace kwasm-operator kwasm/kwasm-operator -kubectl annotate node --all kwasm.sh/kwasm-node=true -``` - -3. Create an image pull secret for pulling the wasm images - -```bash -kubectl create secret docker-registry ghcr --docker-server=ghcr.io --docker-username="$GITHUB_USERNAME" --docker-password="$GITHUB_PERSONAL_ACCESS_TOKEN" --docker-email="ignore@me.com" -``` - -4. Deploy the Helm chart. Choose one of the provided value files: - -- `values.istio.yaml` deploys the 4 bookinfo components as is from the Istio example -- `values.mixed.yaml` deploys the productinfo dashboard and the ratings service from the Istio image and the details and reviews service as wasm modules -- `values.spin.yaml` deploys all 4 services as wasm modules - -```bash -helm upgrade --install bookinfo . -f values.istio.yaml -``` - -The same command with a different values file can be used to switch between the different combinations. \ No newline at end of file From 54f9f6928729117a76758759ec3428acf93ae283 Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Thu, 13 Apr 2023 16:32:35 +0200 Subject: [PATCH 2/3] update main readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 34f6306..902840e 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ # Spin Examples + +## Bookinfo + +This example ports the [Istio bookinfo sample applications](https://istio.io/latest/docs/examples/bookinfo/) to WASM and runs them +on Kubernetes using the [kwasm-operator](https://kwasm.sh/) and [Spin](https://www.fermyon.com/spin). Check out the `bookinfo/README.md` for more infos. \ No newline at end of file From 6f50d630c77a8c1eadf47fb2fd6d2dde36850275 Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Thu, 13 Apr 2023 16:35:02 +0200 Subject: [PATCH 3/3] link bookinfo readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 902840e..bd97de1 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ ## Bookinfo This example ports the [Istio bookinfo sample applications](https://istio.io/latest/docs/examples/bookinfo/) to WASM and runs them -on Kubernetes using the [kwasm-operator](https://kwasm.sh/) and [Spin](https://www.fermyon.com/spin). Check out the `bookinfo/README.md` for more infos. \ No newline at end of file +on Kubernetes using the [kwasm-operator](https://kwasm.sh/) and [Spin](https://www.fermyon.com/spin). Check out the [bookinfo](bookinfo/) for more infos.