Skip to content

Commit 0156be8

Browse files
committed
Update local with master changes
2 parents f0bd5db + 45a8cf9 commit 0156be8

13 files changed

+135
-52
lines changed

1_deploy.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ else
88
export VOTE_TAG=$1
99
fi;
1010

11+
docker-compose -f docker-compose-voteinfra.yml up -d
12+
13+
source ./set_network.sh
14+
1115
docker-compose -f docker-compose-voteapp.yml up -d

2_deploy_tugbot.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
echo "Deploying Tugbot Testing Framework ..."
44

5+
source ./set_network.sh
6+
57
docker-compose -f docker-compose-tugbot.yml up -d

3_configure_kibana.sh

Lines changed: 25 additions & 24 deletions
Large diffs are not rendered by default.

4_run_tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
echo "Running Functional and Integration Tests ..."
44

5+
source ./set_network.sh
6+
57
docker-compose -f docker-compose-tests.yml up -d

5_bug_on_off.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
11
#!/bin/bash
22

3-
for i in {1..10}; do ./1_deploy.sh bad; sleep 15; ./1_deploy.sh; done
3+
if [ -z "$1" ]; then
4+
END=10
5+
else
6+
END=$1
7+
fi
8+
9+
if [ -z "$2" ]; then
10+
SLEEP=15
11+
else
12+
SLEEP=$2
13+
fi
14+
15+
for i in $(seq 1 ${END}); do
16+
echo "***** ITERATION ${i}/${END} ******"
17+
echo " > Deploy BUG "
18+
(./1_deploy.sh bad)
19+
sleep "${SLEEP}"
20+
echo " > Fix BUG "
21+
(./1_deploy.sh)
22+
sleep "${SLEEP}"
23+
echo " "
24+
done

7_run_pumba.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
echo "Running Pumba Network Emulation ..."
44

5+
source ./set_network.sh
6+
57
docker-compose -f docker-compose-pumba.yml up

9_clean.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
docker-compose -f docker-compose-voteapp.yml down --remove-orphans
4+
docker-compose -f docker-compose-voteinfra.yml down --remove-orphans
45

56
# cleanup volumes
67
if ([ $1 ] && [ $1 = "all" ]); then

docker-compose-pumba.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ services:
33

44
pumba:
55
image: gaiaadm/pumba:master
6+
environment:
7+
http_proxy: "$tb_proxy"
8+
https_proxy: "$tb_proxy"
9+
no_proxy: "$tb_no_proxy"
610
volumes:
711
- /var/run/docker.sock:/var/run/docker.sock
812
networks:

docker-compose-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ services:
33

44
votests:
55
image: gaiadocker/example-voting-app-tests:latest
6+
environment:
7+
http_proxy: "$tb_proxy"
8+
https_proxy: "$tb_proxy"
9+
no_proxy: "$tb_no_proxy"
10+
dbHost: "db"
11+
appHost: "voting-app:80"
612
volumes:
713
- /var/run/docker.sock:/var/run/docker.sock
814
networks:
915
- voteapp
10-
environment:
11-
- dbHost=db
12-
- appHost=voting-app:80
1316

1417
networks:
1518
voteapp:

docker-compose-tugbot.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ services:
1010

1111
collect:
1212
image: gaiadocker/tugbot-collect:latest
13+
environment:
14+
http_proxy: "$tb_proxy"
15+
https_proxy: "$tb_proxy"
16+
no_proxy: "$tb_no_proxy"
1317
volumes:
1418
- /var/run/docker.sock:/var/run/docker.sock
1519
networks:
@@ -20,6 +24,10 @@ services:
2024

2125
result:
2226
image: gaiadocker/tugbot-result-service-es:latest
27+
environment:
28+
http_proxy: "$tb_proxy"
29+
https_proxy: "$tb_proxy"
30+
no_proxy: "$tb_no_proxy"
2331
ports:
2432
- "8081:8081"
2533
networks:
@@ -38,12 +46,15 @@ services:
3846

3947
kibana:
4048
image: kibana:4.5.1
49+
environment:
50+
http_proxy: "$tb_proxy"
51+
https_proxy: "$tb_proxy"
52+
no_proxy: "$tb_no_proxy"
53+
ELASTICSEARCH_URL: "http://es:9200"
4154
ports:
4255
- "5601:5601"
4356
networks:
4457
- voteapp
45-
environment:
46-
- ELASTICSEARCH_URL=http://es:9200
4758

4859
volumes:
4960
es:

docker-compose-voteapp.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,36 @@ services:
44

55
voting-app:
66
image: gaiadocker/example-voting-app-vote:${VOTE_TAG}
7+
environment:
8+
http_proxy: "$tb_proxy"
9+
https_proxy: "$tb_proxy"
10+
no_proxy: "$tb_no_proxy"
711
ports:
812
- 5000:80
913
networks:
1014
- voteapp
1115

1216
result-app:
1317
image: gaiadocker/example-voting-app-result:latest
18+
environment:
19+
http_proxy: "$tb_proxy"
20+
https_proxy: "$tb_proxy"
21+
no_proxy: "$tb_no_proxy"
1422
ports:
1523
- 5001:80
1624
networks:
1725
- voteapp
1826

1927
worker:
2028
image: gaiadocker/example-voting-app-worker:latest
29+
environment:
30+
http_proxy: "$tb_proxy"
31+
https_proxy: "$tb_proxy"
32+
no_proxy: "$tb_no_proxy"
2133
networks:
2234
voteapp:
2335
aliases:
2436
- workers
2537

26-
redis:
27-
image: redis:3.2-alpine
28-
ports:
29-
- "6379"
30-
networks:
31-
- voteapp
32-
container_name: redis
33-
34-
db:
35-
image: postgres:9.4
36-
volumes:
37-
- db-data:/var/lib/postgresql/data
38-
networks:
39-
- voteapp
40-
container_name: db
41-
42-
volumes:
43-
db-data:
44-
# driver: rexray
45-
# driver_opts:
46-
# size: 10
47-
4838
networks:
4939
voteapp:

docker-compose-voteinfra.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "2"
2+
3+
services:
4+
5+
redis:
6+
image: redis:3.2-alpine
7+
ports:
8+
- "6379"
9+
networks:
10+
- voteapp
11+
container_name: redis
12+
13+
db:
14+
image: postgres:9.4
15+
volumes:
16+
- db-data:/var/lib/postgresql/data
17+
networks:
18+
- voteapp
19+
container_name: db
20+
21+
volumes:
22+
db-data:
23+
# driver: rexray
24+
# driver_opts:
25+
# size: 10
26+
27+
networks:
28+
voteapp:
29+

set_network.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
subnet=$(docker network inspect --format='{{(index (index .IPAM.Config) 0).Subnet}}' examplevotingapp_voteapp)
4+
5+
[ $http_proxy ] && tb_proxy=$http_proxy || tb_proxy=$HTTP_PROXY
6+
tb_no_proxy=$(echo redis,db,voting-app,result,es),$(seq -s ',' -f $(echo $subnet | cut -d '.' -f1-3).%g 0 255)
7+
[ $no_proxy ] && tb_no_proxy=$tb_no_proxy,$no_proxy,127.0.0.1,localhost || tb_no_proxy=$tb_no_proxy,$NO_PROXY,127.0.0.1,localhost
8+
9+
# echo tb_proxy=$tb_proxy
10+
# echo tb_no_proxy=$tb_no_proxy
11+
export tb_proxy=$tb_proxy
12+
export tb_no_proxy=$tb_no_proxy,result
13+

0 commit comments

Comments
 (0)