Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build-test-create-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.8
- 22.06.9
- 22.06.10-SNAPSHOT
- 24.03.1
- 22.06.10
- 22.06.11-SNAPSHOT
- 24.09
javaVersion:
- 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-monitor-cluster-jdk21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.9
- 22.06.10
- 24.03.1
- 24.09
javaVersion:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-monitor-health-jdk21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.9
- 22.06.10
- 24.03.1
- 24.09
javaVersion:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-view-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 24.03.2-SNAPSHOT
- 22.06.10-SNAPSHOT
- 22.06.11-SNAPSHOT
- 22.06.10
- 24.03.1
- 24.09

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: E2E Local Tests
shell: bash
run: |
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,executor COHERENCE_VERSION=22.06.9 make clean build-test-images test-e2e-standalone
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,executor COHERENCE_VERSION=22.06.10 make clean build-test-images test-e2e-standalone

- name: Discovery Tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatability-tests-released-14110.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 14.1.1-0-17
- 14.1.1-0-18
- 14.1.1-0-19
javaImage:
- gcr.io/distroless/java11

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: E2E Local Tests
shell: bash
run: COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=22.06.9 make clean build-test-images test-e2e-standalone
run: COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=22.06.10 make clean build-test-images test-e2e-standalone

- name: Discovery Tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SHELL := /bin/bash
MVN_VERSION ?= 1.0.0

# Coherence CE version to run base tests against
COHERENCE_VERSION ?= 22.06.9
COHERENCE_VERSION ?= 22.06.10
COHERENCE_GROUP_ID ?= com.oracle.coherence.ce
COHERENCE_WKA1 ?= server1
COHERENCE_WKA2 ?= server1
Expand Down
24 changes: 24 additions & 0 deletions docs/reference/98_create_clusters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ these commands to create production clusters.
* <<scale-cluster, `cohctl scale cluster`>> - scales a cluster that was manually created
* <<stop-cluster, `cohctl stop cluster`>> - stops a cluster that was manually created or started
* <<start-cluster, `cohctl start cluster`>> - starts a cluster that was manually created
* <<restart-cluster, `cohctl restart cluster`>> - restarts a cluster that was manually created or started
* <<start-console, `cohctl start console`>> - starts a console client against a cluster that was manually created
* <<start-cohql, `cohctl start cohql`>> - starts a CohQL client against a cluster that was manually created
* <<start-class, `cohctl start class`>> - starts a specific Java class against a cluster that was manually created
Expand Down Expand Up @@ -293,6 +294,29 @@ cohctl start cluster local -J 9999 -j hostname
* `-j` is the rmi host. You should set this to the hostname the cluster is running on. It will default to WKA address if not set.


[#restart-cluster]
==== Restart Cluster

include::../../build/_output/docs-gen/restart_cluster.adoc[tag=text]

[source,bash]
----
cohctl restart cluster local -M 1g
----
Output:
[source,bash]
----
Are you sure you want to stop 3 members for the cluster local? (y/n) y
killed process 8522
killed process 8524
killed process 8523
3 processes were stopped for cluster local
Starting cluster member storage-0...
Starting cluster member storage-1...
Starting cluster member storage-2...
Cluster local started
----

[#start-console]
==== Start Console

Expand Down
80 changes: 49 additions & 31 deletions pkg/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ var (
)

const (
defaultCoherenceVersion = "22.06.9"
defaultCoherenceVersion = "22.06.10"
startClusterCommand = "start cluster"
scaleClusterCommand = "scale cluster"
stopClusterCommand = "stop cluster"
Expand Down Expand Up @@ -1187,6 +1187,30 @@ var stopClusterCmd = &cobra.Command{
},
}

// restartClusterCmd represents the stop cluster command.
var restartClusterCmd = &cobra.Command{
Use: "cluster",
Short: "restart a local Coherence cluster",
Long: `The 'restart cluster' command stops and restart a cluster that was manually created or started.`,
ValidArgsFunction: completionAllManualClusters,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
displayErrorAndExit(cmd, youMustProviderClusterMessage)
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
cluster := args[0]
if err := runClusterOperation(cmd, cluster, stopClusterCommand); err != nil {
cmd.Println(err)
}

time.Sleep(time.Duration(3) * time.Second)

return runClusterOperation(cmd, cluster, startClusterCommand)
},
}

// startConsoleCmd represents the start console command.
var startConsoleCmd = &cobra.Command{
Use: "console",
Expand Down Expand Up @@ -1461,23 +1485,6 @@ func init() {

stopClusterCmd.Flags().BoolVarP(&automaticallyConfirm, "yes", "y", false, confirmOptionMessage)

startClusterCmd.Flags().Int32VarP(&replicaCountParam, "replicas", "r", 3, serverCountMessage)
startClusterCmd.Flags().Int32VarP(&metricsStartPortParam, metricsPortArg, "t", 0, metricsPortMessage)
startClusterCmd.Flags().Int32VarP(&healthStartPortParam, healthPortArg, "e", 0, healthPortMessage)
startClusterCmd.Flags().StringVarP(&heapMemoryParam, heapMemoryArg, "M", defaultHeap, heapMemoryMessage)
startClusterCmd.Flags().StringVarP(&profileValueParam, profileArg, "P", "", profileMessage)
startClusterCmd.Flags().Int32VarP(&logLevelParam, logLevelArg, "l", 5, logLevelMessage)
startClusterCmd.Flags().StringVarP(&startupDelayParam, startupDelayArg, "D", "0ms", startupDelayMessage)
startClusterCmd.Flags().StringVarP(&serverStartClassParam, startClassArg, "S", "", startClassMessage)
startClusterCmd.Flags().Int32VarP(&jmxRemotePortParam, jmxPortArg, "J", 0, jmxPortMessage)
startClusterCmd.Flags().StringVarP(&jmxRemoteHostParam, jmxHostArg, "j", "", jmxHostMessage)
startClusterCmd.Flags().BoolVarP(&profileFirstParam, profileFirstArg, "F", false, profileFirstMessage)
startClusterCmd.Flags().BoolVarP(&backupLogFilesParam, backupLogFilesArg, "B", false, backupLogFilesMessage)
startClusterCmd.Flags().StringVarP(&machineParam, machineArg, "", "", machineMessage)
startClusterCmd.Flags().StringVarP(&rackParam, rackArg, "", "", rackMessage)
startClusterCmd.Flags().StringVarP(&siteParam, siteArg, "", "", siteMessage)
startClusterCmd.Flags().StringVarP(&roleParam, roleArg, "", "", roleMessage)

startConsoleCmd.Flags().StringVarP(&heapMemoryParam, heapMemoryArg, "M", defaultHeap, heapMemoryMessage)
startConsoleCmd.Flags().Int32VarP(&logLevelParam, logLevelArg, "l", 5, logLevelMessage)
startConsoleCmd.Flags().StringVarP(&profileValueParam, profileArg, "P", "", profileMessage)
Expand All @@ -1496,19 +1503,30 @@ func init() {
startClassCmd.Flags().BoolVarP(&grpcClientParam, "grpc", "G", false, "start a class as gRPC client. Only works for default cache config")
startClassCmd.Flags().StringVarP(&profileValueParam, profileArg, "P", "", profileMessage)

scaleClusterCmd.Flags().Int32VarP(&replicaCountParam, "replicas", "r", 3, serverCountMessage)
scaleClusterCmd.Flags().StringVarP(&heapMemoryParam, heapMemoryArg, "M", defaultHeap, heapMemoryMessage)
scaleClusterCmd.Flags().Int32VarP(&logLevelParam, logLevelArg, "l", 5, logLevelMessage)
scaleClusterCmd.Flags().StringVarP(&startupDelayParam, startupDelayArg, "D", "0ms", startupDelayMessage)
scaleClusterCmd.Flags().Int32VarP(&metricsStartPortParam, metricsPortArg, "t", 0, metricsPortMessage)
scaleClusterCmd.Flags().Int32VarP(&healthStartPortParam, healthPortArg, "e", 0, healthPortMessage)
scaleClusterCmd.Flags().StringVarP(&profileValueParam, profileArg, "P", "", profileMessage)
scaleClusterCmd.Flags().StringVarP(&serverStartClassParam, startClassArg, "S", "", startClassMessage)
scaleClusterCmd.Flags().BoolVarP(&backupLogFilesParam, backupLogFilesArg, "B", false, backupLogFilesMessage)
scaleClusterCmd.Flags().StringVarP(&machineParam, machineArg, "", "", machineMessage)
scaleClusterCmd.Flags().StringVarP(&rackParam, rackArg, "", "", rackMessage)
scaleClusterCmd.Flags().StringVarP(&siteParam, siteArg, "", "", siteMessage)
scaleClusterCmd.Flags().StringVarP(&roleParam, roleArg, "", "", roleMessage)
applyStartParams(scaleClusterCmd)
applyStartParams(restartClusterCmd)
applyStartParams(startClusterCmd)

restartClusterCmd.Flags().BoolVarP(&automaticallyConfirm, "yes", "y", false, confirmOptionMessage)
}

func applyStartParams(cmd *cobra.Command) {
cmd.Flags().Int32VarP(&replicaCountParam, "replicas", "r", 3, serverCountMessage)
cmd.Flags().Int32VarP(&metricsStartPortParam, metricsPortArg, "t", 0, metricsPortMessage)
cmd.Flags().Int32VarP(&healthStartPortParam, healthPortArg, "e", 0, healthPortMessage)
cmd.Flags().StringVarP(&heapMemoryParam, heapMemoryArg, "M", defaultHeap, heapMemoryMessage)
cmd.Flags().StringVarP(&profileValueParam, profileArg, "P", "", profileMessage)
cmd.Flags().Int32VarP(&logLevelParam, logLevelArg, "l", 5, logLevelMessage)
cmd.Flags().StringVarP(&startupDelayParam, startupDelayArg, "D", "0ms", startupDelayMessage)
cmd.Flags().StringVarP(&serverStartClassParam, startClassArg, "S", "", startClassMessage)
cmd.Flags().Int32VarP(&jmxRemotePortParam, jmxPortArg, "J", 0, jmxPortMessage)
cmd.Flags().StringVarP(&jmxRemoteHostParam, jmxHostArg, "j", "", jmxHostMessage)
cmd.Flags().BoolVarP(&profileFirstParam, profileFirstArg, "F", false, profileFirstMessage)
cmd.Flags().BoolVarP(&backupLogFilesParam, backupLogFilesArg, "B", false, backupLogFilesMessage)
cmd.Flags().StringVarP(&machineParam, machineArg, "", "", machineMessage)
cmd.Flags().StringVarP(&rackParam, rackArg, "", "", rackMessage)
cmd.Flags().StringVarP(&siteParam, siteArg, "", "", siteMessage)
cmd.Flags().StringVarP(&roleParam, roleArg, "", "", roleMessage)
}

// sanitizeConnectionName sanitizes a cluster connection
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ func TestGetMavenClasspath(t *testing.T) {
)
home, _ := os.UserHomeDir()

path, err := getMavenClasspath(ce, "coherence", "22.06", fileTypeJar)
path, err := getMavenClasspath(ce, "coherence", "22.06.10", fileTypeJar)
g.Expect(err).To(gomega.BeNil())
g.Expect(path).To(gomega.Equal(home + "/.m2/repository/com/oracle/coherence/ce/coherence/22.06/coherence-22.06.jar"))
g.Expect(path).To(gomega.Equal(home + "/.m2/repository/com/oracle/coherence/ce/coherence/22.06.10/coherence-22.06.10.jar"))

path, err = getMavenClasspath(ce, "coherence", "22.09", fileTypeJar)
g.Expect(err).To(gomega.BeNil())
Expand Down
18 changes: 18 additions & 0 deletions pkg/cmd/restart.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/

package cmd

import (
"github.com/spf13/cobra"
)

// restartCmd represents the restart command.
var restartCmd = &cobra.Command{
Use: "restart",
Short: "restart a resource",
Long: `The 'restart' command restarts various resources.`,
}
4 changes: 4 additions & 0 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@ func Initialize(command *cobra.Command) *cobra.Command {
command.AddCommand(runCmd)
runCmd.AddCommand(runReportCmd)

// restart command
command.AddCommand(restartCmd)
restartCmd.AddCommand(restartClusterCmd)

// clear
command.AddCommand(clearCmd)
clearCmd.AddCommand(clearContextCmd)
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-doc-snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ create_doc $DOCS_DIR/create_cluster "${COHCTL} create cluster --help"
create_doc $DOCS_DIR/scale_cluster "${COHCTL} scale cluster --help"
create_doc $DOCS_DIR/start_cluster "${COHCTL} start cluster --help"
create_doc $DOCS_DIR/stop_cluster "${COHCTL} stop cluster --help"
create_doc $DOCS_DIR/restart_cluster "${COHCTL} restart cluster --help"
create_doc $DOCS_DIR/start_console "${COHCTL} start console --help"
create_doc $DOCS_DIR/start_cohql "${COHCTL} start cohql --help"
create_doc $DOCS_DIR/start_class "${COHCTL} start class --help"
Expand Down
13 changes: 6 additions & 7 deletions scripts/run-compat-ce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
# Run compatability tests
set -e

echo "Coherence CE 22.06.9"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=22.06.9 make clean build-test-images test-e2e-standalone
echo "Coherence CE 22.06.10"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=22.06.10 make clean build-test-images test-e2e-standalone

echo "Coherence CE 24.09"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=24.09 make clean build-test-images test-e2e-standalone

echo "Coherence CE 24.09with Executor"
echo "Coherence CE 24.09 with Executor"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,executor COHERENCE_VERSION=24.09 make clean build-test-images test-e2e-standalone

echo "Coherence CE 14.1.1-0-18"
COHERENCE_VERSION=14.1.1-0-18 make clean build-test-images test-e2e-standalone
echo "Coherence CE 14.1.1-0-19"
COHERENCE_VERSION=14.1.1-0-19 make clean build-test-images test-e2e-standalone

echo "Coherence CE 24.09 with Topics"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,topics COHERENCE_VERSION=24.09 make clean build-test-images test-e2e-topics
Expand All @@ -31,8 +31,7 @@ COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,views COHERENCE_VERSION=
export COMPUTERNAME=server1
export COHERENCE_TLS_CERTS_PATH=`pwd`/test/test_utils/certs/guardians-ca.crt
export COHERENCE_TLS_CLIENT_CERT=`pwd`/test/test_utils/certs/star-lord.crt
export COHERENCE_TLS_CLIENT_KEY=`pwd`/test/test_utils/certs/star-lord.key
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=24.03 PROFILES=,secure make clean certs build-test-images test-cluster-startup
export COHERENCE_TLS_CLIENT_KEY=`pwd`/test/test_utils/certs/star-lord.key COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=24.03 PROFILES=,secure make clean certs build-test-images test-cluster-startup
cohctl set ignore-certs true
cohctl add cluster tls -u https://127.0.0.1:30000/management/coherence/cluster
cohctl get members
Expand Down
27 changes: 14 additions & 13 deletions scripts/run-compat-commercial.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
#!/bin/bash

#
# Copyright (c) 2021, Oracle and/or its affiliates.
# Copyright (c) 2021, 2024 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.
#

# Run compatability tests
set -e

echo "Coherence GE 14.1.1-0-7"
PROFILES=,commercial COHERENCE_VERSION=14.1.1-0-7 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-standalone
echo "Coherence GE 14.1.1-0-19"
PROFILES=,commercial COHERENCE_VERSION=14.1.1-0-19 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-standalone

echo "Coherence GE 12.2.1-4-10"
PROFILES=,commercial COHERENCE_VERSION=12.2.1-4-10 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-standalone

echo "Coherence GE 15.1.1-0-0-SNAPSHOT with topics"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,topics-commercial COHERENCE_VERSION=15.1.1-0-0-SNAPSHOT COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-topics
echo "Coherence GE 12.2.1-4-23"
PROFILES=,commercial COHERENCE_VERSION=12.2.1-4-23 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-standalone

# Federation Tests
echo "Coherence Federation Test GE 14.1.1-0-7"
PROFILES=,federation COHERENCE_VERSION=14.1.1-0-7 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-federation-images test-e2e-federation
echo "Coherence Federation Test GE 14.1.1-0-19"
PROFILES=,federation COHERENCE_VERSION=14.1.1-0-19 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-federation-images test-e2e-federation

echo "Coherence Federation Test GE 12.2.1-4-10"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,federation COHERENCE_VERSION=12.2.1-4-10 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-federation-images test-e2e-federation
echo "Coherence Federation Test GE 12.2.1-4-23"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,federation COHERENCE_VERSION=12.2.1-4-23 COHERENCE_GROUP_ID=com.oracle.coherence make clean build-federation-images test-e2e-federation

echo "Coherence Federation Test 14.1.2-0-0-SNAPSHOT"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,federation COHERENCE_VERSION=14.1.2-0-0-SNAPSHOT COHERENCE_GROUP_ID=com.oracle.coherence make clean build-federation-images test-e2e-federation

COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,views COHERENCE_GROUP_ID=com.oracle.coherence COHERENCE_VERSION=15.1.1-0-0-SNAPSHOT make clean build-view-images test-e2e-views
echo "Coherence GE 14.1.2-0-0-SNAPSHOT with topics"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,topics-commercial COHERENCE_VERSION=14.1.2-0-0-SNAPSHOT COHERENCE_GROUP_ID=com.oracle.coherence make clean build-test-images test-e2e-topics

echo "Coherence GE 14.1.2-0-0-SNAPSHOT with views"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,views COHERENCE_GROUP_ID=com.oracle.coherence COHERENCE_VERSION=14.1.2-0-0-SNAPSHOT make clean build-view-images test-e2e-views
6 changes: 6 additions & 0 deletions scripts/test-create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ runCommand get services -o jsonpath="$.items[?(@.name=='PartitionedCache')].memb
# must be 6 members
grep "[6,6,6]" $OUTPUT

# Restart the cluster
runCommand restart cluster local -r 6 -y

pause
wait_for_ready

# Shutdown
runCommand stop cluster local -y

Expand Down
Loading