From da0c667478c6dc5c9a7ee68ea324b2265e49ca77 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 3 Oct 2016 15:02:31 +0300 Subject: [PATCH 01/32] init commit --- build.sh | 2 + containers/templates/Dockerfile-ubuntu-cbas | 28 ++++++ tests/cbas/scope_partialInitNodes.yml | 19 ++++ tests/cbas/test_cbas.yml | 97 +++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 containers/templates/Dockerfile-ubuntu-cbas create mode 100644 tests/cbas/scope_partialInitNodes.yml create mode 100644 tests/cbas/test_cbas.yml diff --git a/build.sh b/build.sh index 514a622e..5b33dc12 100755 --- a/build.sh +++ b/build.sh @@ -8,6 +8,7 @@ docker pull clue/httpie docker build -t ubuntu_gcc -f containers/templates/Dockerfile-ubuntu-gcc containers/templates/ docker build -t ubuntu_python -f containers/templates/Dockerfile-ubuntu-python containers/templates/ docker build -t ubuntu_vbr -f containers/templates/Dockerfile-ubuntu-vbr containers/templates/ +docker build -t ubuntu_cbas -f containers/templates/Dockerfile-ubuntu-cbas containers/templates/ # framework containers docker build -t sequoiatools/perfrunner containers/perfrunner @@ -18,6 +19,7 @@ docker build -t sequoiatools/tpcc containers/tpcc docker build -t sequoiatools/pillowfight containers/pillowfight docker build -t sequoiatools/gideon containers/gideon # depends on pillowfight docker build -t sequoiatools/vbr containers/vbr +docker build -t sequoiatools/cbas containers/cbas #docker build -t ycsb containers/ycsb #docker build -t mysql containers/mysql #docker build -t elasticsearch containers/elasticsearch diff --git a/containers/templates/Dockerfile-ubuntu-cbas b/containers/templates/Dockerfile-ubuntu-cbas new file mode 100644 index 00000000..cc41190a --- /dev/null +++ b/containers/templates/Dockerfile-ubuntu-cbas @@ -0,0 +1,28 @@ +FROM ubuntu:14.04 +RUN apt-get update +RUN apt-get install -y python-software-properties software-properties-common +RUN add-apt-repository ppa:webupd8team/java +RUN apt-get update +RUN apt-get install -y git curl wget zip unzip +RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections +RUN apt-get install -y oracle-java8-installer +WORKDIR /tmp +RUN wget http://mirror.fibergrid.in/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz +RUN tar -zxvf apache-maven-3.3.9-bin.tar.gz +RUN mv apache-maven-3.3.9 /usr/local/. +RUN sudo ln -s /usr/local/apache-maven-3.3.9/bin/mvn /usr/bin/mvn +RUN mvn --version +RUN git config --global user.email "andrei.baranouski@gmail.com" +RUN git config --global user.name "andreibaranouski" +RUN git config --global color.ui false +RUN mkdir -p /root/.ssh/ +RUN ssh-keyscan github.com >> ~/.ssh/known_hosts +RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo +RUN chmod a+x /usr/bin/repo +ADD id_rsa /root/.ssh/id_rsa +RUN chmod 400 /root/.ssh/id_rsa +RUN mkdir -p /root/cbas +RUN cd /root/cbas && repo init -u git://github.com/couchbase/manifest -m analytics/master.xml && repo sync --jobs=6 +RUN cd /root/cbas/asterixdb && mvn clean install -DskipTests +RUN cd /root/cbas && unzip ./asterixdb/asterixdb/asterix-opt/installer/target/couchbase-analytics-1.0.0-SNAPSHOT-generic.zip + diff --git a/tests/cbas/scope_partialInitNodes.yml b/tests/cbas/scope_partialInitNodes.yml new file mode 100644 index 00000000..c18ff71f --- /dev/null +++ b/tests/cbas/scope_partialInitNodes.yml @@ -0,0 +1,19 @@ +--- +buckets: + - + name: default + ram: 80% + eviction: fullEviction + + +servers: + - + name: local + count: 8 + ram: 80% + rest_username: Administrator + rest_password: password + #data_path: "/data" + #index_path: "/data" + init_nodes: 6 # ONLY INIT 4 NODES + buckets: default diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml new file mode 100644 index 00000000..c65c747b --- /dev/null +++ b/tests/cbas/test_cbas.yml @@ -0,0 +1,97 @@ +--- +- + include: tests/templates/rebalance.yml, tests/templates/fts.yml + +# start json and binary data loading +#- +# image: sequoiatools/pillowfight +# command: "-U {{.Orchestrator}} -B {{.Scale 10}} -I {{.Scale 100}} -t 1" +- + image: sequoiatools/gideon + command: "kv --ops {{.Scale 10}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 160" + +## create index on buckets +#- +# template: create_index +# args: "default, st_index" +# wait: true +# +## run field matching queries +#- +# template: query_index_field +# args: "st_index, 5F" +#- +# template: query_index_field +# args: "st_index, 0B" +#- +# template: query_index_field +# args: "st_index, C5" +# +## scale cluster up +#- +# template: add_node +# args: "{{.NthDataNode 2}}, data" +#- +# template: add_node +# args: "{{.NthDataNode 3}}, (data,fts)" +#- +# template: rebalance +# +## make some more indexes across buckets +#- +# template: create_index +# args: "{{.NthBucket 1}}, st_index02" +# wait: true +#- +# template: create_index +# args: "{{.NthBucket 2}}, st_index03" +# wait: true +#- +# template: create_index +# args: "default, st_index04" +# wait: true +# +## scale cluster up more +#- +# template: add_node +# args: "{{.NthDataNode 4}}, data" +#- +# template: add_node +# args: "{{.NthDataNode 5}}, (data,fts)" +#- +# template: rebalance +# +## start queries on new indexes +#- +# template: query_index_field +# args: "st_index02, C5" +#- +# template: query_index_field +# args: "st_index03, C5" +#- +# template: query_index_field +# args: "st_index04, C5" +# +## scale back down +#- +# template: rebalance_out +# args: "{{.NthDataNode 1}}" +# wait: true +# +## failover an fts node +#- +# template: failover_node_forced +# args: "{{.Nodes | .Service `fts` | net 0}}" +#- +# template: rebalance +# wait: true +# +## rebalance out more nodes +#- +# template: rebalance_out +# args: "{{.NthDataNode 2}}" +# wait: true +#- +# template: rebalance_out +# args: "{{.NthDataNode 3}}" +# wait: true From bc096abc78573a4ea96f0e6201a0bd15768246fa Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 3 Oct 2016 16:04:20 +0300 Subject: [PATCH 02/32] add containers/cbas/ --- containers/cbas/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 containers/cbas/Dockerfile diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile new file mode 100644 index 00000000..5dd58858 --- /dev/null +++ b/containers/cbas/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu_cbas +RUN ls -la +WORKDIR /root/cbas/cbas +ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] + + + From 38978ab3045e4468eeecde8c2721044f503b43d8 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 3 Oct 2016 16:43:00 +0300 Subject: [PATCH 03/32] use JAVA_HOME in containers/cbas/Dockerfile --- containers/cbas/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 5dd58858..3595613c 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas -ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] +ENTRYPOINT ["export JAVA_HOME=/usr/lib/jvm/java-8-oracle && ./samples/local/bin/start-sample-cluster.sh"] From 45dcc74d5ea0b379f6bf2a51f81884b940d15be7 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 3 Oct 2016 16:51:32 +0300 Subject: [PATCH 04/32] use ENV JAVA_HOME in containers/cbas/Dockerfile --- containers/cbas/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 3595613c..134c9fb1 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -1,7 +1,8 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas -ENTRYPOINT ["export JAVA_HOME=/usr/lib/jvm/java-8-oracle && ./samples/local/bin/start-sample-cluster.sh"] +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle +ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] From 34eee95358e1a5cb89c9932aafb0cbebd104ac72 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 00:11:07 +0300 Subject: [PATCH 05/32] new changes in cbas tests --- containers/cbas/Dockerfile | 2 ++ containers/curloop/Dockerfile | 4 +++- containers/curloop/cbas.sh | 8 ++++++++ containers/curloop/cbasloop.sh | 7 +++++++ tests/cbas/test_cbas.yml | 18 +++++++++++++++--- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100755 containers/curloop/cbas.sh create mode 100755 containers/curloop/cbasloop.sh diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 134c9fb1..3a58e19a 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -1,8 +1,10 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas +RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] +RUN sleep 1000000 & diff --git a/containers/curloop/Dockerfile b/containers/curloop/Dockerfile index 352358c8..9d9df8b1 100644 --- a/containers/curloop/Dockerfile +++ b/containers/curloop/Dockerfile @@ -1,3 +1,5 @@ FROM appropriate/curl COPY n1ql.sh /bin/n1ql.sh -COPY view.sh /bin/view.sh +COPY view.sh /bin/view.sh +COPY cbas.sh /bin/cbas.sh +COPY cbasloop.sh /bin/cbasloop.sh diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh new file mode 100755 index 00000000..47ac2243 --- /dev/null +++ b/containers/curloop/cbas.sh @@ -0,0 +1,8 @@ +#!/bin/sh +ID="`docker ps -a | grep "Up" | grep "ubuntu_cbas" | awk '{print $1}'`" +HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +STATEMENT=$1 +echo $ID +echo $HOST +echo $STATEMENT +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh new file mode 100755 index 00000000..a4714c91 --- /dev/null +++ b/containers/curloop/cbasloop.sh @@ -0,0 +1,7 @@ +#!/bin/sh +ID="`docker ps -a | grep "Up" | grep "ubuntu_cbas" | awk '{print $1}'`" +HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +STATEMENT=$1 +while [ 1 ] ; do + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt +done diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index c65c747b..4ecc674e 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -3,12 +3,24 @@ include: tests/templates/rebalance.yml, tests/templates/fts.yml # start json and binary data loading -#- -# image: sequoiatools/pillowfight -# command: "-U {{.Orchestrator}} -B {{.Scale 10}} -I {{.Scale 100}} -t 1" +- + image: sequoiatools/pillowfight + command: "-U {{.Orchestrator}} -B {{.Scale 10}} -I {{.Scale 100}} -t 1" - image: sequoiatools/gideon command: "kv --ops {{.Scale 10}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 160" +- + image: sequoiatools/cbas + command: " > LOGS" + wait: true +- + image: sequoiatools/cmd + entrypoint: sleep + command: "{{.Scale 360}}" + wait: true +- + image: sequoiatools/curloop + command: "cbas.sh {{.QueryNodePort}} 'select * from default where rating > 0 limit 50'" ## create index on buckets #- From 0dc3e7cafa3c69c57b8a01c82ea64ec0bfdb249f Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 00:50:40 +0300 Subject: [PATCH 06/32] fix in containers/cbas/Dockerfile --- containers/cbas/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 3a58e19a..ca2f0984 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -2,9 +2,6 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh +RUN echo "sleep 10000o &" > ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle -ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] -RUN sleep 1000000 & - - - +ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] \ No newline at end of file From cf8e4920b9b8cfd43d62dfd79f411defb69924a4 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 00:54:49 +0300 Subject: [PATCH 07/32] fix containers/cbas/Dockerfile --- containers/cbas/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index ca2f0984..c41d190c 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -2,6 +2,6 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh -RUN echo "sleep 10000o &" > ./samples/local/bin/start-sample-cluster.sh +RUN echo "sleep 10000 &" > ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] \ No newline at end of file From 32b47e805a7329cc96858a3c1c9b23c9b3d8cfdf Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 12:28:47 +0300 Subject: [PATCH 08/32] new portion of fixes --- containers/cbas/Dockerfile | 2 +- containers/curloop/cbas.sh | 5 +++-- containers/curloop/cbasloop.sh | 5 +++-- tests/cbas/test_cbas.yml | 14 +++++++++----- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index c41d190c..17e37e7a 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -2,6 +2,6 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh -RUN echo "sleep 10000 &" > ./samples/local/bin/start-sample-cluster.sh +RUN echo "sleep 100000" >> ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] \ No newline at end of file diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 47ac2243..fb1f9004 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -1,6 +1,7 @@ #!/bin/sh -ID="`docker ps -a | grep "Up" | grep "ubuntu_cbas" | awk '{print $1}'`" -HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +#ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` +#HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +HOST="172.17.0.4" STATEMENT=$1 echo $ID echo $HOST diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index a4714c91..e8846d72 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -1,6 +1,7 @@ #!/bin/sh -ID="`docker ps -a | grep "Up" | grep "ubuntu_cbas" | awk '{print $1}'`" -HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +#ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` +#HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` +HOST="172.17.0.4" STATEMENT=$1 while [ 1 ] ; do curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 4ecc674e..22781d0f 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -11,17 +11,21 @@ command: "kv --ops {{.Scale 10}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 160" - image: sequoiatools/cbas - command: " > LOGS" - wait: true + command: "> LOGS" + wait: false - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 360}}" + command: "{{.Scale 60}}" wait: true - image: sequoiatools/curloop - command: "cbas.sh {{.QueryNodePort}} 'select * from default where rating > 0 limit 50'" - + command: "cbas.sh 'create bucket beerBucket with { 'bucket': 'default', 'nodes': '172.23.108.8' };'" +- + image: sequoiatools/cmd + entrypoint: sleep + command: "{{.Scale 260}}" + wait: true ## create index on buckets #- # template: create_index From e0cf8e1800d79d8d3a95849085e32048a8314c05 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 13:23:07 +0300 Subject: [PATCH 09/32] new iteration --- containers/cbas/Dockerfile | 3 ++- containers/curloop/cbas.sh | 2 +- tests/cbas/test_cbas.yml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 17e37e7a..7d9b06ff 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh -RUN echo "sleep 100000" >> ./samples/local/bin/start-sample-cluster.sh +RUN echo "ifconfig" > ./samples/local/bin/start-sample-cluster.sh +RUN echo "sleep 100000" > ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] \ No newline at end of file diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index fb1f9004..e83cb4c5 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -3,7 +3,7 @@ #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" STATEMENT=$1 -echo $ID +#echo $ID echo $HOST echo $STATEMENT curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 22781d0f..7da42534 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -16,7 +16,7 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 60}}" + command: "{{.Scale 30}}" wait: true - image: sequoiatools/curloop @@ -24,7 +24,7 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 260}}" + command: "{{.Scale 200}}" wait: true ## create index on buckets #- From 73fc7abe9b1cfade06dc3f63106f506dd9cd8d13 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 14:09:35 +0300 Subject: [PATCH 10/32] fix in origin/cbas_systests --- containers/cbas/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/cbas/Dockerfile b/containers/cbas/Dockerfile index 7d9b06ff..00aa0453 100644 --- a/containers/cbas/Dockerfile +++ b/containers/cbas/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu_cbas RUN ls -la WORKDIR /root/cbas/cbas RUN sed -i '$ d' ./samples/local/bin/start-sample-cluster.sh -RUN echo "ifconfig" > ./samples/local/bin/start-sample-cluster.sh -RUN echo "sleep 100000" > ./samples/local/bin/start-sample-cluster.sh +RUN echo "ifconfig" >> ./samples/local/bin/start-sample-cluster.sh +RUN echo "sleep 100000" >> ./samples/local/bin/start-sample-cluster.sh ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENTRYPOINT ["./samples/local/bin/start-sample-cluster.sh"] \ No newline at end of file From b33bec0b2ca3739774c0b97fccd4c1520b7bfd2d Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 14:27:10 +0300 Subject: [PATCH 11/32] fix --- containers/curloop/cbas.sh | 2 +- containers/curloop/cbasloop.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index e83cb4c5..137a2415 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -6,4 +6,4 @@ STATEMENT=$1 #echo $ID echo $HOST echo $STATEMENT -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v > logs.txt diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index e8846d72..5340b195 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -4,5 +4,5 @@ HOST="172.17.0.4" STATEMENT=$1 while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode '$STATEMENT' http://$HOST:8095/analytics/service -v > logs.txt + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v > logs.txt done From b3ac5e727a98ba2682a69756ab2bc35cf77c79b7 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 22:17:11 +0300 Subject: [PATCH 12/32] new fixes --- build.sh | 1 + containers/curloop/cbas.sh | 2 +- tests/cbas/test_cbas.yml | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 5b33dc12..70a22970 100755 --- a/build.sh +++ b/build.sh @@ -18,6 +18,7 @@ docker build -t sequoiatools/testrunner containers/testrunner docker build -t sequoiatools/tpcc containers/tpcc docker build -t sequoiatools/pillowfight containers/pillowfight docker build -t sequoiatools/gideon containers/gideon # depends on pillowfight +docker build -t sequoiatools/curloop containers/curloop docker build -t sequoiatools/vbr containers/vbr docker build -t sequoiatools/cbas containers/cbas #docker build -t ycsb containers/ycsb diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 137a2415..e7e0afee 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -2,7 +2,7 @@ #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" -STATEMENT=$1 +STATEMENT=${@} #echo $ID echo $HOST echo $STATEMENT diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 7da42534..341038e2 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -16,11 +16,11 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 30}}" + command: "{{.Scale 20}}" wait: true - image: sequoiatools/curloop - command: "cbas.sh 'create bucket beerBucket with { 'bucket': 'default', 'nodes': '172.23.108.8' };'" + command: "cbas.sh create bucket beerBucket with { \'bucket\': \'default\', \'nodes\': \'172.23.108.8\' };" - image: sequoiatools/cmd entrypoint: sleep From fce93f9dea7565eccc45397731e04c0f2c9e5f3c Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 22:56:35 +0300 Subject: [PATCH 13/32] add cbas statements --- containers/curloop/cbas.sh | 2 +- containers/curloop/cbasloop.sh | 2 +- tests/cbas/test_cbas.yml | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index e7e0afee..eca26421 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -6,4 +6,4 @@ STATEMENT=${@} #echo $ID echo $HOST echo $STATEMENT -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v > logs.txt +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v #> logs.txt diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 5340b195..1f641bb2 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -4,5 +4,5 @@ HOST="172.17.0.4" STATEMENT=$1 while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v > logs.txt + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v #> logs.txt done diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 341038e2..c2e18903 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -16,11 +16,15 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 20}}" + command: "{{.Scale 3}}" wait: true - image: sequoiatools/curloop - command: "cbas.sh create bucket beerBucket with { \'bucket\': \'default\', \'nodes\': \'172.23.108.8\' };" + command: "cbas.sh create bucket defaultBucket with { \''bucket\': \''default\', \''nodes\': \''172.23.108.8\' };" +- + command: "cbas.sh create shadow dataset beers on defaultBucket;" +- + command: "cbas.sh connect bucket beerBucket with { \''password': \''' };" - image: sequoiatools/cmd entrypoint: sleep From 2f22a75da888588e8e6ba4fa97a7e8b08b70801b Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 4 Oct 2016 23:50:42 +0300 Subject: [PATCH 14/32] new expressions --- tests/cbas/test_cbas.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index c2e18903..5288ba7a 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -3,12 +3,14 @@ include: tests/templates/rebalance.yml, tests/templates/fts.yml # start json and binary data loading -- - image: sequoiatools/pillowfight - command: "-U {{.Orchestrator}} -B {{.Scale 10}} -I {{.Scale 100}} -t 1" +#- +# image: sequoiatools/pillowfight +# command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" - image: sequoiatools/gideon - command: "kv --ops {{.Scale 10}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 160" + command: "kv --ops {{.Scale 100}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" +- + command: "kv --ops {{.Scale 100}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" - image: sequoiatools/cbas command: "> LOGS" @@ -22,9 +24,9 @@ image: sequoiatools/curloop command: "cbas.sh create bucket defaultBucket with { \''bucket\': \''default\', \''nodes\': \''172.23.108.8\' };" - - command: "cbas.sh create shadow dataset beers on defaultBucket;" + command: "cbas.sh create shadow dataset shadowBucket on defaultBucket;" - - command: "cbas.sh connect bucket beerBucket with { \''password': \''' };" + command: "cbas.sh connect bucket defaultBucket with { \''password': \''' };" - image: sequoiatools/cmd entrypoint: sleep From bdf492a14305d3e174cad1a8f54062de43666ddc Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Wed, 5 Oct 2016 15:40:25 +0300 Subject: [PATCH 15/32] new changes --- containers/curloop/cbas.sh | 5 +++-- containers/curloop/cbasloop.sh | 5 +++-- tests/cbas/test_cbas.yml | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index eca26421..754a887e 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -2,8 +2,9 @@ #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" -STATEMENT=${@} +STATEMENT=$@ #echo $ID echo $HOST echo $STATEMENT -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v #> logs.txt +echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v" +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 1f641bb2..aafa3bc2 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -2,7 +2,8 @@ #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" -STATEMENT=$1 +STATEMENT=$@ while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v #> logs.txt + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v + #> logs.txt done diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 5288ba7a..8c6b324f 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -18,7 +18,7 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 3}}" + command: "{{.Scale 2}}" wait: true - image: sequoiatools/curloop @@ -27,6 +27,8 @@ command: "cbas.sh create shadow dataset shadowBucket on defaultBucket;" - command: "cbas.sh connect bucket defaultBucket with { \''password': \''' };" +- + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \\''25\\' and \\`result\\` = \\''SUCCESS\\' group by \\`city\\`\\;" - image: sequoiatools/cmd entrypoint: sleep From 0a4571070fe18b6e61ffa7c295efb40a16f7b478 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Wed, 5 Oct 2016 19:14:18 +0300 Subject: [PATCH 16/32] new changes --- containers/curloop/cbas.sh | 8 +++----- containers/curloop/cbasloop.sh | 4 ++-- tests/cbas/test_cbas.yml | 14 +++++++++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 754a887e..9715e1e5 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -3,8 +3,6 @@ #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" STATEMENT=$@ -#echo $ID -echo $HOST -echo $STATEMENT -echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v" -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v \ No newline at end of file +STATEMENT=${STATEMENT//\\/""} # remove \ slashes +echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index aafa3bc2..21251c7f 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -3,7 +3,7 @@ #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` HOST="172.17.0.4" STATEMENT=$@ +STATEMENT=${STATEMENT//\\/""} # remove \ slashes while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v - #> logs.txt + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log done diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 8c6b324f..05aa7f2f 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -8,9 +8,9 @@ # command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" - image: sequoiatools/gideon - command: "kv --ops {{.Scale 100}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" + command: "kv --ops {{.Scale 50}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" - - command: "kv --ops {{.Scale 100}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" + command: "kv --ops {{.Scale 50}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" - image: sequoiatools/cbas command: "> LOGS" @@ -28,7 +28,15 @@ - command: "cbas.sh connect bucket defaultBucket with { \''password': \''' };" - - command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \\''25\\' and \\`result\\` = \\''SUCCESS\\' group by \\`city\\`\\;" + image: sequoiatools/cmd + entrypoint: sleep + command: "{{.Scale 2}}" + wait: true +- + image: sequoiatools/curloop + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" +- + command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" - image: sequoiatools/cmd entrypoint: sleep From cba9d3f3eebfe727349aadd2db306aaf87f89e52 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 6 Oct 2016 16:34:36 +0300 Subject: [PATCH 17/32] add new steps --- containers/curloop/cbas.sh | 5 +- containers/curloop/cbasloop.sh | 1 + tests/cbas/test_cbas.yml | 158 ++++++++++++++------------------- 3 files changed, 72 insertions(+), 92 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 9715e1e5..c968afe9 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -1,8 +1,9 @@ #!/bin/sh #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` -HOST="172.17.0.4" +HOST="172.17.0.4" # we need run 'docker rm -fv $(docker ps -qa)' before test STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes -echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" +STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression +#echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 21251c7f..555a8c75 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -4,6 +4,7 @@ HOST="172.17.0.4" STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes +STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression while [ 1 ] ; do curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log done diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 05aa7f2f..b28dd8e5 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -18,8 +18,9 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 2}}" + command: "{{.Scale 10}}" wait: true +# connect bucket with CBAS - image: sequoiatools/curloop command: "cbas.sh create bucket defaultBucket with { \''bucket\': \''default\', \''nodes\': \''172.23.108.8\' };" @@ -30,100 +31,77 @@ - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 2}}" + command: "{{.Scale 10}}" wait: true +# query on cbas side. # TODO add more queries - image: sequoiatools/curloop - command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" -- command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" +- + command: "cbasloop.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" +- + command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" - image: sequoiatools/cmd entrypoint: sleep - command: "{{.Scale 200}}" + command: "{{.Scale 20}}" wait: true -## create index on buckets -#- -# template: create_index -# args: "default, st_index" -# wait: true -# -## run field matching queries -#- -# template: query_index_field -# args: "st_index, 5F" -#- -# template: query_index_field -# args: "st_index, 0B" -#- -# template: query_index_field -# args: "st_index, C5" -# -## scale cluster up -#- -# template: add_node -# args: "{{.NthDataNode 2}}, data" -#- -# template: add_node -# args: "{{.NthDataNode 3}}, (data,fts)" -#- -# template: rebalance -# -## make some more indexes across buckets -#- -# template: create_index -# args: "{{.NthBucket 1}}, st_index02" -# wait: true -#- -# template: create_index -# args: "{{.NthBucket 2}}, st_index03" -# wait: true -#- -# template: create_index -# args: "default, st_index04" -# wait: true -# -## scale cluster up more -#- -# template: add_node -# args: "{{.NthDataNode 4}}, data" -#- -# template: add_node -# args: "{{.NthDataNode 5}}, (data,fts)" -#- -# template: rebalance -# -## start queries on new indexes -#- -# template: query_index_field -# args: "st_index02, C5" -#- -# template: query_index_field -# args: "st_index03, C5" -#- -# template: query_index_field -# args: "st_index04, C5" -# -## scale back down -#- -# template: rebalance_out -# args: "{{.NthDataNode 1}}" -# wait: true -# -## failover an fts node -#- -# template: failover_node_forced -# args: "{{.Nodes | .Service `fts` | net 0}}" -#- -# template: rebalance -# wait: true -# -## rebalance out more nodes -#- -# template: rebalance_out -# args: "{{.NthDataNode 2}}" -# wait: true -#- -# template: rebalance_out -# args: "{{.NthDataNode 3}}" -# wait: true +# swap rebalance +- + template: add_node + args: "{{.NthDataNode 6}}, data" +- + template: rebalance_out + args: "{{.NthDataNode 2}}" +- + template: wait_for_rebalance + wait: true + +# scale back down +- + template: rebalance_out + args: "{{.NthDataNode 3}}" +- + template: wait_for_rebalance + wait: true +# failover a node +- + template: failover_node_forced + args: "{{.NthDataNode 4}}" + wait: true +- + template: rebalance + wait: true +- + template: wait_for_rebalance + wait: true +# add one node and then stop rebalance +- + template: add_node + args: "{{.NthDataNode 7}}, data" +- + template: rebalance + wait: false +- + image: sequoiatools/cmd + entrypoint: sleep + command: "{{.Scale 100}}" + wait: true +- + template: rebalance_stop +# failover node with delta recovery +- + template: failover_and_recover + args: "{{.NthDataNode 6}}, delta" + wait: true +- + template: wait_for_rebalance + wait: true + +# rebalance out one node +- + template: rebalance_out + args: "{{.NthDataNode 4}}" +- + template: wait_for_rebalance + wait: true \ No newline at end of file From e0d22af492290749b04426d652da4e154db7602f Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 6 Oct 2016 17:05:20 +0300 Subject: [PATCH 18/32] redirect curl requests into log --- containers/curloop/cbas.sh | 2 +- containers/curloop/cbasloop.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index c968afe9..1444ccd3 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -6,4 +6,4 @@ STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression #echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log \ No newline at end of file +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 555a8c75..812817c8 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -6,5 +6,5 @@ STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service -v # > log + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log done From b5732ddc6b840560514545ab85833f9296e52561 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 6 Oct 2016 17:07:30 +0300 Subject: [PATCH 19/32] slightly increased data load --- tests/cbas/test_cbas.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index b28dd8e5..0f84a864 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -2,15 +2,15 @@ - include: tests/templates/rebalance.yml, tests/templates/fts.yml -# start json and binary data loading -#- -# image: sequoiatools/pillowfight -# command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" + start json and binary data loading +- + image: sequoiatools/pillowfight + command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" - image: sequoiatools/gideon - command: "kv --ops {{.Scale 50}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" + command: "kv --ops {{.Scale 100}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" - - command: "kv --ops {{.Scale 50}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" + command: "kv --ops {{.Scale 100}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" - image: sequoiatools/cbas command: "> LOGS" From fb339e71e3ec488eb3cbb9d6614ebc6362e31971 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 6 Oct 2016 17:17:57 +0300 Subject: [PATCH 20/32] cleanup in cbas tests --- build.sh | 8 ++++---- containers/templates/Dockerfile-ubuntu-cbas | 2 +- containers/templates/id_rsa | 2 ++ .../{scope_partialInitNodes.yml => scope_baseQueries.yml} | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 containers/templates/id_rsa rename tests/cbas/{scope_partialInitNodes.yml => scope_baseQueries.yml} (87%) diff --git a/build.sh b/build.sh index 70a22970..441d8161 100755 --- a/build.sh +++ b/build.sh @@ -7,8 +7,8 @@ docker pull clue/httpie # base template docker build -t ubuntu_gcc -f containers/templates/Dockerfile-ubuntu-gcc containers/templates/ docker build -t ubuntu_python -f containers/templates/Dockerfile-ubuntu-python containers/templates/ -docker build -t ubuntu_vbr -f containers/templates/Dockerfile-ubuntu-vbr containers/templates/ -docker build -t ubuntu_cbas -f containers/templates/Dockerfile-ubuntu-cbas containers/templates/ +#docker build -t ubuntu_vbr -f containers/templates/Dockerfile-ubuntu-vbr containers/templates/ +#docker build -t ubuntu_cbas -f containers/templates/Dockerfile-ubuntu-cbas containers/templates/ # framework containers docker build -t sequoiatools/perfrunner containers/perfrunner @@ -19,8 +19,8 @@ docker build -t sequoiatools/tpcc containers/tpcc docker build -t sequoiatools/pillowfight containers/pillowfight docker build -t sequoiatools/gideon containers/gideon # depends on pillowfight docker build -t sequoiatools/curloop containers/curloop -docker build -t sequoiatools/vbr containers/vbr -docker build -t sequoiatools/cbas containers/cbas +#docker build -t sequoiatools/vbr containers/vbr +#docker build -t sequoiatools/cbas containers/cbas #docker build -t ycsb containers/ycsb #docker build -t mysql containers/mysql #docker build -t elasticsearch containers/elasticsearch diff --git a/containers/templates/Dockerfile-ubuntu-cbas b/containers/templates/Dockerfile-ubuntu-cbas index cc41190a..96fde50e 100644 --- a/containers/templates/Dockerfile-ubuntu-cbas +++ b/containers/templates/Dockerfile-ubuntu-cbas @@ -19,7 +19,7 @@ RUN mkdir -p /root/.ssh/ RUN ssh-keyscan github.com >> ~/.ssh/known_hosts RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo RUN chmod a+x /usr/bin/repo -ADD id_rsa /root/.ssh/id_rsa +ADD id_rsa /root/.ssh/id_rsa # please replace 'id_rsa' file with private key when you pull private projects from github RUN chmod 400 /root/.ssh/id_rsa RUN mkdir -p /root/cbas RUN cd /root/cbas && repo init -u git://github.com/couchbase/manifest -m analytics/master.xml && repo sync --jobs=6 diff --git a/containers/templates/id_rsa b/containers/templates/id_rsa new file mode 100644 index 00000000..389b5351 --- /dev/null +++ b/containers/templates/id_rsa @@ -0,0 +1,2 @@ + !!!!used for Dockerfile-ubuntu-cbas!!!! +!!!!please this file with private key when you pull private projects from github!!!! \ No newline at end of file diff --git a/tests/cbas/scope_partialInitNodes.yml b/tests/cbas/scope_baseQueries.yml similarity index 87% rename from tests/cbas/scope_partialInitNodes.yml rename to tests/cbas/scope_baseQueries.yml index c18ff71f..d7d97ec8 100644 --- a/tests/cbas/scope_partialInitNodes.yml +++ b/tests/cbas/scope_baseQueries.yml @@ -15,5 +15,5 @@ servers: rest_password: password #data_path: "/data" #index_path: "/data" - init_nodes: 6 # ONLY INIT 4 NODES + init_nodes: 6 # ONLY INIT 6 NODES buckets: default From e7774a5111d214262be590db4381b4bc6d32fa74 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 11 Oct 2016 16:02:55 +0300 Subject: [PATCH 21/32] some minor fixes --- containers/curloop/cbas.sh | 4 ++-- containers/curloop/cbasloop.sh | 2 +- containers/templates/Dockerfile-ubuntu-cbas | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 1444ccd3..919ce43c 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -5,5 +5,5 @@ HOST="172.17.0.4" # we need run 'docker rm -fv $(docker ps -qa)' before test STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression -#echo "curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" -curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log \ No newline at end of file +#echo "curl -s --data pretty=true --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" +curl -s --data pretty=true --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 812817c8..c652c77e 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -6,5 +6,5 @@ STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression while [ 1 ] ; do - curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log + curl -s --data pretty=true --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log done diff --git a/containers/templates/Dockerfile-ubuntu-cbas b/containers/templates/Dockerfile-ubuntu-cbas index 96fde50e..0667dc58 100644 --- a/containers/templates/Dockerfile-ubuntu-cbas +++ b/containers/templates/Dockerfile-ubuntu-cbas @@ -19,7 +19,8 @@ RUN mkdir -p /root/.ssh/ RUN ssh-keyscan github.com >> ~/.ssh/known_hosts RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo RUN chmod a+x /usr/bin/repo -ADD id_rsa /root/.ssh/id_rsa # please replace 'id_rsa' file with private key when you pull private projects from github +# please replace 'id_rsa' file with private key when you pull private projects from github +ADD id_rsa /root/.ssh/id_rsa RUN chmod 400 /root/.ssh/id_rsa RUN mkdir -p /root/cbas RUN cd /root/cbas && repo init -u git://github.com/couchbase/manifest -m analytics/master.xml && repo sync --jobs=6 From afdbb5b32927cbe90383c9d8751a80442efe2cc1 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 13 Oct 2016 01:42:25 +0300 Subject: [PATCH 22/32] format test_cbas.yml --- tests/cbas/test_cbas.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 0f84a864..65fdf149 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -2,7 +2,7 @@ - include: tests/templates/rebalance.yml, tests/templates/fts.yml - start json and binary data loading +# start json and binary data loading - image: sequoiatools/pillowfight command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" @@ -20,6 +20,7 @@ entrypoint: sleep command: "{{.Scale 10}}" wait: true + # connect bucket with CBAS - image: sequoiatools/curloop @@ -33,6 +34,7 @@ entrypoint: sleep command: "{{.Scale 10}}" wait: true + # query on cbas side. # TODO add more queries - image: sequoiatools/curloop @@ -46,6 +48,7 @@ entrypoint: sleep command: "{{.Scale 20}}" wait: true + # swap rebalance - template: add_node @@ -64,6 +67,7 @@ - template: wait_for_rebalance wait: true + # failover a node - template: failover_node_forced @@ -75,6 +79,7 @@ - template: wait_for_rebalance wait: true + # add one node and then stop rebalance - template: add_node @@ -89,6 +94,7 @@ wait: true - template: rebalance_stop + # failover node with delta recovery - template: failover_and_recover From a5566998ce31cd369ae563d89137475a5de8633b Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 13 Oct 2016 02:20:21 +0300 Subject: [PATCH 23/32] cnange HOST in cbas.sh files --- containers/curloop/cbas.sh | 2 +- containers/curloop/cbasloop.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 919ce43c..4f2d0926 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -1,7 +1,7 @@ #!/bin/sh #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` -HOST="172.17.0.4" # we need run 'docker rm -fv $(docker ps -qa)' before test +HOST="172.17.0.5" # we need run 'docker rm -fv $(docker ps -qa)' before test STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index c652c77e..2d234e2f 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -1,7 +1,7 @@ #!/bin/sh #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` -HOST="172.17.0.4" +HOST="172.17.0.5" STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression From fba27dcd69ff135abf9a24f04ae8ec0ba5677889 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 13 Oct 2016 02:41:00 +0300 Subject: [PATCH 24/32] use --data format=CLEAN_JSON in cbas.sh --- containers/curloop/cbas.sh | 2 +- containers/curloop/cbasloop.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 4f2d0926..0fb1162d 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -6,4 +6,4 @@ STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression #echo "curl -s --data pretty=true --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" -curl -s --data pretty=true --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log \ No newline at end of file +curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service #> log \ No newline at end of file diff --git a/containers/curloop/cbasloop.sh b/containers/curloop/cbasloop.sh index 2d234e2f..75cfb44c 100755 --- a/containers/curloop/cbasloop.sh +++ b/containers/curloop/cbasloop.sh @@ -6,5 +6,5 @@ STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression while [ 1 ] ; do - curl -s --data pretty=true --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log + curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service > log done From 63ab068e24aacd30a3059f7dc82c832cd8652061 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 13 Oct 2016 03:09:15 +0300 Subject: [PATCH 25/32] increase num docs in cbas tests --- tests/cbas/test_cbas.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 65fdf149..1dbaf0bd 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -5,7 +5,7 @@ # start json and binary data loading - image: sequoiatools/pillowfight - command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000}} -t 1" + command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 100000}} -t 1" - image: sequoiatools/gideon command: "kv --ops {{.Scale 100}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" From 65decbeddcebabe3f8ca257ece6052c05fb843d9 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Tue, 18 Oct 2016 19:18:24 +0300 Subject: [PATCH 26/32] minor fixes in vbr/test_vbr.yml --- tests/vbr/test_vbr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vbr/test_vbr.yml b/tests/vbr/test_vbr.yml index fa75e2d0..40f867d3 100644 --- a/tests/vbr/test_vbr.yml +++ b/tests/vbr/test_vbr.yml @@ -123,6 +123,7 @@ args: "{{.Nodes | .Cluster 1 | net 0}}" - template: wait_for_rebalance + wait: true - template: wait_for_rebalance_by_ip args: "{{.Nodes | .Cluster 1 | net 0}}" @@ -147,3 +148,4 @@ template: rebalance - template: wait_for_rebalance + wait: true From fdee2b0a7859b49a678e57ab0eb4ae601c8cd16a Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Wed, 19 Oct 2016 11:28:14 +0300 Subject: [PATCH 27/32] change order wait_for_rebalance_by_ip & wait_for_rebalance --- tests/vbr/test_vbr.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/vbr/test_vbr.yml b/tests/vbr/test_vbr.yml index 40f867d3..16fb4b1d 100644 --- a/tests/vbr/test_vbr.yml +++ b/tests/vbr/test_vbr.yml @@ -67,11 +67,12 @@ - template: rebalance_by_ip args: "{{.Nodes | .Cluster 1 | net 0}}" -- - template: wait_for_rebalance - template: wait_for_rebalance_by_ip args: "{{.Nodes | .Cluster 1 | net 0}}" +- + template: wait_for_rebalance + wait: true #============ 4 failover with delta recovery at cluster A============ - @@ -102,6 +103,7 @@ template: rebalance - template: wait_for_rebalance + wait: true #============ 7 rebalance out 1 node on cluster A & B============ - @@ -121,12 +123,12 @@ - template: rebalance_by_ip args: "{{.Nodes | .Cluster 1 | net 0}}" -- - template: wait_for_rebalance - wait: true - template: wait_for_rebalance_by_ip args: "{{.Nodes | .Cluster 1 | net 0}}" +- + template: wait_for_rebalance + wait: true #============ 8 rebalance in 2 nodes on cluster A ============ From a8497ff4143916982df36b6f4d2498e17fe43469 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 20 Oct 2016 20:04:29 +0300 Subject: [PATCH 28/32] increase num of files for cbas tests --- tests/cbas/test_cbas.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 1dbaf0bd..f12cb4db 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -5,12 +5,12 @@ # start json and binary data loading - image: sequoiatools/pillowfight - command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 100000}} -t 1" + command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 500000}} -t 1" - image: sequoiatools/gideon - command: "kv --ops {{.Scale 100}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" + command: "kv --ops {{.Scale 1000}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 16000" - - command: "kv --ops {{.Scale 100}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" + command: "kv --ops {{.Scale 1000}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" - image: sequoiatools/cbas command: "> LOGS" From eede85d8f4eec8ba72a8544f6fc774cd1cfb2329 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 20 Oct 2016 20:44:36 +0300 Subject: [PATCH 29/32] add some debug verification in test_cbas.yml --- tests/cbas/test_cbas.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index f12cb4db..1118a3d6 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -35,6 +35,16 @@ command: "{{.Scale 10}}" wait: true +#debug: run once to check +- + image: sequoiatools/curloop + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" +- + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" +- + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" + + # query on cbas side. # TODO add more queries - image: sequoiatools/curloop @@ -95,6 +105,16 @@ - template: rebalance_stop +#debug: run once again to check +- + image: sequoiatools/curloop + command: "cbasl.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" +- + command: "cbasl.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" +- + command: "cbasl.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" + + # failover node with delta recovery - template: failover_and_recover From 16dbf0f0808c19f73f6981a425cc32a7e614fff8 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Thu, 20 Oct 2016 21:24:41 +0300 Subject: [PATCH 30/32] fix typo in test_cbas.yml --- tests/cbas/test_cbas.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 1118a3d6..46292024 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -108,11 +108,11 @@ #debug: run once again to check - image: sequoiatools/curloop - command: "cbasl.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" - - command: "cbasl.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" - - command: "cbasl.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" # failover node with delta recovery From 530c2f16cfc8171d8543688eb328bc5d5e192198 Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 24 Oct 2016 17:57:59 +0300 Subject: [PATCH 31/32] add new queries --- containers/curloop/cbas.sh | 4 ++-- tests/cbas/test_cbas.yml | 28 +++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index 0fb1162d..b7295adc 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -1,9 +1,9 @@ #!/bin/sh #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` -HOST="172.17.0.5" # we need run 'docker rm -fv $(docker ps -qa)' before test +HOST="172.17.0.4" # we need run 'docker rm -fv $(docker ps -qa)' before test STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression -#echo "curl -s --data pretty=true --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" +echo "curl -s --data pretty=true --data-urlencode \"statement=$STATEMENT\" http://$HOST:8095/analytics/service -v" curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode "statement=$STATEMENT" http://$HOST:8095/analytics/service #> log \ No newline at end of file diff --git a/tests/cbas/test_cbas.yml b/tests/cbas/test_cbas.yml index 46292024..3e097960 100644 --- a/tests/cbas/test_cbas.yml +++ b/tests/cbas/test_cbas.yml @@ -5,10 +5,10 @@ # start json and binary data loading - image: sequoiatools/pillowfight - command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 500000}} -t 1" + command: "-U {{.Orchestrator}} -B {{.Scale 100}} -I {{.Scale 1000000}} -t 1" - image: sequoiatools/gideon - command: "kv --ops {{.Scale 1000}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 16000" + command: "kv --ops {{.Scale 1000}} --create 10 --get 90 --expire 20 --ttl 600 --hosts {{.Orchestrator}} --bucket {{.Bucket}} --sizes 1600" - command: "kv --ops {{.Scale 1000}} --create 30 --get 70 --delete 10 --hosts {{.Orchestrator}} --bucket {{.Bucket}}" - @@ -40,19 +40,33 @@ image: sequoiatools/curloop command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" - - command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''29\' and \\`component\\` = \''0A\' ;" +- + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` != \''D8\' ;" - command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" +- + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''7B\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` < \''NUM7000\'NUM and \\`totalCount\\`< \''NUM80\'NUM group by \\`component\\` ;" +- + image: sequoiatools/cmd + entrypoint: sleep + command: "{{.Scale 20}}" + wait: true # query on cbas side. # TODO add more queries - image: sequoiatools/curloop command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" - - command: "cbasloop.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" + command: "cbasloop.sh select count(*) from shadowBucket where \\`state\\` = \''29\' and \\`component\\` = \''0A\' ;" +- + command: "cbasloop.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` != \''D8\' ;" - command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" +- + command: "cbasloop.sh select value t from shadowBucket t where \\`state\\` = \''7B\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` < \''NUM7000\'NUM and \\`totalCount\\`< \''NUM80\'NUM group by \\`component\\` ;" + - image: sequoiatools/cmd entrypoint: sleep @@ -110,9 +124,13 @@ image: sequoiatools/curloop command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''25\' and \\`result\\` = \''SUCCESS\' group by \\`city\\` ;" - - command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` = \''D8\' ;" + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''29\' and \\`component\\` = \''0A\' ;" +- + command: "cbas.sh select count(*) from shadowBucket where \\`state\\` = \''79\' and \\`component\\` != \''D8\' ;" - command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''B1\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` > \''NUM7000\'NUM and \\`totalCount\\`> \''NUM80\'NUM group by \\`component\\` ;" +- + command: "cbas.sh select value t from shadowBucket t where \\`state\\` = \''7B\' and \\`rating\\`> \''NUM100\'NUM and \\`duration\\` < \''NUM7000\'NUM and \\`totalCount\\`< \''NUM80\'NUM group by \\`component\\` ;" # failover node with delta recovery From 85868d63d57c6e6c89f4b1eb2ef57f2b3ba6855e Mon Sep 17 00:00:00 2001 From: andreibaranouski Date: Mon, 24 Oct 2016 18:19:39 +0300 Subject: [PATCH 32/32] fix ip in containers/curloop/cbas.sh --- containers/curloop/cbas.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/curloop/cbas.sh b/containers/curloop/cbas.sh index b7295adc..109c3665 100755 --- a/containers/curloop/cbas.sh +++ b/containers/curloop/cbas.sh @@ -1,7 +1,7 @@ #!/bin/sh #ID=`docker ps -a | grep "Up" | grep "sequoiatools/cbas" | awk '{print $1}'` #HOST=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ID` -HOST="172.17.0.4" # we need run 'docker rm -fv $(docker ps -qa)' before test +HOST="172.17.0.5" # we need run 'docker rm -fv $(docker ps -qa)' before test STATEMENT=$@ STATEMENT=${STATEMENT//\\/""} # remove \ slashes STATEMENT=${STATEMENT//\'NUM/""} # to use nums in expression