Skip to content

Commit 8e03f50

Browse files
authored
Refactor docs and examples (#508)
Add a simple "hello world" Operator example. Reorganise and clean-up examples docs Bump Coherence version to 21.06.2
1 parent 3615c9d commit 8e03f50

File tree

141 files changed

+1671
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1671
-465
lines changed

.github/workflows/coherence-matrix.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
coherenceVersion:
32-
- "21.06.1"
32+
- "21.06.2"
3333
- "20.12.2"
3434
- "14.1.2-0-0-SNAPSHOT"
3535
- "14.1.1-0-7-SNAPSHOT"
@@ -39,8 +39,8 @@ jobs:
3939
- "12.2.1-4-11-SNAPSHOT"
4040
- "12.2.1-3-15-SNAPSHOT"
4141
include:
42-
- coherenceVersion: "21.06.1"
43-
coherence-image: "ghcr.io/oracle/coherence-ce:21.06.1"
42+
- coherenceVersion: "21.06.2"
43+
coherence-image: "ghcr.io/oracle/coherence-ce:21.06.2"
4444
- coherenceVersion: "20.12.2"
4545
coherence-image: "ghcr.io/oracle/coherence-ce:20.12.2"
4646
- coherenceVersion: "14.1.2-0-0-SNAPSHOT"

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ COMPATIBLE_SELECTOR = control-plane=coherence
3232
# ----------------------------------------------------------------------------------------------------------------------
3333
# The Coherence image to use for deployments that do not specify an image
3434
# ----------------------------------------------------------------------------------------------------------------------
35-
COHERENCE_VERSION ?= 21.06.1
36-
COHERENCE_IMAGE ?= oraclecoherence/coherence-ce:21.06.1
35+
COHERENCE_VERSION ?= 21.06.2
36+
COHERENCE_IMAGE ?= oraclecoherence/coherence-ce:21.06.2
3737
# This is the Coherence image that will be used in tests.
3838
# Changing this variable will allow test builds to be run against different Coherence versions
3939
# without altering the default image name.
@@ -606,8 +606,7 @@ copyright: ## Check copyright headers
606606
org.glassfish.copyright.Copyright -C hack/copyright.txt \
607607
-X .adoc \
608608
-X bin/ \
609-
-X build/_output/ \
610-
-X build/tools/ \
609+
-X build/ \
611610
-X clientset/ \
612611
-X dashboards/ \
613612
-X /Dockerfile \
@@ -622,13 +621,18 @@ copyright: ## Check copyright headers
622621
-X hack/sdk/ \
623622
-X go.mod \
624623
-X go.sum \
624+
-X .gradle/ \
625+
-X gradle/ \
626+
-X gradlew \
627+
-X gradlew.bat \
625628
-X HEADER.txt \
626629
-X helm-charts/coherence-operator/templates/NOTES.txt \
627630
-X .iml \
628631
-X java/certs/ \
629632
-X java/src/copyright/EXCLUDE.txt \
630633
-X Jenkinsfile \
631634
-X .jar \
635+
-X jib-cache/ \
632636
-X .jks \
633637
-X .json \
634638
-X LICENSE.txt \
@@ -1482,7 +1486,7 @@ mvn-deploy: java-client
14821486
# ----------------------------------------------------------------------------------------------------------------------
14831487
.PHONY: build-examples
14841488
build-examples:
1485-
./mvnw -B -f ./examples package -DskipTests -P docker $(MAVEN_BUILD_OPTS)
1489+
./mvnw -B -f ./examples package jib:dockerBuild -DskipTests $(MAVEN_BUILD_OPTS)
14861490

14871491
# ----------------------------------------------------------------------------------------------------------------------
14881492
# Build and test the examples
@@ -1800,7 +1804,9 @@ docs:
18001804
-Doperator.image=$(OPERATOR_IMAGE) \
18011805
-Doperator.utils.image=$(UTILS_IMAGE) \
18021806
$(MAVEN_OPTIONS)
1803-
1807+
mkdir -p $(BUILD_OUTPUT)/docs/images/images
1808+
cp -r docs/images/ build/_output/docs/images/
1809+
find examples/ -name \*.png -exec cp {} build/_output/docs/images/images/ \;
18041810

18051811
# ----------------------------------------------------------------------------------------------------------------------
18061812
# Start a local web server to serve the documentation.

api/v1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/about/01_overview.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ Hints and tips to troubleshoot common issues.
5151
====
5252
[CARD]
5353
.Guides & Examples
54-
[icon=explore,link=docs/examples/010_overview.adoc]
54+
[icon=explore,link=examples/000_overview.adoc]
5555
--
5656
There are a number of examples of using the Coherence Operator and different Coherence features in Kubernetes.
5757
--
5858
5959
[CARD]
6060
.Non-Operator Guides & Examples
61-
[icon=fa-ban,link=docs/no-operator/010_overview.adoc]
61+
[icon=fa-ban,link=examples/no-operator/000_overview.adoc]
6262
--
6363
Examples for those in the unlucky situation of not being able to install Operators, CRDs, RBAC cluster roles etc, and therfore need to manage Coherence clusters manually.
6464
--

docs/examples/010_overview.adoc

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/examples/020_deployment.adoc

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/examples/030_federation.adoc

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/examples/500_autoscaler.adoc

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/images/GitHub-Mark-32px.png

2.87 KB
Loading

docs/metrics/020_metrics.adoc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@
1313
Since version 12.2.1.4 Coherence has had the ability to expose a http endpoint that can be used to scrape metrics.
1414
This would typically be used to expose metrics to something like Prometheus.
1515
16-
NOTE: The description below is only applicable if metrics will be served by Coherence using the
17-
`coherence-metrics` module. If Coherence metrics will be served from a different endpoint, for
18-
example from a Helidon web-server using `coherence-mp-metrics` or using Coherence Micrometer integration,
19-
then the documentation below does not apply.
20-
2116
NOTE: The default metrics endpoint is *disabled* by default in Coherence clusters but can be enabled and configured by
22-
setting the relevant fields in the `Coherence` CRD. This assumes that your application has included the
23-
`coherence-metrics` module as a dependency. See the Coherence product documentation for more details on enabling metrics
17+
setting the relevant fields in the `Coherence` CRD.
18+
If your Coherence version is before CE 21.06.2 this example assumes that your application has included the
19+
`coherence-metrics` module as a dependency.
20+
See the Coherence product documentation for more details on enabling metrics
2421
in your application.
2522
26-
The example below shows how to enable and access Coherence metrics when served by the endpoint provided by the
27-
`coherence-metrics` module. For the example below to work the application deployed must have the `coherence-metrics`
28-
jar file and its dependencies on the classpath.
23+
The example below shows how to enable and access Coherence metrics.
2924
3025
Once the metrics port has been exposed, for example via a load balancer or port-forward command, the metrics
3126
endpoint is available at `http://host:port/metrics`.

0 commit comments

Comments
 (0)