Skip to content

Commit 449da98

Browse files
authored
Merge pull request #291 from splunk/conf24
Releasing conf workshop
2 parents 46fe945 + f2b7b83 commit 449da98

40 files changed

+210
-181
lines changed

.bumpversion.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ search = WSVERSION={current_version}
1414
replace = WSVERSION={new_version}
1515

1616
[bumpversion:file:workshop/aws/ec2/terraform.tfvars.template]
17-
search = wsversion = "{current_version}"
18-
replace = wsversion = "{new_version}"
17+
search = default = "{current_version}"
18+
replace = default = "{new_version}"
1919

2020
[bumpversion:file:deprecated/multipass/terraform.tfvars.template]
21-
replace = wsversion = "{new_version}"
22-
search = wsversion = "{current_version}"
21+
search = default = "{current_version}"
22+
replace = default = "{new_version}"
2323

2424
[bumpversion:file:deprecated/multipass/main.tf]
2525
search = default = "{current_version}"

content/en/conf24/1-zero-config-k8s/1-architecture/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The diagram below details the architecture of the Spring PetClinic Java applicat
99

1010
The Spring PetClinic Java application is a simple microservices application that consists of a frontend and backend services. The frontend service is a Spring Boot application that serves a web interface to interact with the backend services. The backend services are Spring Boot applications that serve RESTful API's to interact with a MySQL database.
1111

12-
By the end of this workshop, you will have a better understanding of how to enable **Splunk OpenTelemetry automatic discovery and configuration** for your Java-based applications running in Kubernetes.
12+
By the end of this workshop, you will have a better understanding of how to enable **automatic discovery and configuration** for your Java-based applications running in Kubernetes.
1313

1414
![Splunk Otel Architecture](../images/auto-instrumentation-java-diagram.png)
1515

content/en/conf24/1-zero-config-k8s/2-preparation/1-otel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ weight: 2
66

77
To get Observability signals (**metrics, traces** and **logs**) into **Splunk Observability Cloud** the Splunk OpenTelemetry Collector needs to be deployed into the Kubernetes cluster.
88

9-
For this workshop, we will be using the Splunk OpenTelemetry Collector Helm Chart. First we need to add the Helm chart repository to Helm and update to ensure the latest state:
9+
For this workshop, we will be using the Splunk OpenTelemetry Collector Helm Chart. First we need to add the Helm chart repository to Helm and update to ensure the latest version:
1010

1111
{{< tabs >}}
12-
{{% tab title="Helm Repo Add" %}}
12+
{{% tab title="Install Helm Chart" %}}
1313

1414
``` bash
1515
helm repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart && helm repo update
@@ -32,7 +32,7 @@ Update Complete. ⎈Happy Helming!⎈
3232
{{% /tab %}}
3333
{{< /tabs >}}
3434

35-
**Splunk Observability Cloud** offers wizards in the UI to walk you through the setup of the OpenTelemetry Collector on Kubernetes, but in the interest of time, we will use the Helm command below. Some additional parameters are set to enable the operator and automatic discovery and configuration.
35+
**Splunk Observability Cloud** offers wizards in the UI to walk you through the setup of the OpenTelemetry Collector on Kubernetes, but in the interest of time, we will use the Helm install command below. Additional parameters are set to enable the operator and automatic discovery and configuration.
3636

3737
* `--set="operator.enabled=true"` - this will install the Opentelemetry operator that will be used to handle automatic discovery and configuration.
3838
* `--set="certmanager.enabled=true"` - this will install the required certificate manager for the operator.

content/en/conf24/1-zero-config-k8s/2-preparation/2-petclinic.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ linkTitle: 2. Deploy PetClinic Application
44
weight: 3
55
---
66

7-
#### Deploy the PetClinic Application
8-
97
The first deployment of our application will be using prebuilt containers to give us the base scenario: a regular Java microservices-based application running in Kubernetes that we want to start observing. So let's deploy our application:
108

119
{{< tabs >}}
@@ -106,5 +104,3 @@ curl -X GET http://localhost:9999/v2/_catalog
106104

107105
{{% /tab %}}
108106
{{< /tabs >}}
109-
110-
If this fails then reach out to your Instructor for a replacement instance.

content/en/conf24/1-zero-config-k8s/2-preparation/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ time: 15 minutes
77
---
88

99
The instructor will provide you with the login information for the instance that we will be using during the workshop.
10+
1011
When you first log into your instance, you will be greeted by the Splunk Logo as shown below. If you have any issues connecting to your workshop instance then please reach out to your Instructor.
1112

1213
``` text
@@ -42,7 +43,7 @@ REALM = <e.g. eu0, us1, us2, jp0, au0 etc.>
4243
RUM_TOKEN = <redacted>
4344
HEC_TOKEN = <redacted>
4445
HEC_URL = https://<...>/services/collector/event
45-
INSTANCE = <workshop name>
46+
INSTANCE = <instance_name>
4647
```
4748

4849
{{% /tab %}}

content/en/conf24/1-zero-config-k8s/3-verify-setup/1-website.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Verify the PetClinic Website
3-
linkTitle: 1. Verify the PetClinic Webiste
3+
linkTitle: 1. Verify PetClinic Website
44
weight: 1
55
---
66

@@ -17,4 +17,8 @@ You can validate if the application is running by visiting **http://<IP_ADDRESS>
1717

1818
Make sure the application is working correctly by visiting the **All Owners** **(1)** and **Veterinarians** **(2)** tabs, you should get a list of names in each case.
1919

20+
{{% notice note %}}
21+
As each service needs to start up and synchronize with the database, it may take a few minutes for the application to fully start up.
22+
{{% /notice %}}
23+
2024
![owners](../../images/petclinic-owners.png)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: 2. Section Break
3+
weight: 2
4+
archetype: chapter
5+
---

content/en/conf24/1-zero-config-k8s/3-verify-setup/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Verify Kubernetes Cluster metrics
3-
linkTitle: 3. Verify everything is working
3+
linkTitle: 3. Verify Cluster Metrics
44
weight: 4
55
time: 10 minutes
66
---
Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Automatic Discovery and Configuration
3-
linkTitle: 1. Automatic Discovery and Configuration
2+
title: Patching the Deployment
3+
linkTitle: 1. Patching the Deployment
44
weight: 1
55
---
66

7-
To see how automatic discovery and configuration works with a single pod we will patch the `api-gateway`. Once patched, the OpenTelemetry Collector will inject the automatic discovery and configuration library and the Pod will be restarted in order to start sending traces and profiling data. To show what happens when you enable automatic discovery and configuration, let's do a *before and after* of the configuration:
7+
To configure **automatic discovery and configuration** the deployments need to be patched to add the instrumentation annotation. Once patched, the OpenTelemetry Collector will inject the automatic discovery and configuration library and the Pods will be restarted in order to start sending traces and profiling data. First, confirm that the `api-gateway` does not have the `splunk-otel-java` image.
88

99
{{< tabs >}}
1010
{P}{{% tab title="Describe api-gateway" %}}
@@ -23,25 +23,33 @@ Image: quay.io/phagen/spring-petclinic-api-gateway:0.0.2
2323
{{% /tab %}}
2424
{{< /tabs >}}
2525

26-
This container was pulled from a remote repository `quay.io` and was not built to send traces to **Splunk Observability Cloud**. To enable the Java automatic discovery and configuration on the api-gateway service add the `inject-java` annotation to Kubernetes with the `kubectl patch deployment` command.
26+
Next, enable the Java automatic discovery and configuration for all of the services by adding the annotation to the deployments. The following command will patch the all deployments. This will trigger the OpenTelemetry Operator to inject the `splunk-otel-java` image into the Pods:
2727

2828
{{< tabs >}}
29-
{{% tab title="Patch api-gateway" %}}
29+
{{% tab title="Patch all PetClinic services" %}}
3030

3131
``` bash
32-
kubectl patch deployment api-gateway -p '{"spec": {"template":{"metadata":{"annotations":{"instrumentation.opentelemetry.io/inject-java":"default/splunk-otel-collector"}}}}}'
32+
kubectl get deployments -l app.kubernetes.io/part-of=spring-petclinic -o name | xargs -I % kubectl patch % -p "{\"spec\": {\"template\":{\"metadata\":{\"annotations\":{\"instrumentation.opentelemetry.io/inject-java\":\"default/splunk-otel-collector\"}}}}}"
3333
```
3434

3535
{{% /tab %}}
3636
{{% tab title="Patch Output" %}}
3737

3838
``` text
39+
deployment.apps/config-server patched (no change)
40+
deployment.apps/admin-server patched (no change)
41+
deployment.apps/customers-service patched
42+
deployment.apps/visits-service patched
43+
deployment.apps/discovery-server patched (no change)
44+
deployment.apps/vets-service patched
3945
deployment.apps/api-gateway patched
4046
```
4147

4248
{{% /tab %}}
4349
{{< /tabs >}}
4450

51+
There will be no change for the **config-server**, **discovery-server** and **admin-server** as these have already been patched.
52+
4553
To check the container image(s) of the `api-gateway` pod again, run the following command:
4654

4755
{{< tabs >}}
@@ -64,32 +72,8 @@ Image: quay.io/phagen/spring-petclinic-api-gateway:0.0.2
6472

6573
A new image has been added to the `api-gateway` which will pull `splunk-otel-java` from `ghcr.io` (if you see two `api-gateway` containers, the original one is probably still terminating, so give it a few seconds).
6674

67-
To patch all the other services in the Spring Petclinic application, run the following command. This will add the `inject-java` annotation to the remaining services. There will be no change for the **config-server**, **discovery-server**, **admin-server** and **api-gateway** as these have already been patched.
68-
69-
{{< tabs >}}
70-
{{% tab title="Patch all Petclinic services" %}}
71-
72-
``` bash
73-
kubectl get deployments -l app.kubernetes.io/part-of=spring-petclinic -o name | xargs -I % kubectl patch % -p "{\"spec\": {\"template\":{\"metadata\":{\"annotations\":{\"instrumentation.opentelemetry.io/inject-java\":\"default/splunk-otel-collector\"}}}}}"
74-
75-
```
76-
77-
{{% /tab %}}
78-
{{% tab title="Patch Output" %}}
79-
80-
``` text
81-
deployment.apps/config-server patched (no change)
82-
deployment.apps/admin-server patched (no change)
83-
deployment.apps/customers-service patched
84-
deployment.apps/visits-service patched
85-
deployment.apps/discovery-server patched (no change)
86-
deployment.apps/vets-service patched
87-
deployment.apps/api-gateway patched (no change)
88-
```
89-
90-
{{% /tab %}}
91-
{{< /tabs >}}
92-
9375
Navigate back to the Kubernetes Navigator in **Splunk Observability Cloud**. After a couple of minutes you will see that the Pods are being restarted by the operator and the automatic discovery and configuration container will be added. This will look similar to the screenshot below:
9476

9577
![restart](../../images/k8s-navigator-restarted-pods.png)
78+
79+
Wait for the Pods to turn green in the Kubernetes Navigator, then go to **APM** ![APM](../../images/apm-icon.png?classes=inline&height=25px) to see the data generated by the traces from the newly instrumented services.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Viewing the data in Splunk APM
3+
linkTitle: 2. Viewing APM Data
4+
weight: 2
5+
---
6+
7+
Change the **Environment** filter **(1)** to the name of your workshop instance in the dropdown box (this will be **`<INSTANCE>-workshop`** where **`INSTANCE`** is the value from the shell script you ran earlier) and make sure it is the only one selected.
8+
9+
![apm](../../images/zero-config-first-services-overview.png)
10+
11+
You will see the name **(2)** of the **api-gateway** service and metrics in the Latency and Request & Errors charts (you can ignore the Critical Alert, as it is caused by the sudden request increase generated by the load generator). You will also see the rest of the services appear.
12+
13+
We will visit the **Service Map** **(3)** in the next section.

0 commit comments

Comments
 (0)