From 21dad159de614d05f4ba808d1ea93e586c84fccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 22 Nov 2024 02:11:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Many=20fixes=20courtesy=20of=20@?= =?UTF-8?q?soulshake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/k8s/bento-intro.md | 14 +++++++------- slides/k8s/handson-mlops.md | 4 ++-- slides/k8s/ingress-tls.md | 2 +- slides/k8s/ollama-intro.md | 30 ++++++++++++++++++++++++++---- slides/k8s/ollama-metrics.md | 10 +++++----- slides/k8s/resource-limits.md | 2 +- slides/shared/about-slides.md | 2 +- 7 files changed, 43 insertions(+), 21 deletions(-) diff --git a/slides/k8s/bento-intro.md b/slides/k8s/bento-intro.md index 998e919f..31177e65 100644 --- a/slides/k8s/bento-intro.md +++ b/slides/k8s/bento-intro.md @@ -204,7 +204,7 @@ INFO Pipeline has terminated. Shutting down the service @service=bento ``` ] -The pipeline should complete in a just a few seconds. +The pipeline should complete in just a few seconds. --- @@ -297,7 +297,7 @@ Option 2: [read the docs][output-http-server] --- -## πŸ™‹ Choose your adventure +## πŸ™‹ Choose your own adventure Do you want to try to write that configuration? @@ -329,7 +329,7 @@ It's also possible to batch, stream... ## Trying it out -- Run Bento with that configuration: +- Run Bento with this configuration: ```bash bento --config redis2http.yaml & ``` @@ -395,7 +395,7 @@ We get a JSON payload, and we want to use the `response` field. ## Configure an enrichment workflow -The [documentation][enrichment] is really good! +The [Bento documentation][enrichment] is really good! We need to set up: @@ -519,11 +519,11 @@ flowchart LR result_map --> OUT -- The `branch` processor allows to do the processing "on the side" +- The `branch` processor allows doing the processing "on the side" - `request_map` and `result_map` transform the message before/after processing -- Then, the result if combined with the original message (the `city`) +- Then, the result is combined with the original message (the `city`) --- @@ -572,7 +572,7 @@ Post "http://ollama...": context deadline exceeded --- -## πŸ™‹ Choose your adventure +## πŸ™‹ Choose your own adventure How should we address errors? diff --git a/slides/k8s/handson-mlops.md b/slides/k8s/handson-mlops.md index 5ef28da7..5a76a355 100644 --- a/slides/k8s/handson-mlops.md +++ b/slides/k8s/handson-mlops.md @@ -18,7 +18,7 @@ Misattributed to Benjamin Franklin - If you are attending a live workshop: - - follow along the demos, ask questions at any time + - follow along with the demos, ask questions at any time - if you can, try to run some of the examples and demos in your environment @@ -50,7 +50,7 @@ class: in-person, pic - Your lab environments will be available for the duration of the workshop - (check with your instructor to know exactly when they'll be shutdown) + (check with your instructor to know exactly when they'll be shut down) - Note that for budget reasonsΒΉ, your environment will be fairly modest diff --git a/slides/k8s/ingress-tls.md b/slides/k8s/ingress-tls.md index 86f3a3d7..9e30e568 100644 --- a/slides/k8s/ingress-tls.md +++ b/slides/k8s/ingress-tls.md @@ -96,7 +96,7 @@ class: extra-details --- -## Choose your adventure! +## Choose your own adventure! - We present 3 methods to obtain a certificate diff --git a/slides/k8s/ollama-intro.md b/slides/k8s/ollama-intro.md index 67268e9f..c5869d92 100644 --- a/slides/k8s/ollama-intro.md +++ b/slides/k8s/ollama-intro.md @@ -34,7 +34,7 @@ Assuming Ollama is installed and running: ollama run qwen2:1.5b "What's the solution to global warming?" ``` -We're going to use that model because it's relatively small. +We're going to use this model because it's relatively small. Many others are available (see https://ollama.dev/search). @@ -110,7 +110,7 @@ kubectl wait pod ollama --for=condition=Ready (If that command times out, try again and/or specify a higher timeout.) ```bash -kubectl exec ollama -- ollama run qwen2:1.5b "What's Bach best piece?" +kubectl exec ollama -- ollama run qwen2:1.5b "What's Bach's best piece?" ``` Shutdown the pod: @@ -197,7 +197,7 @@ kubectl run httpclient --rm -it --image alpine/httpie -- --ignore-stdin \ ## Potential solutions -- Bake the model in the image +- Bake the model into the image πŸ™… Personal opinion: this is a bad idea (image size, maintenance...) @@ -215,7 +215,7 @@ kubectl run httpclient --rm -it --image alpine/httpie -- --ignore-stdin \ --- -## πŸ™‹ Choose your adventure +## πŸ™‹ Choose your own adventure Should we add that lifecycle hook? @@ -276,6 +276,28 @@ There should be two processes: --- +class: extra-details + +## HTTPie + +https://httpie.io/ + +- CLI client to send requests to web services + +- Similar to curl, but made specifically to talk to API backends + +```bash +httpie [key=value] [key=value] [key:=value] +``` + +- The `key=value` pairs get turned into a JSON object + +- `key:=value` indicates a parameter to be sent "as-is" + + (ideal for e.g. boolean or numbers) + +--- + ## Sending some load We're going to use `hey`: diff --git a/slides/k8s/ollama-metrics.md b/slides/k8s/ollama-metrics.md index 72c1cad5..89d1b1f9 100644 --- a/slides/k8s/ollama-metrics.md +++ b/slides/k8s/ollama-metrics.md @@ -98,7 +98,7 @@ class: extra-details - By default, the Prometheus Operator will only look at \*Monitors with the right labels -- Our extra options mean "use all the Monitors that you will find!" +- Our extra options mean "use all the Monitors that you find!" --- @@ -116,7 +116,7 @@ Get the public address of one of our nodes: kubectl get nodes -o wide ``` -Connect to the public address of a node, on the node port. +In a browser, connect to the public address of any node, on the node port. The default login and password are `admin` / `prom-operator`. @@ -158,7 +158,7 @@ Select a namespace and see the CPU and RAM usage for the pods in that namespace. --- -## πŸ™‹ Choose your adventure +## πŸ™‹ Choose your own adventure Do we want to... @@ -186,7 +186,7 @@ Do we want to... (for HAProxy metrics, you can use [Grafana dashboard 12693, HAProxy 2 Full][grafana-12693]) -- If you don't want to write the manifests, you can use [these ones][ollama-yaml] +- If you don't want to write the manifests, you can use [these][ollama-yaml] [grafana-12693]: https://grafana.com/grafana/dashboards/12693-haproxy-2-full/ [ollama-yaml]: https://github.com/jpetazzo/beyond-load-balancers/tree/main/ollama @@ -268,6 +268,6 @@ class: extra-details - This is because our node is oversubscribed -- This is because we didn't specify of resource requests/limits (yet) +- This is because we haven't specified resource requests/limits (yet) (we'll do that later!) diff --git a/slides/k8s/resource-limits.md b/slides/k8s/resource-limits.md index 0ff0de59..efdf8976 100644 --- a/slides/k8s/resource-limits.md +++ b/slides/k8s/resource-limits.md @@ -194,7 +194,7 @@ class: extra-details - use [static CPU manager policy](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy) -For more details, check [this blog post](https://erickhun.com/posts/kubernetes-faster-services-no-cpu-limits/) or these ones ([part 1](https://engineering.indeedblog.com/blog/2019/12/unthrottled-fixing-cpu-limits-in-the-cloud/), [part 2](https://engineering.indeedblog.com/blog/2019/12/cpu-throttling-regression-fix/)). +For more details, check [this blog post](https://erickhun.com/posts/kubernetes-faster-services-no-cpu-limits/) or these: ([part 1](https://engineering.indeedblog.com/blog/2019/12/unthrottled-fixing-cpu-limits-in-the-cloud/), [part 2](https://engineering.indeedblog.com/blog/2019/12/cpu-throttling-regression-fix/)). --- diff --git a/slides/shared/about-slides.md b/slides/shared/about-slides.md index 9bd8b28c..36e7ff4d 100644 --- a/slides/shared/about-slides.md +++ b/slides/shared/about-slides.md @@ -46,7 +46,7 @@ (let's say we'll keep them online at least 1 year, how about that?) -- You can download the slides using that URL: +- You can download the slides using this URL: @@ZIP@@