You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2021/11/15 20:17:39 UTC

[cassandra-harry] branch trunk updated (f6b4df6 -> 26bb669)

This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-harry.git.


    from f6b4df6  Add history builder and an ability to write unit-tests with Harry
     new b566e8f  Makefile: support to build without creating docker image
     new 0229696  scripts: add scripts/cassandra-harry
     new 26bb669  script: add options to cassandra-harry script

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Makefile                |  7 ++++--
 scripts/cassandra-harry | 57 +++++++++++++++++++++++++++++++++++++++++++++++++
 scylla-usage.md         | 15 +++++++++++++
 3 files changed, 77 insertions(+), 2 deletions(-)
 create mode 100755 scripts/cassandra-harry
 create mode 100644 scylla-usage.md

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-harry] 03/03: script: add options to cassandra-harry script

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-harry.git

commit 26bb6696ba1b18ff5c062d780a9360e750691052
Author: Amos Kong <am...@scylladb.com>
AuthorDate: Tue Jun 1 21:50:48 2021 +0800

    script: add options to cassandra-harry script
    
    This patch added options to wrap script, it supported to assign test
    duraton from cmdline.
    
    Signed-off-by: Amos Kong <am...@scylladb.com>
---
 scripts/cassandra-harry | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 scylla-usage.md         |  2 +-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/scripts/cassandra-harry b/scripts/cassandra-harry
index dd27f7b..94ee991 100755
--- a/scripts/cassandra-harry
+++ b/scripts/cassandra-harry
@@ -4,6 +4,54 @@ if [ "x$HARRY_HOME" == 'x' ]; then
     HARRY_HOME=~/cassandra-harry
 fi
 
+print_usage() {
+    cat <<EOF
+Usage: cassandra-harry [options]
+
+Options:
+  -node      ip address  node's ip
+  -run-time  number      run time, unit: hours
+  -run-time-unit unit    unit of run time, HOURS, MINUTES
+  -help                  this helpful message
+EOF
+    exit 1
+}
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+        "-node")
+            node="$2"
+            shift 2
+            ;;
+        "-run-time")
+            run_time="$2"
+            shift 2
+            ;;
+        "-run-time-unit")
+            run_time_unit="$2"
+            shift 2
+            ;;
+        "-help")
+            shift 1
+	    print_usage
+            ;;
+        *)
+	    print_usage
+            ;;
+    esac
+done
+
+
+if [[ ! -z $node ]]; then
+    sed -i -e "s/contact_points:.*/contact_points: $node/g" $HARRY_HOME/conf/external.yaml
+fi
+if [[ ! -z $run_time ]]; then
+    sed -i -e "s/run_time:.*/run_time: $run_time/g" $HARRY_HOME/conf/external.yaml
+fi
+if [[ ! -z $run_time_unit ]]; then
+    sed -i -e "s/run_time_unit:.*/run_time_unit: \"$run_time_unit\"/g" $HARRY_HOME/conf/external.yaml
+fi
+
 java -Dlogback.configurationFile=$HARRY_HOME/test/conf/logback-dtest.xml \
      -jar $HARRY_HOME/harry-integration-external/target/harry-integration-external-0.0.1-SNAPSHOT.jar \
      $HARRY_HOME/conf/external.yaml
diff --git a/scylla-usage.md b/scylla-usage.md
index b70f261..159c5c5 100644
--- a/scylla-usage.md
+++ b/scylla-usage.md
@@ -11,5 +11,5 @@ sudo ln -s `realpath scripts/cassandra-harry` /usr/bin/cassandra-harry
 ### Execute
 
 ```
-HARRY_HOME=~/cassandra-harry cassandra-harry
+HARRY_HOME=~/cassandra-harry cassandra-harry -run-time 2 -run-time-unit HOURS
 ```

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-harry] 01/03: Makefile: support to build without creating docker image

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-harry.git

commit b566e8fb8aaff5a1420f55dd44ac366b4465ace7
Author: Amos Kong <am...@scylladb.com>
AuthorDate: Tue Jan 19 22:03:46 2021 +0800

    Makefile: support to build without creating docker image
    
    When external cluster is used, docker isn't needed.
    
    Signed-off-by: Amos Kong <am...@scylladb.com>
---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c1e99dd..86d4b28 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,12 @@
 
 DOCKER_REPO   = org.apache.cassandra/harry/harry-runner
 
-img:
+mvn:
 	rm -fr shared/*
-	mvn clean && mvn package -DskipTests && docker build -t ${DOCKER_REPO}:latest-local ./ -f docker/Dockerfile.local
+	mvn clean && mvn package -DskipTests
+
+img: mvn
+	docker build -t ${DOCKER_REPO}:latest-local ./ -f docker/Dockerfile.local
 
 run: img
 	docker run -v `pwd`/shared:/shared -it ${DOCKER_REPO}:latest-local

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-harry] 02/03: scripts: add scripts/cassandra-harry

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-harry.git

commit 02296963c97b43e7247ef9d1228ed244cfe3f778
Author: Amos Kong <am...@scylladb.com>
AuthorDate: Tue Jan 19 22:24:20 2021 +0800

    scripts: add scripts/cassandra-harry
    
    We want to use cassandra-harry in automation test, and it's not
    convenient to set eveything in yaml config.
    
    This patch added a script to accept the cmdline options and editing the
    yaml config.
    
    Signed-off-by: Amos Kong <am...@scylladb.com>
---
 scripts/cassandra-harry |  9 +++++++++
 scylla-usage.md         | 15 +++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/scripts/cassandra-harry b/scripts/cassandra-harry
new file mode 100755
index 0000000..dd27f7b
--- /dev/null
+++ b/scripts/cassandra-harry
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "x$HARRY_HOME" == 'x' ]; then
+    HARRY_HOME=~/cassandra-harry
+fi
+
+java -Dlogback.configurationFile=$HARRY_HOME/test/conf/logback-dtest.xml \
+     -jar $HARRY_HOME/harry-integration-external/target/harry-integration-external-0.0.1-SNAPSHOT.jar \
+     $HARRY_HOME/conf/external.yaml
diff --git a/scylla-usage.md b/scylla-usage.md
new file mode 100644
index 0000000..b70f261
--- /dev/null
+++ b/scylla-usage.md
@@ -0,0 +1,15 @@
+
+### Install
+
+```
+git clone -b scylla-branch https://github.com/amoskong/cassandra-harry
+cd cassandra-harry
+make mvn
+sudo ln -s `realpath scripts/cassandra-harry` /usr/bin/cassandra-harry
+```
+
+### Execute
+
+```
+HARRY_HOME=~/cassandra-harry cassandra-harry
+```

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org