-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/functional-tester: update README for local docker testing
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
- Loading branch information
Showing
7 changed files
with
202 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
<<COMMENT | ||
# to run agent | ||
./scripts/agent-1.sh | ||
# to run with failpoints | ||
ETCD_EXEC_PATH=/etcd-failpoints ./scripts/agent-1.sh | ||
COMMENT | ||
|
||
if ! [[ "$0" =~ "scripts/agent-1.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
if [ -z "${ETCD_EXEC_PATH}" ]; then | ||
ETCD_EXEC_PATH=/etcd | ||
echo "Running agent without failpoints:" ${ETCD_EXEC_PATH} | ||
elif [[ "${ETCD_EXEC_PATH}" == "/etcd-failpoints" ]]; then | ||
echo "Running agent with failpoints:" ${ETCD_EXEC_PATH} | ||
else | ||
echo "Cannot find executable:" ${ETCD_EXEC_PATH} | ||
exit 255 | ||
fi | ||
|
||
rm -rf `pwd`/agent-1 && mkdir -p `pwd`/agent-1 | ||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name agent-1 \ | ||
--mount type=bind,source=`pwd`/agent-1,destination=/agent-1 \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-agent \ | ||
--etcd-path ${ETCD_EXEC_PATH} \ | ||
--etcd-log-dir /agent-1 \ | ||
--port :19027 \ | ||
--failpoint-addr :7381" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
<<COMMENT | ||
# to run agent | ||
./scripts/agent-2.sh | ||
# to run with failpoints | ||
ETCD_EXEC_PATH=/etcd-failpoints ./scripts/agent-2.sh | ||
COMMENT | ||
|
||
if ! [[ "$0" =~ "scripts/agent-2.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
if [ -z "${ETCD_EXEC_PATH}" ]; then | ||
ETCD_EXEC_PATH=/etcd | ||
echo "Running agent without failpoints:" ${ETCD_EXEC_PATH} | ||
elif [[ "${ETCD_EXEC_PATH}" == "/etcd-failpoints" ]]; then | ||
echo "Running agent with failpoints:" ${ETCD_EXEC_PATH} | ||
else | ||
echo "Cannot find executable:" ${ETCD_EXEC_PATH} | ||
exit 255 | ||
fi | ||
|
||
rm -rf `pwd`/agent-2 && mkdir -p `pwd`/agent-2 | ||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name agent-2 \ | ||
--mount type=bind,source=`pwd`/agent-2,destination=/agent-2 \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-agent \ | ||
--etcd-path ${ETCD_EXEC_PATH} \ | ||
--etcd-log-dir /agent-2 \ | ||
--port :29027 \ | ||
--failpoint-addr :7382" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
<<COMMENT | ||
# to run agent | ||
./scripts/agent-3.sh | ||
# to run with failpoints | ||
ETCD_EXEC_PATH=/etcd-failpoints ./scripts/agent-3.sh | ||
COMMENT | ||
|
||
if ! [[ "$0" =~ "scripts/agent-3.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
if [ -z "${ETCD_EXEC_PATH}" ]; then | ||
ETCD_EXEC_PATH=/etcd | ||
echo "Running agent without failpoints:" ${ETCD_EXEC_PATH} | ||
elif [[ "${ETCD_EXEC_PATH}" == "/etcd-failpoints" ]]; then | ||
echo "Running agent with failpoints:" ${ETCD_EXEC_PATH} | ||
else | ||
echo "Cannot find executable:" ${ETCD_EXEC_PATH} | ||
exit 255 | ||
fi | ||
|
||
rm -rf `pwd`/agent-3 && mkdir -p `pwd`/agent-3 | ||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name agent-3 \ | ||
--mount type=bind,source=`pwd`/agent-3,destination=/agent-3 \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-agent \ | ||
--etcd-path ${ETCD_EXEC_PATH} \ | ||
--etcd-log-dir /agent-3 \ | ||
--port :39027 \ | ||
--failpoint-addr :7383" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! [[ "$0" =~ "scripts/tester-limit.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
# to run only 1 test round | ||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name tester \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-tester \ | ||
--agent-endpoints '127.0.0.1:19027,127.0.0.1:29027,127.0.0.1:39027' \ | ||
--client-ports 1379,2379,3379 \ | ||
--advertise-client-ports 13790,23790,33790 \ | ||
--peer-ports 1380,2380,3380 \ | ||
--advertise-peer-ports 13800,23800,33800 \ | ||
--limit 1 \ | ||
--stress-qps=2500 \ | ||
--stress-key-txn-count 100 \ | ||
--stress-key-txn-ops 10 \ | ||
--exit-on-failure" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! [[ "$0" =~ "scripts/tester-runner.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
# to run with etcd-runner | ||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name tester \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-tester \ | ||
--agent-endpoints '127.0.0.1:19027,127.0.0.1:29027,127.0.0.1:39027' \ | ||
--client-ports 1379,2379,3379 \ | ||
--advertise-client-ports 13790,23790,33790 \ | ||
--peer-ports 1380,2380,3380 \ | ||
--advertise-peer-ports 13800,23800,33800 \ | ||
--stress-qps=2500 \ | ||
--stress-key-txn-count 100 \ | ||
--stress-key-txn-ops 10 \ | ||
--etcd-runner /etcd-runner \ | ||
--stresser=keys,lease,election-runner,watch-runner,lock-racer-runner,lease-runner \ | ||
--exit-on-failure" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! [[ "$0" =~ "scripts/tester.sh" ]]; then | ||
echo "must be run from tools/functional-tester" | ||
exit 255 | ||
fi | ||
|
||
docker run \ | ||
--rm \ | ||
--net=host \ | ||
--name tester \ | ||
gcr.io/etcd-development/etcd-functional-tester:go1.9.3 \ | ||
/bin/bash -c "/etcd-tester \ | ||
--agent-endpoints '127.0.0.1:19027,127.0.0.1:29027,127.0.0.1:39027' \ | ||
--client-ports 1379,2379,3379 \ | ||
--advertise-client-ports 13790,23790,33790 \ | ||
--peer-ports 1380,2380,3380 \ | ||
--advertise-peer-ports 13800,23800,33800 \ | ||
--stress-qps=2500 \ | ||
--stress-key-txn-count 100 \ | ||
--stress-key-txn-ops 10 \ | ||
--exit-on-failure" |