Repo with assets to reproduce the talk
- crc setup
- crc start --cpus 7
wget https://mirror.openshift.com/pub/openshift-v4/clients/serverless/latest/kn-linux-amd64.tar.gz -O my-kn.tar.gz
tar -xf my-kn.tar.gz
sudo mv kn-linux-amd64 /usr/local/bin/kn
-
Install the operator by following the official doc
oc create -f yamls/serverless-operator.yaml
-
Create Serving
oc project openshift-serverless
oc create -f yamls/serving.yaml
- Check:
oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
-
Service
oc create project mock-ns
kn service create mock --namespace mock-ns --image ghcr.io/jgomezselles/kubecon24/server-mock:0.0.1 --concurrency-limit 4 --force
- Need to attack mock-hermes.apps-crc.testing:80
-
Create user-workload-monitoring (Prometheus)
oc create -f yamls/cluster-monitoring-config.yaml
-
Install power monitoring
- Follow instructions
-
Deploy grafana
- Simply run deploy-grafana.sh
-
Install hermes
helm install hermes -n mock-ns charts/hermes-job/
-
Install OTel
oc create -f otel-collector/
- Check by
oc get csv -n openshift-opentelemetry-operator
-
Create service monitor
oc create -f otel-service-monitor.yaml
avg(rate(hermes_requests_sent_total{id="post1"}[1m]))
kepler:kepler:container_joules_total:consumed:24h:by_ns{container_namespace=~"$namespace"} * $watt_per_second_to_kWh
docker build -f server-mock/docker/Dockerfile . -t ghcr.io/jgomezselles/kubecon24/server-mock:0.0.1 --progress plain --no-cache
kn service delete mock
oc delete -f yamls/serving.yaml
oc delete -f yamls/serverless-operator.yaml
- Internal endpoint?
- Update helm and installations with https://jgomezselles.github.io/hermes-charts/
- Deploy mock as server
- Add OTel collector to helm charts?
- Update namespaces in svc monitor and collector
- Find the best way to deploy the mock with a LoadBalancer in http/2
- Install both at the same time and run
- Create dashboard
- See if we can save prometheus metrics to just reuse them
- Fix service monitor in the otel collector
- Add endpoint to hermes to export OTLP metrics