Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vasac committed Mar 15, 2024
1 parent 534c56e commit bb418f0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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
```

Expand Down
36 changes: 35 additions & 1 deletion doc/complete-application-deployment.md
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand All @@ -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.:
Expand Down

0 comments on commit bb418f0

Please sign in to comment.