diff --git a/.github/workflows/cloud-upgrade-test.yml b/.github/workflows/cloud-upgrade-test.yml index 30d9788a..9ff62aeb 100644 --- a/.github/workflows/cloud-upgrade-test.yml +++ b/.github/workflows/cloud-upgrade-test.yml @@ -1,6 +1,6 @@ name: Corfu Cluster Test -on: workflow_dispatch +on: push jobs: upgrade-test: diff --git a/cloud/corfu/.swp b/cloud/corfu/.swp deleted file mode 100644 index cfd55278..00000000 Binary files a/cloud/corfu/.swp and /dev/null differ diff --git a/cloud/corfu/cluster_deploy.sh b/cloud/corfu/cluster_deploy.sh deleted file mode 100755 index a405e2b0..00000000 --- a/cloud/corfu/cluster_deploy.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/zsh - -cluster_setup() { - k3d cluster delete corfu - rm -rf /tmp/k3dvol - - k3d cluster create corfu \ - --volume /tmp/k3dvol:/tmp/k3dvol \ - -p "8082:30080@agent:0" \ - --agents 4 -} - -image_imports() { - k3d image import corfudb/corfu-server:0.3.2-SNAPSHOT -c corfu - k3d image import corfudb/corfu-server:0.4.0-SNAPSHOT -c corfu - k3d image import corfudb/corfu-cloud-test:latest -c corfu -} - -helm_setup() { - helm repo add jetstack https://charts.jetstack.io - helm repo update -} - -init_v1_cluster() { - helm install corfu corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.3.2-SNAPSHOT - helm install corfu2 corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.3.2-SNAPSHOT --set lr.name="log-replication2" --set nameOverride="corfu2" --set serviceAccount.name="corfu2" --set nameOverride="corfu2" --set fullnameOverride="corfu2" --set cluster.type="sink" - sleep 30 -} - -init_v2_cluster() { - helm install corfu corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.0-SNAPSHOT --set version.new=true - helm install corfu2 corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.0-SNAPSHOT --set lr.name="log-replication2" --set nameOverride="corfu2" --set serviceAccount.name="corfu2" --set nameOverride="corfu2" --set fullnameOverride="corfu2" --set cluster.type="sink" --set version.new=true - sleep 30 -} - -cluster_verify() { - local lr_version=$1 - - # Wait for Corfu to be ready - while ! kubectl logs corfu-0 -c corfu | grep -q "DATA"; do - echo "Corfu is not ready yet..." - sleep 15 - done - echo "Corfu is Ready!!!!" - - # Get the leader of the log replication - lr_leader="" - while true; do - if kubectl logs log-replication-0 | grep -q "acquired"; then - lr_leader="log-replication-0" - break - fi - if kubectl logs log-replication-1 | grep -q "acquired"; then - lr_leader="log-replication-1" - break - fi - if kubectl logs log-replication-2 | grep -q "acquired"; then - lr_leader="log-replication-2" - break - fi - done - - echo "LR Leader is: $lr_leader" - - lr_ready_str="" - if [ $lr_version = "V2" ]; then - lr_ready_str="Received leadership response from node" - else - lr_ready_str="Negotiation complete" - fi - - # Wait for the log replication leader to be ready - while ! kubectl logs $lr_leader | grep -q $lr_ready_str; do - echo "LR is not ready yet..." - sleep 10 - done - - echo "Ready to Replicate!!!!" -} - -cluster_upgrade() { - helm upgrade corfu corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.0-SNAPSHOT --set version.new=true - helm upgrade corfu2 corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.0-SNAPSHOT --set lr.name="log-replication2" --set nameOverride="corfu2" --set serviceAccount.name="corfu2" --set nameOverride="corfu2" --set fullnameOverride="corfu2" --set cluster.type="sink" --set version.new=true - - while kubectl describe pods --all-namespaces | grep -q "0.3.2-SNAPSHOT"; do - echo "Waiting for pods to be re-imaged..." - sleep 10 - done - - echo "Cluster upgrade complete!!!" -} - - -cluster_test() { - echo "Writing Data To Source..." - helm install corfu-cloud-test corfu-cloud-test-helm --set tls.enabled=false --set jobs.job=1 - - while ! kubectl get pods -o wide | grep corfu-cloud-test | grep -q Completed; do - echo "Waiting for test to finish..." - sleep 5 - done - - - helm uninstall corfu-cloud-test - while kubectl get pods -o wide | grep -q corfu-cloud-test; do - echo "Removing test agent..." - sleep 5 - done - - echo "Test Complete!!!" -} - -cluster_test_validate() { - echo "Starting test validation!!!" - helm install corfu-cloud-test corfu-cloud-test-helm --set tls.enabled=false --set jobs.job=2 - - while ! kubectl get pods -o wide | grep corfu-cloud-test | grep -q Completed; do - echo "Waiting for validation to complete..." - sleep 5 - done - - helm uninstall corfu-cloud-test - while kubectl get pods -o wide | grep -q corfu-cloud-test; do - echo "Removing test agent..." - sleep 5 - done - - echo "Validation Complete!!!" -} - -cluster_setup -image_imports -helm_setup - -init_v1_cluster -cluster_verify V1 -cluster_test - -cluster_upgrade - -cluster_verify V2 -cluster_test_validate diff --git a/cloud/corfu/corfu-cloud-test-helm/Chart.yaml b/cloud/corfu/corfu-cloud-test-helm/Chart.yaml deleted file mode 100644 index 50fa16e7..00000000 --- a/cloud/corfu/corfu-cloud-test-helm/Chart.yaml +++ /dev/null @@ -1,3 +0,0 @@ -apiVersion: v2 -name: corfu-cloud-test -version: 0.1.0 diff --git a/cloud/corfu/corfu-cloud-test-helm/templates/job.yaml b/cloud/corfu/corfu-cloud-test-helm/templates/job.yaml deleted file mode 100644 index b24171f0..00000000 --- a/cloud/corfu/corfu-cloud-test-helm/templates/job.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: corfu-cloud-test -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: corfu-client - image: corfudb/corfu-cloud-test:latest - imagePullPolicy: Never - command: - - "sh" - - "-c" - - | - java -cp *.jar org.corfudb.cloud.runtime.test.Main {{ .Values.corfuEndpoint }} {{ .Values.jobs.job }} - {{- if .Values.tls.enabled }} \ - /certs/keystore.jks /password/password /certs/truststore.jks /password/password - {{- end }} - volumeMounts: - {{- if .Values.tls.enabled }} - - name: certificate - mountPath: /certs - - name: password - mountPath: /password - {{- end }} - volumes: - {{- if .Values.tls.enabled }} - - name: certificate - secret: - secretName: {{ .Values.tls.certificateName }} - - name: password - secret: - secretName: {{ .Values.tls.passwordName }} - {{- end }} diff --git a/cloud/corfu/corfu-cloud-test-helm/values.yaml b/cloud/corfu/corfu-cloud-test-helm/values.yaml deleted file mode 100644 index 4d4750f8..00000000 --- a/cloud/corfu/corfu-cloud-test-helm/values.yaml +++ /dev/null @@ -1,13 +0,0 @@ -image: - registry: "docker.io" - repository: "corfudb/corfu-cloud-test" - tag: "latest" - pullPolicy: Never -corfuEndpoint: "corfu-0.corfu-headless.default.svc.cluster.local" -tls: - enabled: true - certificateName: corfu-certificate-tls - passwordName: corfu-password -jobs: - # 1: test, 2: validate, 3: test & validate - job: 3 diff --git a/cloud/corfu/corfu-cloud-test/Dockerfile b/cloud/corfu/corfu-cloud-test/Dockerfile deleted file mode 100644 index b3f0a7e1..00000000 --- a/cloud/corfu/corfu-cloud-test/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM openjdk:8-jdk-alpine3.8 - -ADD ./build/libs/corfu-cloud-test.jar /app/ - -WORKDIR /app - -CMD java -cp *.jar org.corfudb.cloud.runtime.test.Main "$@" diff --git a/cloud/corfu/corfu-cloud-test/build.gradle.kts b/cloud/corfu/corfu-cloud-test/build.gradle.kts deleted file mode 100644 index de65d7db..00000000 --- a/cloud/corfu/corfu-cloud-test/build.gradle.kts +++ /dev/null @@ -1,60 +0,0 @@ -import java.nio.charset.StandardCharsets - -plugins { - java -} - -repositories { - mavenLocal() - mavenCentral() - - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/corfudb/corfudb") - // For accessing GitHub Secrets in CorfuDB repo - credentials { - username = System.getenv("PKG_USERNAME") - password = System.getenv("PUBLISH_TOKEN") - } - } -} - -val corfuVersion = "0.3.2-SNAPSHOT" -val logbackVersion = "1.2.11" -val junitVersion = "5.8.2" - -dependencies { - implementation("ch.qos.logback:logback-classic:${logbackVersion}") - implementation("org.latencyutils:LatencyUtils:2.0.3") - implementation("org.corfudb:runtime:${corfuVersion}") { - exclude(group = "io.netty", module = "netty-tcnative") - } - implementation("org.corfudb:infrastructure:${corfuVersion}") - implementation("com.github.luben:zstd-jni:1.4.8-1") - - testImplementation("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") -} - -version = project.file("version") - .readText(StandardCharsets.UTF_8) - .trim() - .substring("version=".length) - -//Fat jar -tasks.withType { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - - archiveFileName.set("${project.name}.${archiveExtension.get()}") - - manifest { - attributes["Main-Class"] = "org.corfudb.cloud.runtime.example.Main" - } - - from(configurations.compileClasspath.get().map { - if (it.isDirectory) it else zipTree(it) - }) -} - -tasks.create("version").doLast { - println(version) -} diff --git a/cloud/corfu/corfu-cloud-test/docker-build.sh b/cloud/corfu/corfu-cloud-test/docker-build.sh deleted file mode 100755 index 49d4846e..00000000 --- a/cloud/corfu/corfu-cloud-test/docker-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -./gradlew clean jar --stacktrace - -docker build -t corfudb/corfu-cloud-test:latest . \ No newline at end of file diff --git a/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.jar b/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index cc4fdc29..00000000 Binary files a/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.properties b/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 36d6137a..00000000 --- a/cloud/corfu/corfu-cloud-test/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Thu Jan 23 21:33:25 PST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME diff --git a/cloud/corfu/corfu-cloud-test/gradlew b/cloud/corfu/corfu-cloud-test/gradlew deleted file mode 100755 index 2fe81a7d..00000000 --- a/cloud/corfu/corfu-cloud-test/gradlew +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/cloud/corfu/corfu-cloud-test/gradlew.bat b/cloud/corfu/corfu-cloud-test/gradlew.bat deleted file mode 100644 index 9618d8d9..00000000 --- a/cloud/corfu/corfu-cloud-test/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/cloud/corfu/corfu-cloud-test/settings.gradle.kts b/cloud/corfu/corfu-cloud-test/settings.gradle.kts deleted file mode 100644 index 39e1730d..00000000 --- a/cloud/corfu/corfu-cloud-test/settings.gradle.kts +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "corfu-cloud-test" diff --git a/cloud/corfu/corfu-cloud-test/src/main/java/org.corfudb.cloud.runtime.test/Main.java b/cloud/corfu/corfu-cloud-test/src/main/java/org.corfudb.cloud.runtime.test/Main.java deleted file mode 100644 index 97eb0e16..00000000 --- a/cloud/corfu/corfu-cloud-test/src/main/java/org.corfudb.cloud.runtime.test/Main.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.corfudb.cloud.runtime.test; - -import com.google.common.reflect.TypeToken; -import java.util.Map; -import org.corfudb.infrastructure.logreplication.proto.Sample; -import org.corfudb.infrastructure.logreplication.proto.LogReplicationMetadata.LogReplicationMetadataKey; -import org.corfudb.infrastructure.logreplication.proto.LogReplicationMetadata.LogReplicationMetadataVal; -import org.corfudb.runtime.CorfuOptions; -import org.corfudb.runtime.CorfuRuntime; -import org.corfudb.runtime.collections.CorfuTable; -import org.corfudb.runtime.collections.CorfuStore; -import org.corfudb.runtime.collections.CorfuRecord; -import org.corfudb.runtime.collections.Table; -import org.corfudb.runtime.collections.TableOptions; -import org.corfudb.runtime.collections.TxnContext; -import org.corfudb.runtime.CorfuStoreMetadata.TableName; -import org.corfudb.runtime.CorfuStoreMetadata.TableDescriptors; -import org.corfudb.runtime.CorfuStoreMetadata.TableMetadata; -import org.corfudb.runtime.view.ObjectsView; -import org.corfudb.util.NodeLocator; -import java.lang.reflect.InvocationTargetException; -import java.util.Arrays; -import java.time.Duration; -import java.util.Collections; -import java.util.concurrent.TimeUnit; - -/** - * This tutorial demonstrates a simple Corfu application. - * - */ -public class Main { - private static final String USAGE = "Usage: HelloCorfu [-c ]\n" - + "Options:\n" - + " -c Set the configuration host and port [default: localhost:9000]\n"; - - /** - * Internally, the corfuRuntime interacts with the CorfuDB service over TCP/IP sockets. - * - * @param host specifies the IP:port of the CorfuService - * The configuration string has format "hostname:port", for example, "localhost:9090". - * @return a CorfuRuntime object, with which Corfu applications perform all Corfu operations - */ - private static CorfuRuntime getRuntimeAndConnect(String host, boolean tlsEnabled, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword) { - - NodeLocator loc = NodeLocator.builder().host(host).port(9000).build(); - - CorfuRuntime.CorfuRuntimeParameters.CorfuRuntimeParametersBuilder builder = CorfuRuntime.CorfuRuntimeParameters - .builder() - .connectionTimeout(Duration.ofSeconds(20)) - .layoutServers(Collections.singletonList(loc)); - if (tlsEnabled) { - builder.tlsEnabled(tlsEnabled) - .keyStore(keyStore) - .ksPasswordFile(keyStorePassword) - .trustStore(trustStore) - .tsPasswordFile(trustStorePassword); - } - CorfuRuntime runtime = CorfuRuntime.fromParameters(builder.build()); - runtime.connect(); - return runtime; - } - - // Sample code - public static void main(String[] args) throws Exception { - System.out.println("Start application. Got args: " + Arrays.toString(args)); - // Parse the options given, using docopt. - /* - Map opts = - new Docopt(USAGE) - .withVersion(GitRepositoryState.getRepositoryState().describe) - .parse(args); - String corfuConfigurationString = (String) opts.get("-c"); - */ - /** - * First, the application needs to instantiate a CorfuRuntime, - * which is a Java object that contains all of the Corfu utilities exposed to applications. - */ - String ip = "localhost"; - int job = 3; - boolean tlsEnabled = false; - String keyStore = ""; - String keyStorePassword = ""; - String trustStore = ""; - String trustStorePassword = ""; - - if(args.length>=1) { - ip = args[0]; - } - if (args.length >= 2) { - job = Integer.parseInt(args[1]); - } - if (args.length >= 3) { - keyStore = args[2]; - } - if (args.length >= 4) { - keyStorePassword = args[3]; - } - if (args.length >= 5) { - trustStore = args[4]; - } - if (args.length >= 6) { - trustStorePassword = args[5]; - } - - if (args.length == 6) { - tlsEnabled = true; - } - - if (job >= 1) { - if (job != 2) { - test(ip, tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - } - validate(ip, tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - } - } - - public static void test(String ip, boolean tlsEnabled, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword) throws Exception { - CorfuRuntime runtimeSource = getRuntimeAndConnect(ip, tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - CorfuRuntime runtimeSink = getRuntimeAndConnect("corfu2-0.corfu2-headless.default.svc.cluster.local", - tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - - CorfuStore corfuStoreSource = new CorfuStore(runtimeSource); - CorfuStore corfuStoreSink = new CorfuStore(runtimeSink); - - String NAMESPACE = "LR-Test"; - String streamA = "MyTestTable"; - - Table mapA = corfuStoreSource.openTable( - NAMESPACE, - streamA, - Sample.StringKey.class, - Sample.IntValue.class, - Sample.Metadata.class, - TableOptions.builder().schemaOptions( - CorfuOptions.SchemaOptions.newBuilder() - .setIsFederated(true) - .build()) - .build() - ); - - Table mapASink = corfuStoreSink.openTable( - NAMESPACE, - streamA, - Sample.StringKey.class, - Sample.IntValue.class, - Sample.Metadata.class, - TableOptions.builder().schemaOptions( - CorfuOptions.SchemaOptions.newBuilder() - .setIsFederated(true) - .build()) - .build() - ); - - int totalEntries = 200; - int startIndex = 0; - - int maxIndex = totalEntries + startIndex; - for (int i = startIndex; i < maxIndex; i++) { - try (TxnContext txn = corfuStoreSource.txn(NAMESPACE)) { - txn.putRecord(mapA, Sample.StringKey.newBuilder().setKey(String.valueOf(i)).build(), - Sample.IntValue.newBuilder().setValue(i).build(), null); - txn.commit(); - } - } - - try (TxnContext txn = corfuStoreSource.txn(NAMESPACE)) { - int tableSize = txn.getTable(streamA).count(); - System.out.println("Size of source table after adding entries is: " + tableSize); - txn.commit(); - } - } - - public static void validate(String ip, boolean tlsEnabled, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword) throws Exception { - CorfuRuntime runtimeSource = getRuntimeAndConnect(ip, tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - CorfuRuntime runtimeSink = getRuntimeAndConnect("corfu2-0.corfu2-headless.default.svc.cluster.local", - tlsEnabled, keyStore, keyStorePassword, trustStore, trustStorePassword); - - CorfuStore corfuStoreSource = new CorfuStore(runtimeSource); - CorfuStore corfuStoreSink = new CorfuStore(runtimeSink); - - String NAMESPACE = "LR-Test"; - String streamA = "MyTestTable"; - - Table mapA = corfuStoreSource.openTable( - NAMESPACE, - streamA, - Sample.StringKey.class, - Sample.IntValue.class, - Sample.Metadata.class, - TableOptions.builder().schemaOptions( - CorfuOptions.SchemaOptions.newBuilder() - .setIsFederated(true) - .build()) - .build() - ); - - Table mapASink = corfuStoreSink.openTable( - NAMESPACE, - streamA, - Sample.StringKey.class, - Sample.IntValue.class, - Sample.Metadata.class, - TableOptions.builder().schemaOptions( - CorfuOptions.SchemaOptions.newBuilder() - .setIsFederated(true) - .build()) - .build() - ); - - while (true) { - try (TxnContext txn = corfuStoreSource.txn(NAMESPACE)) { - int tableSize = txn.getTable(streamA).count(); - System.out.println("Size of source table is: " + tableSize); - txn.commit(); - } - - try (TxnContext txn = corfuStoreSink.txn(NAMESPACE)) { - int tableSize = txn.getTable(streamA).count(); - - System.out.println("Size of sink table is: " + tableSize); - txn.commit(); - - if (tableSize == 200) { - break; - } - } - TimeUnit.SECONDS.sleep(5); - } - } -} \ No newline at end of file diff --git a/cloud/corfu/corfu-cloud-test/src/main/resources/logback.xml b/cloud/corfu/corfu-cloud-test/src/main/resources/logback.xml deleted file mode 100644 index 6620026a..00000000 --- a/cloud/corfu/corfu-cloud-test/src/main/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX, UTC} | %-5level | %15.15thread{15} | %50.50(%logger.%M:%L) | %msg%n%xException - - - - - - ${LOG_DIRECTORY}/integration-tools.log - - ${LOG_DIRECTORY}/integration-tools.%i.log.gz - 1 - 10 - - - 100MB - - - - %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX, UTC} | %-5level | %30.30thread | %30.30logger{30} | %msg%n%xException - - - - - - - - - - - - \ No newline at end of file diff --git a/cloud/corfu/corfu-cloud-test/version b/cloud/corfu/corfu-cloud-test/version deleted file mode 100644 index aef125e0..00000000 --- a/cloud/corfu/corfu-cloud-test/version +++ /dev/null @@ -1 +0,0 @@ -version=1.0.0 diff --git a/cloud/corfu/corfu/config/corfu_plugin_config.properties b/cloud/corfu/corfu/config/corfu_plugin_config.properties index 9065d87f..81e90c01 100644 --- a/cloud/corfu/corfu/config/corfu_plugin_config.properties +++ b/cloud/corfu/corfu/config/corfu_plugin_config.properties @@ -1,27 +1,15 @@ -transport_adapter_JAR_path=/app/corfu.jar -GRPC_transport_adapter_server_class_name=org.corfudb.infrastructure.logreplication.transport.sample.GRPCLogReplicationServerChannelAdapter -GRPC_transport_adapter_client_class_name=org.corfudb.infrastructure.logreplication.transport.sample.GRPCLogReplicationClientChannelAdapter -NETTY_transport_adapter_server_class_name=org.corfudb.infrastructure.logreplication.transport.sample.NettyLogReplicationServerChannelAdapter -NETTY_transport_adapter_client_class_name=org.corfudb.infrastructure.logreplication.transport.sample.NettyLogReplicationClientChannelAdapter - -# Transport plugin selector -transport_plugin_selector_JAR_path=/app/corfu.jar -transport_plugin_selector_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultTransportPluginSelector - # Transport Plugin Configuration +transport_adapter_JAR_path=/app/corfu.jar transport_adapter_server_class_name=org.corfudb.infrastructure.logreplication.transport.sample.GRPCLogReplicationServerChannelAdapter transport_adapter_client_class_name=org.corfudb.infrastructure.logreplication.transport.sample.GRPCLogReplicationClientChannelAdapter - # Stream Fetcher Plugin Configuration stream_fetcher_plugin_JAR_path=/app/corfu.jar -stream_fetcher_plugin_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultLogReplicationCloudConfigAdapter - +stream_fetcher_plugin_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultLogReplicationConfigAdapter # Topology Manager Plugin Configuration topology_manager_adapter_JAR_path=/app/corfu.jar -topology_manager_adapter_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultCloudClusterManager - +topology_manager_adapter_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultClusterManager # Snapshot Sync Configuration (Plugin) snapshot_sync_plugin_JAR_path=/app/corfu.jar snapshot_sync_plugin_class_name=org.corfudb.infrastructure.logreplication.infrastructure.plugins.DefaultSnapshotSyncPlugin - -saas_endpoint=corfu-0.corfu-headless.default.svc.cluster.local:9000 \ No newline at end of file +saas_endpoint=corfu:9000 +local_node_id_path=/usr/share/corfu/conf/serial_number \ No newline at end of file diff --git a/cloud/corfu/corfu/files/init_layout.py b/cloud/corfu/corfu/files/init_layout.py index 2f93a062..27c703bd 100644 --- a/cloud/corfu/corfu/files/init_layout.py +++ b/cloud/corfu/corfu/files/init_layout.py @@ -20,7 +20,8 @@ def generate_layout(args): layout_template["layoutServers"] = fqdn_list layout_template["sequencers"] = fqdn_list layout_template["segments"][0]["stripes"][0]["logServers"] = fqdn_list - layout_template["clusterId"] = "456e4567-e89b-12d3-a456-556642440001" if args.type == "source" else "456e4567-e89b-12d3-a456-556642440002" + layout_template["clusterId"] = "123e4567-e89b-12d3-a456-556642440000" + # print layout print("Generated layout:") print(json.dumps(layout_template, indent=2)) @@ -38,7 +39,6 @@ def main(): parser.add_argument('--replica', '-r', type=int, required=True, help='The replica of Corfu cluster.') parser.add_argument('--statefulset', type=str, default='corfu', help='Corfu statefulset name.') parser.add_argument('--headless', type=str, default='corfu-headless', required=True, help='Corfu headless service name.') - parser.add_argument('--type', type=str, default='source', required=True, help='Source or sink.') args = parser.parse_args() generate_layout(args) diff --git a/cloud/corfu/corfu/serial_number/serial_number b/cloud/corfu/corfu/serial_number/serial_number deleted file mode 100644 index 1c02b1a7..00000000 --- a/cloud/corfu/corfu/serial_number/serial_number +++ /dev/null @@ -1 +0,0 @@ -serial=B1310142-311D-B7AE-D6A7-F66DEE607871 \ No newline at end of file diff --git a/cloud/corfu/corfu/templates/Deployment.yaml b/cloud/corfu/corfu/templates/Deployment.yaml deleted file mode 100644 index e8e2a503..00000000 --- a/cloud/corfu/corfu/templates/Deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "corfu.service.lr" . }} - labels: - {{- include "corfu.labels" . | indent 4 }} -spec: - replicas: {{ include "corfu.replicas" . }} - updateStrategy: - type: RollingUpdate - serviceName: {{ include "corfu.service.lr" . }} - selector: - matchLabels: - {{- include "corfu.selectors.lr" . | nindent 6 }} - template: - metadata: - labels: - {{- include "corfu.selectors.lr" . | nindent 8 }} - spec: - containers: - - name: {{ include "corfu.service.lr" . }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.lr.port }} - protocol: TCP - env: - - name: CONFIG_FILE_PATH - value: "/usr/share/corfu/conf/corfu_replication_config.properties" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_UID - valueFrom: - fieldRef: - fieldPath: metadata.uid - command: - - "sh" - - "-c" - - "java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/corfu/corfu_oom.hprof -XX:+HeapDumpOnOutOfMemoryError -Djdk.nio.maxCachedBufferSize=1048576 -Dio.netty.recycler.maxCapacityPerThread=0 -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -Djava.io.tmpdir=/image/corfu-server/temp -cp /app/corfu.jar:/opt/vmware/log-replication/log-replication_deploy.jar -Djava.io.tmpdir=/tmp org.corfudb.infrastructure.CorfuServer --plugin=/usr/share/corfu/conf/corfu_plugin_config.properties -d DEBUG 9010 -m" \ No newline at end of file diff --git a/cloud/corfu/corfu/templates/_helpers.tpl b/cloud/corfu/corfu/templates/_helpers.tpl index 0a9e4545..8bfbb1ea 100644 --- a/cloud/corfu/corfu/templates/_helpers.tpl +++ b/cloud/corfu/corfu/templates/_helpers.tpl @@ -1,5 +1,5 @@ {{- define "corfu.name" -}} -{{ .Values.nameOverride }} +corfu {{- end }} {{- define "corfu.fullname" -}} @@ -31,14 +31,6 @@ app.kubernetes.io/name: {{ include "corfu.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "corfu.service.lr" -}} -{{- .Values.lr.name }} -{{- end }} - -{{- define "corfu.selectors.lr" -}} -app.kubernetes.io/name: {{ include "corfu.service.lr" . }} -{{- end }} - {{/* If replicas tag is defined in its own helm chart values.yaml it will always override the global value. If not, we will use the global value. diff --git a/cloud/corfu/corfu/templates/certificate.yaml b/cloud/corfu/corfu/templates/certificate.yaml index 20ff3337..1ecb8133 100644 --- a/cloud/corfu/corfu/templates/certificate.yaml +++ b/cloud/corfu/corfu/templates/certificate.yaml @@ -1,5 +1,5 @@ {{- if .Values.tls.certificate.enabled }} -{{- $dns := printf "*.%s-headless.%s.svc.cluster.local" .Values.nameOverride .Release.Namespace }} +{{- $dns := printf "*.corfu-headless.%s.svc.cluster.local" .Release.Namespace }} apiVersion: cert-manager.io/v1 kind: Certificate metadata: @@ -25,7 +25,6 @@ spec: - client auth dnsNames: - corfu - - corfu2 - "{{ $dns }}" issuerRef: name: {{ .Values.tls.certificate.issuer.name }} diff --git a/cloud/corfu/corfu/templates/configmap-lr.yaml b/cloud/corfu/corfu/templates/configmap-lr.yaml deleted file mode 100644 index a6254cd1..00000000 --- a/cloud/corfu/corfu/templates/configmap-lr.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "corfu.fullname" . }}-corfu-configs-lr - labels: - {{- include "corfu.labels" . | indent 4 }} -data: - {{- with .Files.Glob "serial_number/*" }} - {{- .AsConfig | nindent 2 }} - {{- end }} \ No newline at end of file diff --git a/cloud/corfu/corfu/templates/service-lr.yaml b/cloud/corfu/corfu/templates/service-lr.yaml deleted file mode 100644 index e292939b..00000000 --- a/cloud/corfu/corfu/templates/service-lr.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "corfu.service.lr" . }} - labels: - {{- include "corfu.labels" . | indent 4 }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.lr.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "corfu.selectors.lr" . | nindent 4 }} \ No newline at end of file diff --git a/cloud/corfu/corfu/templates/service.yaml b/cloud/corfu/corfu/templates/service.yaml index e51036ec..e542a21a 100644 --- a/cloud/corfu/corfu/templates/service.yaml +++ b/cloud/corfu/corfu/templates/service.yaml @@ -33,7 +33,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ include "corfu.name" . }}-headless + name: {{ include "corfu.fullname" . }}-headless labels: {{- include "corfu.labels" . | indent 4 }} spec: diff --git a/cloud/corfu/corfu/templates/serviceaccount.yaml b/cloud/corfu/corfu/templates/serviceaccount.yaml index 5fa800f3..bc0d7b6b 100644 --- a/cloud/corfu/corfu/templates/serviceaccount.yaml +++ b/cloud/corfu/corfu/templates/serviceaccount.yaml @@ -26,7 +26,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "corfu.serviceAccountName" . }}-role-binding + name: {{ include "corfu.name" . }}-role-binding labels: {{- include "corfu.labels" . | indent 4 }} subjects: diff --git a/cloud/corfu/corfu/templates/statefulset.yaml b/cloud/corfu/corfu/templates/statefulset.yaml index a1f829ad..f97a85d1 100644 --- a/cloud/corfu/corfu/templates/statefulset.yaml +++ b/cloud/corfu/corfu/templates/statefulset.yaml @@ -5,10 +5,8 @@ metadata: labels: {{- include "corfu.labels" . | indent 4 }} spec: - serviceName: {{ include "corfu.name" . }}-headless + serviceName: {{ include "corfu.fullname" . }}-headless replicas: {{ include "corfu.replicas" . }} - updateStrategy: - type: RollingUpdate podManagementPolicy: Parallel selector: matchLabels: @@ -31,7 +29,7 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: create-layout - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - "/bin/bash" @@ -39,7 +37,7 @@ spec: - | set -e python3 /etc/corfu/configs/init_layout.py --template /etc/corfu/configs/layout_template.json --layout /usr/share/configs/layout.json \ - --replica {{ include "corfu.replicas" . }} --statefulset {{ include "corfu.fullname" . }} --headless {{ include "corfu.name" . }}-headless --port {{ .Values.service.port }} --type {{ .Values.cluster.type }} + --replica {{ include "corfu.replicas" . }} --statefulset {{ include "corfu.name" . }} --headless {{ include "corfu.name" . }}-headless --port {{ .Values.service.port }} env: - name: POD_NAMESPACE valueFrom: @@ -48,11 +46,11 @@ spec: volumeMounts: - name: workdir mountPath: /usr/share/configs - - name: {{ include "corfu.fullname" . }}-layout-configs + - name: corfu-layout-configs mountPath: /etc/corfu/configs containers: - name: bootstrap-corfu - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: - name: workdir @@ -76,8 +74,7 @@ spec: echo "Current node is bootstrapped. Nothing to do." sleep inf fi - - {{- if .Values.version.new }} + {{- if .Values.tls.enabled }} certs_truststore_file=/certs/truststore.jks if test -f "$certs_truststore_file"; @@ -93,7 +90,7 @@ spec: --enable-tls --keystore=/certs/keystore.jks --truststore=/certs/truststore.jks \ --keystore-password-file=/password/password --truststore-password-file=/password/password \ {{- end }} - --retries 10 --timeout 5000 $POD_NAME.{{ include "corfu.name" . }}-headless.$POD_NAMESPACE.svc.cluster.local:9000 \ + --retries 10 --timeout 5000 $POD_NAME.corfu-headless.$POD_NAMESPACE.svc.cluster.local:9000 \ &> /tmp/ping.log if grep -q "All nodes are reachable!" "/tmp/ping.log"; then @@ -102,14 +99,13 @@ spec: cat /tmp/ping.log exit 1 fi - {{- end }} echo "bootstrap local node with layout:" cat /configs/layout.json echo /usr/share/corfu/bin/corfu_bootstrap_cluster --layout=/configs/layout.json \ - -n "$POD_NAME.{{ include "corfu.name" . }}-headless.$POD_NAMESPACE.svc.cluster.local:9000" \ + -n "$POD_NAME.corfu-headless.$POD_NAMESPACE.svc.cluster.local:9000" \ --connection-timeout 2000 \ {{- if .Values.tls.enabled }} --enable-tls --keystore=/certs/keystore.jks --truststore=/certs/truststore.jks \ @@ -134,8 +130,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: corfu - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + - name: {{ include "corfu.fullname" . }} + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} readinessProbe: exec: @@ -160,7 +156,7 @@ spec: - "sh" - "-c" - | - output=$(curl $POD_NAME.{{ include "corfu.name" . }}-headless.$POD_NAMESPACE.svc.cluster.local:8080/health | jq -r .liveness.status) + output=$(curl $POD_NAME.corfu-headless.$POD_NAMESPACE.svc.cluster.local:8080/health | jq -r .liveness.status) if [ "$output" == "DOWN"]; then exit 1 fi @@ -178,7 +174,7 @@ spec: -Dlogback.configurationFile=/usr/share/corfu/conf/logback.prod.xml \ -Djava.io.tmpdir=/tmp \ org.corfudb.infrastructure.CorfuServer \ - -a $POD_NAME.{{ include "corfu.name" . }}-headless.$POD_NAMESPACE.svc.cluster.local \ + -a $POD_NAME.corfu-headless.$POD_NAMESPACE.svc.cluster.local \ {{- if .Values.persistence.enabled }} -l /config \ {{- else }} @@ -192,12 +188,10 @@ spec: -k {{ .Values.extraServerArgs.sequencerCacheSize }} \ -d {{ .Values.extraServerArgs.logLevel }} \ --log-size-quota-percentage {{ .Values.extraServerArgs.logSizeQuotaPercentage }} \ - {{- if .Values.version.new }} --compactor-script {{ .Values.extraServerArgs.compactorScript }} \ --compactor-config {{ .Values.extraServerArgs.compactorConfig }} \ --compaction-trigger-freq-ms {{ .Values.extraServerArgs.compactorTriggerFreqMs }} \ --health-port={{ .Values.service.healthPort }} \ - {{- end }} {{- if .Values.extraServerArgs.metricsEnabled }} --metrics \ {{- end }} diff --git a/cloud/corfu/corfu/values.yaml b/cloud/corfu/corfu/values.yaml index 5d7c1a96..c7751999 100644 --- a/cloud/corfu/corfu/values.yaml +++ b/cloud/corfu/corfu/values.yaml @@ -1,4 +1,4 @@ -nameOverride: "corfu" +nameOverride: "" fullnameOverride: "corfu" branch: master commitSha: "" @@ -7,7 +7,7 @@ image: registry: "docker.io" repository: "corfudb/corfu-server" tag: "cloud" - pullPolicy: IfNotPresent + pullPolicy: Always imagePullSecretsEnabled: false imagePullSecrets: - name: "secret" @@ -15,15 +15,6 @@ persistence: enabled: true storageSize: 2Gi storageClass: "local-path" -logPersistence: - enabled: true - storageSize: 4Gi - storageClass: "local-path" -cluster: - type: "source" -lr: - port: 9010 - name: "log-replication" resources: {} resourcesLR: {} service: @@ -51,7 +42,6 @@ tls: passwordName: corfu-password password: "MTIzNDU2" jvmArgsFilePath: "java_opts/default" -jvmArgsFilePathLR: "java_opts/lr" extraServerArgs: cacheHeapRatio: 0.2 sequencerCacheSize: "5000000" @@ -61,5 +51,3 @@ extraServerArgs: compactorConfig: "/usr/share/corfu/conf/corfu-compactor-config.yml" compactorTriggerFreqMs: 900000 metricsEnabled: true -version: - new: false \ No newline at end of file