diff --git a/README.md b/README.md index 356b1e0..bc34e50 100644 --- a/README.md +++ b/README.md @@ -163,14 +163,14 @@ If you wish to scale the back-end you can issue the following command Scale only the orders microservice: ```bash -$ kubectl --namespace sockshop scale coherence orders --replicas=3 +$ kubectl --namespace sockshop scale coherence/orders --replicas=3 ``` Or alternatively scale all the microservices: ```bash $ for name in carts catalog orders payment shipping users - do kubectl --namespace sockshop scale coherence $name --replicas=3 + do kubectl --namespace sockshop scale coherence/$name --replicas=3 done ``` diff --git a/doc/complete-application-deployment.md b/doc/complete-application-deployment.md index 2e93209..e30a858 100644 --- a/doc/complete-application-deployment.md +++ b/doc/complete-application-deployment.md @@ -34,6 +34,10 @@ Prometheus can then be accessed as documented in the If installing Prometheus into a RBAC enabled k8s cluster you may need to create the required RBAC resources as described in the [Prometheus RBAC](https://prometheus-operator.dev/docs/operator/rbac/) documentation. +In some environments, installation can fail with the error message "path /sys is not shared or slave mount". +For this demo, if necessary, it will be sufficient to comment out `mountPropagation: HostToContainer` in the +`manifests/nodeExporter-daemonset.yaml` file. + **IMPORTANT** If you installed the Sock Shop back-end into K8s before you installed Prometheus Operator, you must run the following to delete and re-add the deployments for Prometheus to pick up the Pods. This is because the Coherence Operator will not have been able to create Prometheus `ServiceMonitor` resources before Prometheus was installed. @@ -60,6 +64,16 @@ of the Grafana documentation. > Note: This is assuming you have deployed the back-ends via the instructions in > the previous section. +> Note: This step can be skipped if one wants to access application and Grafana/Prometheus/Jaeger services +> just by using `localhost`. +> In that case add port forwarding setup for each service: +>```bash +> $ kubectl --namespace sockshop port-forward svc/front-end 8079:80 +> $ kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090 +> $ kubectl --namespace monitoring port-forward svc/alertmanager-main 9093 +> $ kubectl --namespace monitoring port-forward svc/grafana 3000 +>``` + 1. Create the Load Balancer ```bash @@ -139,12 +153,17 @@ of the Grafana documentation. 5. Access the application - Access the application via the endpoint http://coherence.sockshop.mycompany.com/ + Access the application via the endpoint http://coherence.sockshop.mycompany.com/ (or http://localhost:8079) ### Install the Jaeger Operator 1. Install the Jaeger Operator + The Jaeger Operator requires `cert-manager` to be installed. If it's missing, `cert-manager` + can be installed with the following command: + ```bash + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml + ``` If you have not done, yet, create the `monitoring` namespace: @@ -165,6 +184,21 @@ of the Grafana documentation. kubectl create -f k8s/optional/jaeger.yaml --namespace sockshop ``` + > Note: To access Jaeger UI over localhost add port forwarding setup: + > ```bash + > $ kubectl --namespace sockshop port-forward svc/jaeger-query 16686 + >``` + + > Note: to view not just Sockshop traces but also Coherence traces + > edit `application.yaml` and set `coherence.tracing.ratio` to 1. + >```yaml + > coherence: + > tracing: + > ratio: 1 + >``` + > Due to known issues between Coherence and Spring, Coherence traces will not + > be properly associated with the Spring traces. + 3. Enable Jaeger tracing in the `app.yaml` files and rebuild and redeploy services Set `management.tracing.enabled` to `true`, e.g.: