Skip to content

Commit d5427e1

Browse files
authored
Doc updates and adding Coherence (#1137)
Signed-off-by: Andy Tael <[email protected]>
1 parent 2a7cb5f commit d5427e1

File tree

14 files changed

+272
-62
lines changed

14 files changed

+272
-62
lines changed

docs-source/site/docs/deploy/buildpushapp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Refer to the [documentation for JKube](https://eclipse.dev/jkube/docs/kubernetes
3434
<configuration>
3535
<images>
3636
<image>
37-
<name>sjc.ocir.io/maacloud/repository/phonebook:${project.version}</name>
37+
<name>sjc.ocir.io/tenancy/repository/phonebook:${project.version}</name>
3838
<build>
3939
<from>ghcr.io/oracle/openjdk-image-obaas:21</from>
4040
<assembly>
@@ -60,7 +60,7 @@ mvn clean package k8s:build k8s:push
6060
If the build and push is successful, you should get a message similar to this:
6161

6262
```log
63-
[INFO] k8s: Pushed sjc.ocir.io/maacloud/phonebook/phonebook:0.0.1-SNAPSHOT in 4 minutes and 2 seconds
63+
[INFO] k8s: Pushed sjc.ocir.io/tenancy/phonebook/phonebook:0.0.1-SNAPSHOT in 4 minutes and 2 seconds
6464
[INFO] ------------------------------------------------------------------------
6565
[INFO] BUILD SUCCESS
6666
[INFO] ------------------------------------------------------------------------

docs-source/site/docs/deploy/dbaccess.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For example, if you have the following information:
1818

1919
- `db.name:` Your database name. For example, `helmdb`
2020
- `db.username:` Your database user name. For example, `phonebook`
21-
- `db.password:` Your database user password. For example, `Welcome-12345`
21+
- `db.password:` Your database user password. For example, `SuperSecretPassword`
2222
- `db.service:` Your service name. For example, `helmdb_tp`
2323
- `db.lb_username` Your Liquibase username.
2424
- `db.lb_password` Your Liquibase user password.
@@ -29,10 +29,10 @@ Create a Kubernetes secret (in this example, `phonebook-db-secrets` in the `obaa
2929
kubectl -n obaas-dev create secret generic phonebook-db-secrets \
3030
--from-literal=db.name=helmdb \
3131
--from-literal=db.username=phonebook \
32-
--from-literal=db.password=Welcome-12345 \
32+
--from-literal=db.password=SuperSecretPassword \
3333
--from-literal=db.service=helmdb_tp \
3434
--from-literal=db.lb_username=phonebook \
35-
--from-literal=db.lb_password=Welcome-12345
35+
--from-literal=db.lb_password=SuperSecretPassword
3636
```
3737

3838
You can verify the values by running the following command (this is for the `username` value):
@@ -141,7 +141,7 @@ spec:
141141
SET SERVEROUTPUT ON;
142142
WHENEVER SQLERROR EXIT SQL.SQLCODE;
143143
144-
create user if not exists phonebook identified by "Welcome-12345";
144+
create user if not exists phonebook identified by "SuperSecretPassword";
145145
grant db_developer_role to phonebook;
146146
grant unlimited tablespace to phonebook;
147147
commit;
File renamed without changes.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Apache Kafka
3+
sidebar_position: 2
4+
---
5+
## Apache Kafka
6+
7+
[Apache Kafka](https://kafka.apache.org) is an open-source, distributed streaming platform designed for high-throughput, fault-tolerant, and scalable real-time data processing. It acts as a messaging system that enables applications to publish, subscribe to, store, and process streams of data (events or messages) efficiently.
8+
9+
### Installing Apache Kafka
10+
11+
Apache Kafka will be installed if the `kafka.enabled` is set to `true` in the `values.yaml` file. The default namespace for Apache Kafka is `kafka`.
12+
13+
### Strimzi Operator
14+
15+
The Kafka cluster in Oracle Backend for Microservices and AI is deployed and managed using the [Strimzi](https://strimzi.io) operator, a Kubernetes-native solution for running Apache Kafka on Kubernetes. [Strimzi Documentation](https://strimzi.io/docs/operators/latest/overview). Strimzi provides a set of operators that automate the deployment, configuration, and management of Apache Kafka clusters on Kubernetes.
16+
17+
#### Cluster Configuration
18+
19+
The default Kafka cluster deployed in Oracle Backend for Microservices and AI uses ZooKeeper for cluster coordination. The cluster can be accessed at:
20+
21+
`kafka-cluster-kafka-bootstrap.kafka.svc.cluster.local:9092`
22+
23+
### Using Kafka with Spring Boot
24+
25+
To connect your Spring Boot application to the Kafka cluster deployed in Oracle Backend for Microservices and AI, you need to add the following dependencies and configuration. [Spring for Apache Kafka Documentation](https://spring.io/projects/spring-kafka/)
26+
27+
#### Dependencies
28+
29+
**Maven** (`pom.xml`):
30+
31+
```xml
32+
<dependencies>
33+
<!-- Spring Kafka -->
34+
<dependency>
35+
<groupId>org.springframework.kafka</groupId>
36+
<artifactId>spring-kafka</artifactId>
37+
</dependency>
38+
</dependencies>
39+
```
40+
41+
#### Spring Boot Configuration
42+
43+
Create or update your `application.yaml` file to connect to the Kafka cluster:
44+
45+
```yaml
46+
spring:
47+
kafka:
48+
# Bootstrap server address
49+
bootstrap-servers: kafka-cluster-kafka-bootstrap.kafka.svc.cluster.local:9092
50+
51+
# Consumer configuration
52+
consumer:
53+
group-id: my-application-group
54+
auto-offset-reset: earliest
55+
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
56+
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
57+
58+
# Producer configuration
59+
producer:
60+
key-serializer: org.apache.kafka.common.serialization.StringSerializer
61+
value-serializer: org.apache.kafka.common.serialization.StringSerializer
62+
```
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
title: Coherence Operator
3+
sidebar_position: 3
4+
---
5+
## Coherence Operator
6+
7+
The Oracle Coherence Operator is an open-source Kubernetes operator that enables the deployment and management of Oracle Coherence clusters in Kubernetes environments. It provides features to assist with deploying, scaling, and managing Coherence data grid clusters using cloud-native technologies. [Full Documentation can be found here](https://oracle.github.io/coherence-operator/)
8+
9+
### Installing the Coherence Operator
10+
11+
Oracle Database Operator for Kubernetes will be installed if the `coherence.enabled` is set to `true` in the `values.yaml` file. The default namespace for Oracle Database Operator is `coherence`.
12+
13+
### Creating a Coherence Cluster
14+
15+
Follow these steps to create a basic Coherence cluster named `mysample-cluster`:
16+
17+
#### Prerequisites
18+
19+
- Coherence Operator is installed and running
20+
- `kubectl` is configured to access your Kubernetes cluster
21+
- You have a namespace where you want to deploy the cluster (e.g., `coherence`)
22+
23+
##### Step 1: Create the Coherence Cluster YAML
24+
25+
Create a file named `mysample-cluster.yaml` with the basic cluster configuration
26+
27+
##### YAML Configuration Files
28+
29+
**Basic Cluster Configuration** (`mysample-cluster.yaml`):
30+
31+
```yaml
32+
apiVersion: coherence.oracle.com/v1
33+
kind: Coherence
34+
metadata:
35+
name: mysample-cluster
36+
spec:
37+
replicas: 3
38+
image: ghcr.io/oracle/coherence-ce:22.06.7
39+
coherence:
40+
cacheConfig: coherence-cache-config.xml
41+
jvm:
42+
memory:
43+
heapSize: 2g
44+
ports:
45+
- name: http
46+
port: 8080
47+
```
48+
49+
**Cluster with Persistence** (`mysample-cluster-persistent.yaml`):
50+
51+
```yaml
52+
apiVersion: coherence.oracle.com/v1
53+
kind: Coherence
54+
metadata:
55+
name: mysample-cluster
56+
spec:
57+
replicas: 3
58+
image: ghcr.io/oracle/coherence-ce:22.06.7
59+
coherence:
60+
cacheConfig: coherence-cache-config.xml
61+
persistence:
62+
mode: active
63+
persistentVolumeClaim:
64+
accessModes:
65+
- ReadWriteOnce
66+
resources:
67+
requests:
68+
storage: 10Gi
69+
jvm:
70+
memory:
71+
heapSize: 2g
72+
ports:
73+
- name: http
74+
port: 8080
75+
- name: metrics
76+
port: 9612
77+
env:
78+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
79+
value: "http://otel-collector:4317"
80+
- name: OTEL_SERVICE_NAME
81+
value: "mysample-cluster"
82+
- name: OTEL_METRICS_EXPORTER
83+
value: "otlp"
84+
- name: OTEL_TRACES_EXPORTER
85+
value: "otlp"
86+
```
87+
88+
**Notes:**
89+
90+
- The `replicas` field determines the number of pods in the cluster (default: 3)
91+
- The `image` field specifies the Coherence container image to use
92+
- For persistence, ensure your Kubernetes cluster has a default StorageClass configured, or specify one using `storageClassName`
93+
- The `env` section configures OpenTelemetry (OTEL) for metrics and traces export to an OTEL collector
94+
- The `metrics` port (9612) exposes Coherence metrics for collection
95+
96+
##### Step 2: Deploy the Cluster
97+
98+
Apply the YAML configuration to create the cluster:
99+
100+
```bash
101+
kubectl apply -f mysample-cluster.yaml -n coherence
102+
```
103+
104+
##### Step 3: Verify the Deployment
105+
106+
Check that the cluster pods are running:
107+
108+
```bash
109+
# Check the Coherence resource
110+
kubectl get coherence -n coherence
111+
112+
# Check the pods
113+
kubectl get pods -n coherence
114+
115+
# View cluster details
116+
kubectl describe coherence mysample-cluster -n coherence
117+
```
118+
119+
Wait for all pods to reach the `Running` state. You can watch the progress with:
120+
121+
```bash
122+
kubectl get pods -n coherence -w
123+
```
124+
125+
### Using Coherence with Spring Boot
126+
127+
To connect your Spring Boot application to the `mysample-cluster` Coherence cluster deployed above, you need to add the following dependencies and configuration. [Coherence Spring Documentation](https://spring.coherence.community/4.3.0/index.html#/about/01_overview)
128+
129+
#### Dependencies
130+
131+
**Maven** (`pom.xml`):
132+
133+
```xml
134+
<dependencies>
135+
<!-- Coherence Spring Boot Starter -->
136+
<dependency>
137+
<groupId>com.oracle.coherence.spring</groupId>
138+
<artifactId>coherence-spring-boot-starter</artifactId>
139+
</dependency>
140+
141+
<!-- Coherence CE -->
142+
<dependency>
143+
<groupId>com.oracle.coherence.ce</groupId>
144+
<artifactId>coherence</artifactId>
145+
</dependency>
146+
</dependencies>
147+
```
148+
149+
#### Spring Boot Configuration
150+
151+
Create or update your `application.yaml` file to connect to the `mysample-cluster`:
152+
153+
```yaml
154+
coherence:
155+
# Set the instance type to 'client' to connect to an existing cluster
156+
instance:
157+
type: client
158+
159+
# Configure the cluster connection
160+
cluster:
161+
name: mysample-cluster
162+
163+
# Configure sessions
164+
sessions:
165+
- name: default
166+
config: coherence-cache-config.xml
167+
priority: 1
168+
169+
# Logging configuration (optional)
170+
logging:
171+
destination: slf4j
172+
logger-name: Coherence
173+
174+
# Server startup timeout (optional)
175+
server:
176+
startup-timeout: 60s
177+
```

docs-source/site/docs/platform/conductor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Conductor Workflow Orchestration
3-
sidebar_position: 2
3+
sidebar_position: 4
44
---
55
## Conductor
66

docs-source/site/docs/platform/dbexporter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Oracle Database Metrics Exporter
3-
sidebar_position: 3
3+
sidebar_position: 5
44
---
55
## Oracle Database Metrics Exporter
66

docs-source/site/docs/platform/dboperator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Oracle Database Operator for Kubernetes
3-
sidebar_position: 4
3+
sidebar_position: 6
44
---
55
## Oracle Database Operator for Kubernetes
66

docs-source/site/docs/platform/esooperator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: External Secrets Operator
3-
sidebar_position: 5
3+
sidebar_position: 7
44
---
55
## External Secrets Operator
66

docs-source/site/docs/platform/eureka.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Spring Boot Eureka Server
3-
sidebar_position: 6
3+
sidebar_position: 8
44
---
55
## Spring Boot Eureka Server
66

0 commit comments

Comments
 (0)