Commit dbb5c2af authored by njapke's avatar njapke
Browse files

(WIP) First attempt at 3NodeTest for caching.

parent cb124d4c
Pipeline #12035 passed with stages
in 17 minutes and 50 seconds
......@@ -5,9 +5,7 @@ github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM=
github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
......@@ -58,7 +56,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-errors/errors v1.1.1 h1:ljK/pL5ltg3qoN+OtN6yCv9HWSfMwxSx90GJCZQxYNg=
......@@ -151,7 +148,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
......@@ -196,9 +192,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
......@@ -299,7 +293,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
......@@ -321,6 +314,7 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
......
version: "3.7"
services:
tester:
build:
context: ../../
dockerfile: tests/3NodeTest/Dockerfile
image: fred/tester:local
container_name: tester
command: --nodeAhost=172.26.1.1 --nodeAhttp=9001 --nodeBhost=172.26.2.1 --nodeBhttp=9001 --nodeChost=172.26.3.1 --nodeChttp=9001 --cert-file "/cert/client.crt" --key-file "/cert/client.key" --little-cert-file "/cert/littleclient.crt" --little-key-file "/cert/littleclient.key" --wait-user=false --test-range "1-1"
volumes:
- ../../nase/tls/client.crt:/cert/client.crt
- ../../nase/tls/client.key:/cert/client.key
- ../../nase/tls/littleclient.crt:/cert/littleclient.crt
- ../../nase/tls/littleclient.key:/cert/littleclient.key
networks:
fredwork:
ipv4_address: 172.26.4.1
networks:
fredwork:
external: true
......@@ -9,6 +9,11 @@ clean: ## clean up all resources
@docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f 3NodeTester.yml -f trigger.yml build
@docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f 3NodeTester.yml -f trigger.yml up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans
3nodetest-cached: ## start all containers with docker compose and run the test dockerized
@docker network create fredwork --gateway 172.26.0.1 --subnet 172.26.0.0/16 || true
@docker-compose -f etcd.yml -f nodeA_cached.yml -f nodeB_cached.yml -f nodeC_cached.yml -f 3NodeTester_range.yml -f trigger.yml build
@docker-compose -f etcd.yml -f nodeA_cached.yml -f nodeB_cached.yml -f nodeC_cached.yml -f 3NodeTester_range.yml -f trigger.yml up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans
3nodetest-debug-nodeB: ## same as "test" but with nodeB in debugger mode
@docker network create fredwork --gateway 172.26.0.1 --subnet 172.26.0.0/16 || true
@docker-compose -f etcd.yml -f nodeA.yml -f nodeB-debug.yml -f nodeC.yml -f 3NodeTester.yml -f trigger.yml build
......
version: "3.7"
services:
# this haproxy proxies between 172.26.1.101, 172.26.1.102, 172.26.1.103
nodeAproxy:
build:
context: .
dockerfile: haproxy.Dockerfile
image: fred/fredproxy:local
container_name: nodeAproxy
volumes:
- ../../nase/tls/nodeA.crt:/cert/nodeA.crt
- ../../nase/tls/nodeA.key:/cert/nodeA.crt.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.1.1
nodeA-1:
depends_on:
- nodeAproxy
- storeA
build: ../../
image: fred/fred:local
container_name: nodeA-1
entrypoint: "fred \
--remote-storage-host 172.26.1.104:1337 \
--peer-host 172.26.1.101:5555 \
--peer-host-proxy 172.26.1.1:5555 \
--nodeID nodeA \
--host :9001 \
--host-proxy 172.26.1.1:9001 \
--cert /cert/nodeA.crt \
--key /cert/nodeA.key \
--ca-file /cert/ca.crt \
--adaptor remote \
--nase-host https://172.26.6.1:2379 \
--nase-cert /cert/nodeA.crt \
--nase-key /cert/nodeA.key \
--nase-ca /cert/ca.crt \
--nase-cached \
--handler dev \
--badgerdb-path ./db \
--remote-storage-cert /cert/nodeA.crt \
--remote-storage-key /cert/nodeA.key \
--trigger-cert /cert/nodeA.crt \
--trigger-key /cert/nodeA.key"
environment:
- LOG_LEVEL
volumes:
- ../../nase/tls/nodeA.crt:/cert/nodeA.crt
- ../../nase/tls/nodeA.key:/cert/nodeA.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.1.101
nodeA-2:
depends_on:
- nodeAproxy
- storeA
build: ../../
image: fred/fred:local
container_name: nodeA-2
entrypoint: "fred \
--remote-storage-host 172.26.1.104:1337 \
--peer-host 172.26.1.102:5555 \
--peer-host-proxy 172.26.1.1:5555 \
--nodeID nodeA \
--host :9001 \
--host-proxy 172.26.1.1:9001 \
--cert /cert/nodeA.crt \
--key /cert/nodeA.key \
--ca-file /cert/ca.crt \
--adaptor remote \
--nase-host https://172.26.6.1:2379 \
--nase-cert /cert/nodeA.crt \
--nase-key /cert/nodeA.key \
--nase-ca /cert/ca.crt \
--handler dev \
--badgerdb-path ./db \
--remote-storage-cert /cert/nodeA.crt \
--remote-storage-key /cert/nodeA.key \
--trigger-cert /cert/nodeA.crt \
--trigger-key /cert/nodeA.key"
environment:
- LOG_LEVEL
volumes:
- ../../nase/tls/nodeA.crt:/cert/nodeA.crt
- ../../nase/tls/nodeA.key:/cert/nodeA.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.1.102
nodeA-3:
depends_on:
- nodeAproxy
- storeA
build: ../../
image: fred/fred:local
container_name: nodeA-3
entrypoint: "fred \
--remote-storage-host 172.26.1.104:1337 \
--peer-host 172.26.1.103:5555 \
--peer-host-proxy 172.26.1.1:5555 \
--nodeID nodeA \
--host :9001 \
--host-proxy 172.26.1.1:9001 \
--cert /cert/nodeA.crt \
--key /cert/nodeA.key \
--ca-file /cert/ca.crt \
--adaptor remote \
--nase-host https://172.26.6.1:2379 \
--nase-cert /cert/nodeA.crt \
--nase-key /cert/nodeA.key \
--nase-ca /cert/ca.crt \
--handler dev \
--badgerdb-path ./db \
--remote-storage-cert /cert/nodeA.crt \
--remote-storage-key /cert/nodeA.key \
--trigger-cert /cert/nodeA.crt \
--trigger-key /cert/nodeA.key"
environment:
- LOG_LEVEL
volumes:
- ../../nase/tls/nodeA.crt:/cert/nodeA.crt
- ../../nase/tls/nodeA.key:/cert/nodeA.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.1.103
storeA:
build:
context: ../../
dockerfile: storage.Dockerfile
image: fred/store:local
container_name: storeA
entrypoint: "storageserver \
--log-level '${LOG_LEVEL_STORE}' \
--cert /cert/cert.crt \
--key /cert/key.key \
--ca-file /cert/ca.crt"
volumes:
- ../../nase/tls/storeA.crt:/cert/cert.crt
- ../../nase/tls/storeA.key:/cert/key.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.1.104
networks:
fredwork:
external: true
version: "3.7"
services:
nodeB:
build: ../../
depends_on:
- storeB
image: fred/fred:local
container_name: nodeB
entrypoint: "fred \
--remote-storage-host 172.26.2.2:1337 \
--peer-host 172.26.2.1:5555 \
--nodeID nodeB \
--host 172.26.2.1:9001 \
--cert /cert/nodeB.crt \
--key /cert/nodeB.key \
--ca-file /cert/ca.crt \
--adaptor remote \
--nase-host https://172.26.6.1:2379 \
--nase-cert /cert/nodeB.crt \
--nase-key /cert/nodeB.key \
--nase-ca /cert/ca.crt \
--nase-cached \
--handler dev \
--badgerdb-path ./db \
--remote-storage-cert /cert/nodeB.crt \
--remote-storage-key /cert/nodeB.key \
--trigger-cert /cert/nodeB.crt \
--trigger-key /cert/nodeB.key"
environment:
- LOG_LEVEL
volumes:
- ../../nase/tls/nodeB.crt:/cert/nodeB.crt
- ../../nase/tls/nodeB.key:/cert/nodeB.key
- ../../nase/tls/ca.crt:/cert/ca.crt
ports:
- 9003:9001
networks:
fredwork:
ipv4_address: 172.26.2.1
storeB:
build:
context: ../../
dockerfile: storage.Dockerfile
image: fred/store:local
container_name: storeB
entrypoint: "storageserver \
--log-level '${LOG_LEVEL_STORE}' \
--cert /cert/cert.crt \
--key /cert/key.key \
--ca-file /cert/ca.crt"
volumes:
- ../../nase/tls/storeB.crt:/cert/cert.crt
- ../../nase/tls/storeB.key:/cert/key.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.2.2
networks:
fredwork:
external: true
version: "3.7"
services:
nodeC:
build: ../../
depends_on:
- storeC
image: fred/fred:local
container_name: nodeC
entrypoint: "fred \
--remote-storage-host 172.26.3.2:1337 \
--peer-host 172.26.3.1:5555 \
--nodeID nodeC \
--host 172.26.3.1:9001 \
--cert /cert/nodeC.crt \
--key /cert/nodeC.key \
--ca-file /cert/ca.crt \
--adaptor remote \
--nase-host https://172.26.6.1:2379 \
--nase-cert /cert/nodeC.crt \
--nase-key /cert/nodeC.key \
--nase-ca /cert/ca.crt \
--nase-cached \
--handler dev \
--badgerdb-path ./db \
--remote-storage-cert /cert/nodeC.crt \
--remote-storage-key /cert/nodeC.key \
--trigger-cert /cert/nodeC.crt \
--trigger-key /cert/nodeC.key"
environment:
- LOG_LEVEL
volumes:
- ../../nase/tls/nodeC.crt:/cert/nodeC.crt
- ../../nase/tls/nodeC.key:/cert/nodeC.key
- ../../nase/tls/ca.crt:/cert/ca.crt
ports:
- 9004:9001
networks:
fredwork:
ipv4_address: 172.26.3.1
storeC:
build:
context: ../../
dockerfile: storage.Dockerfile
image: fred/store:local
container_name: storeC
entrypoint: "storageserver \
--log-level '${LOG_LEVEL_STORE}' \
--cert /cert/cert.crt \
--key /cert/key.key \
--ca-file /cert/ca.crt"
volumes:
- ../../nase/tls/storeC.crt:/cert/cert.crt
- ../../nase/tls/storeC.key:/cert/key.key
- ../../nase/tls/ca.crt:/cert/ca.crt
networks:
fredwork:
ipv4_address: 172.26.3.2
networks:
fredwork:
external: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment