-
Notifications
You must be signed in to change notification settings - Fork 8
/
TODO
97 lines (90 loc) · 5.93 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
2022.11
--todo:
not applicable / unrelated to istio..
- java -> kotlin & eliminate lombok
- mvn -> gradle
iirc there's an issue with the migration to gradle due to a dependency on a maven plugin for the front-end stuff (wro4j).
https://github.com/spring-petclinic/spring-petclinic-cloud appears to be out of sync with,
or to have diverged from the https://github.com/spring-projects/spring-petclinic:
- the .less files are now .scss files, and the wro plugin is no longer used (since we're using sass)
- the java class names are different
(i suspect these changes were made to support gradle)
--done:
x review the docs/readme learn the basics of using the repo
x setup a local k3d environment with registry, install istio
x review the code
x understand the app and how it functions
x reconfigure gateway routing of service api endpoints in istio terms using a VirtualService
x add prometheus annotations to app deployment manifests so that sidecar can pick up app container metrics
x eliminate unneeded spring cloud dependencies
x learn to build the code, create the images, and push them to a registry that k8s can fetch images from
x deploy the app to k8s (manifests)
x configure/deploy the mysql databases for each service
x update to latest stable version of jdk/jvm - from 11 to 19
x remove spring cloud kubernetes, can revisit that at a later time
x update version of spring/springboot to latest stable: 2.6.3 -> 2.7.5
x read up on spring cloud kubernetes - https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/
x is the manifest role.yaml (that configures a role named "namespacereader" with rolebinding) even needed?
it is necessary to allow reading the application.yaml info from the configmap.
see the spring cloud kubernetes project documentation for more information.
x give each service its own service account
x Deploy the app and see it work
x get routing to function
x Get to the bottom of why services often fail to come up or take an inordinate amount of time.
need to pay closer attention to service resource requests/limits
x Run prometheus, grafana, jaeger & kiali; send traffic to the app; watch kiali dashboard
x Verify/fix trace headers propagation
x see https://istio.io/latest/docs/tasks/observability/distributed-tracing/overview/
x replace deprecated spring cloud sleuth with new way to propagate distributed traces
x Verify that app metrics are collected in addition to envoy metrics
x accessing http://localhost/#!/owners/details/6 from a browser
results in being able to see the full distributed trace,
but when i use siege i cannot see the backend services in kiali
- that's because you are calling the frontend url which assumes a browser
that executes javascript to then call the backend api endpoint.
what you want is to capture the url of the backend api endpoint
x improve the build files - i see a lot of repetition; perhaps even incorrect parent-child relationship configuration
x Remind yourself how to work with maven multi-module projects.
I suspect that many of the common dependencies in the child modules can be pulled into the parent.
x Replace build system: mvn -> gradle
- there may be an issue with the wro plugin for gradle and the converstion of .less files to .css in the build.
dsyer worked on this, see:
- https://github.com/wro4j/wro4j-gradle-plugin/issues/2
- https://github.com/dsyer/spring-petclinic/tree/gradle
changed my mind. this is not important. stick with maven for now.
x Replace resilience4j configuration with istio circuit breaker configuration
x configure the 4s timeout with istio instead of resilience4j.
x there's also the matter of the fallback when the call times out and its accompanying test.
x Retrofit Visits service so can be configured with a specified delay
x Write up how to test fallback for timeout on visits service endpoint.
x Add version labels to each service
x Upgrade to Spring Boot 3.0
x Question: Has someone already adapted PetClinic for Istio, or otherwise played with Spring Boot on Istio?
- https://github.com/rverma-jm/spring-petclinic-istio
- https://piotrminkowski.com/2020/06/01/service-mesh-on-kubernetes-with-istio-and-spring-boot/
- https://piotrminkowski.com/2020/06/03/circuit-breaker-and-retries-on-kubernetes-with-istio-and-spring-boot/
x Leverage workload identity: add an authorization policy that restricts who can talk to each db
x resolve problem with trace header propagation in boot3 & micrometer
x make project function for either a local or a remote/cloud setup; differences are:
x ingress endpoint is either localhost or LB_IP of istio-system/istio-ingressgateway
x push and pull image registries differ
202303..
x give yourself a refresher on the work you did with that app
x review the code, compare with original state
x add to readme a section that discusses the spring cloud gateway replacement
x add to readme a section that discusses spring dependency changes
x catalog removed dependencies
x review remaining dependencies:
boot, actuator, micrometer tracing
web or reactive web, spring data jpa, mysql jdbc driver/connector
x should be able to access the api endpoints either:
1. as shown internally from inside the cluster via the sleep pod, for example
2. via the gateway-exposed routes via the exposed /api/* endpoints
x should mention that the mysql services are also proxied by Envoy. i actually already do.
x add to readme a section that discusses/documents exposing a prometheus scrape endpoint through "micrometer registry" dependency,
and how i use the istio conventional annotation to expose app-specific metrics in deployments
x go through readme once more with a remote setup using a gcp-provisioned cluster
x make sure the latest images work (updated spring boot from v3.0.0 to v3.0.5)
2024..
x upgrade spring boot to latest version 3.2.2 and micrometer tracing to 1.2.2
x configure timedAspect per documentation in order to enable @Timed annotation (visits and customers services) for business metrics