-
Notifications
You must be signed in to change notification settings - Fork 7
Guanyu/dockerfiles #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Guanyu/dockerfiles #110
Changes from 51 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
2b03b44
added docker config files
b211a37
Jinja template for docker-compose file
JBGYZ 9df09c7
Merge branch 'main' into guanyu/dockerfiles
JBGYZ fba488a
Added setup files for 3 containers
JBGYZ 5532264
Cleaned up
JBGYZ adb1182
Fixed typo in names
JBGYZ 9d01e40
Fixed clean docker containers part bug
JBGYZ d34876e
added files for launching and setting up more than 3 nodes
JBGYZ 074fd38
Fixed a bug
JBGYZ 961ee99
Added logs of every node
JBGYZ f71a7e3
Exposed ports to localhost allowing testing on local machine
JBGYZ ee48898
Showed IP addr of nodes
JBGYZ fe88e58
Generated log files in log dir
JBGYZ 92ac6f9
Set Log level
JBGYZ 13c8d99
Merge branch 'main' into guanyu/dockerfiles
JBGYZ f2f23bd
Changed port number
JBGYZ 7686e8c
added log dir
JBGYZ 57b219a
Added an extra window for setup cmd
JBGYZ 5bf3b4f
Added docker test part
JBGYZ 43de033
Added node num as env var in scenario test
JBGYZ bf54291
added sleep
JBGYZ db2be9d
Added pooling check for DKG setup
JBGYZ ed3969a
added pooling for election status
JBGYZ 51914f9
Should work
822ca3f
Merge branch 'guanyu/dockerfiles' of https://github.com/dedis/d-votin…
JBGYZ 65c24f1
automatised tests in a sequential way
JBGYZ fccbc30
fixed autotest; commented attach tmux window
JBGYZ 50b25df
fixed tmux window
JBGYZ ee2d4ce
Removed useless sleep
JBGYZ ce2c7ec
added autotest in readme
JBGYZ e8fa901
rewrite killnode func & cleanup
JBGYZ 3e11334
Removed hardcoded setup files for 3 nodes
JBGYZ bf9b831
Merge branch 'main' into guanyu/dockerfiles
JBGYZ cf40f05
Renamed function to avoid conflicts
JBGYZ 6fc6fde
Changed var name
JBGYZ b01b83a
Added comments on autotest.sh
JBGYZ 10ee4b4
Merged local and docker setup
JBGYZ 734ef28
Used new scripts
JBGYZ 2523e64
Changed proxy port
JBGYZ b74d3b9
Updated for new scripts
JBGYZ 0f5f154
Cleaned up
JBGYZ e9681e6
added count success test numbers
JBGYZ 8b87f92
added logs for running in local machine
JBGYZ 8863839
Added kill node to pass lint
JBGYZ 9ee68c1
fixed integration tests
JBGYZ ed079b9
Ignored log files and tmp node data files
JBGYZ a8bd506
Set Watchtime as a function of node nb
JBGYZ be22d4e
Updated readme with helps
JBGYZ 6dbcfc0
added help flag to scripts
JBGYZ 9443cc4
Fixed flags
JBGYZ 1418be3
added restart node func
JBGYZ 5242b05
Removed useless packages
JBGYZ fa10293
Changed require.NoError
JBGYZ bcc5429
set DOCKER=false by default
JBGYZ 003fc4b
Explained default value in help
JBGYZ 173e64b
Remove only d-voting containers
JBGYZ d0337e8
Removed directly log
JBGYZ c9c4c43
Update integration/scenario_test.go
JBGYZ 49b5826
Not use flags in default cases
JBGYZ 2240d8f
Merge branch 'guanyu/dockerfiles' of https://github.com/dedis/d-votin…
JBGYZ 0c9f51e
Removed useless eval cmd
JBGYZ 11777e4
Handle ignored error
JBGYZ f87fe29
Trick to pass linting without commenting functions
JBGYZ 2ac0f0f
Removed commented codes
JBGYZ 64a79be
Removed seed and redundant wait
JBGYZ 073aee6
Merge branch 'main' into guanyu/dockerfiles
JBGYZ ae116b9
Reset wait time of function of threshold
JBGYZ 9e8c581
Removed useless mkdir
JBGYZ 54b22fe
Added new env var KILLNODE to control kill and restart node
JBGYZ 851bdef
Merge branch 'main' into guanyu/dockerfiles
nkcr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -6,3 +6,7 @@ web/app/node_modules | |
| .idea | ||
|
|
||
| memcoin | ||
|
|
||
| *.log | ||
|
|
||
| nodedata/ | ||
This file contains hidden or 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,35 @@ | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| ## | ||
| ## Build | ||
| ## | ||
| FROM golang:1.17.7-alpine AS build | ||
|
|
||
| RUN apk add --update \ | ||
| coreutils \ | ||
| curl \ | ||
| git \ | ||
| gcc \ | ||
| g++ \ | ||
| make \ | ||
| libc-dev && \ | ||
| rm -rf /var/cache/apk/* | ||
|
|
||
| ENV PATH="${GOPATH}/bin:${PATH}" | ||
| ENV LLVL=info | ||
|
|
||
| COPY . /d-voting | ||
| WORKDIR /d-voting/dela/cli/crypto | ||
| RUN go install | ||
|
|
||
| WORKDIR /d-voting/cli/memcoin/ | ||
| RUN go install | ||
|
|
||
| EXPOSE 2001 | ||
| WORKDIR /d-voting | ||
| # CMD memcoin --config /tmp/node1 start --port 2001 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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,64 @@ | ||
| #! /bin/sh | ||
|
|
||
| # This script uses runNode.sh, setupnNode.sh, kill_test.sh to launch multiple | ||
| # times of scenario test with user defined number of nodes. The results of log are kept in directory named logkill$i | ||
|
|
||
|
|
||
| POSITIONAL_ARGS=() | ||
|
|
||
| while [[ $# -gt 0 ]]; do | ||
| case $1 in | ||
| -h|--help) | ||
| echo "This script uses runNode.sh, setupnNode.sh, kill_test.sh to launch multiple times of scenario test with user defined number of nodes. The results of log are kept in directory named logkill " | ||
| echo "" | ||
| echo "Options:" | ||
| echo "-h | --help program help (this file)" | ||
| echo "-n | --node number of d-voting nodes" | ||
| echo "-r | --run_time set how many times we want to run the test" | ||
| exit 0 | ||
| ;; | ||
| -n|--node) | ||
| N_NODE="$2" | ||
| shift # past argument | ||
| shift # past value | ||
| ;; | ||
| -r|--run_time) | ||
| RUN_TIMES="$2" | ||
| shift # past argument | ||
| shift # past value | ||
| ;; | ||
| -*|--*) | ||
| echo "Unknown option $1" | ||
| exit 1 | ||
| ;; | ||
| *) | ||
| POSITIONAL_ARGS+=("$1") # save positional arg | ||
| shift # past argument | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters | ||
|
|
||
|
|
||
| vals=($(seq 1 1 $RUN_TIMES)) | ||
| for i in "${vals[@]}" | ||
| do | ||
| echo "Test $i with $N_NODE nodes" | ||
| # Launch nodes | ||
| ./runNode.sh -n $N_NODE -a false -d true | ||
| sleep 3 | ||
| # Setup block chain | ||
| ./setupnNode.sh -n $N_NODE -d true | ||
| sleep 3 | ||
| # Start scenario test and keep logs | ||
| NNODES=$N_NODE go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1 | tee ./log/log/gotest.log | ||
| sleep 3 | ||
| # Stop the test | ||
| ./kill_test.sh | ||
| # move log to a new directory named logkill | ||
| mv log/log log/logkill$i | ||
| mkdir -p log/log | ||
JBGYZ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| done | ||
|
|
||
| echo "Test $RUN_TIMES times test and succeeded $(grep -c ok ./log*/gotest.log| awk 'BEGIN{FS=":"}{x+=$2}END{print x}') times" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.