Skip to content

Commit dd26221

Browse files
committed
updating examples to use dynamic-haproxy
1 parent fd616dc commit dd26221

File tree

31 files changed

+46
-318
lines changed

31 files changed

+46
-318
lines changed

example-enterprise-backup/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ services:
3030
lb:
3131
container_name: lb
3232
hostname: lb
33-
build: haproxy
33+
image: timveil/dynamic-haproxy:latest
3434
ports:
35-
- "5432:5432"
35+
- "26257:26257"
3636
- "8080:8080"
3737
- "8081:8081"
38+
environment:
39+
- NODES=crdb-0 crdb-1 crdb-2
3840
links:
3941
- crdb-0
4042
- crdb-1

example-enterprise-backup/haproxy/Dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

example-enterprise-backup/haproxy/haproxy.cfg

Lines changed: 0 additions & 40 deletions
This file was deleted.

example-haproxy-with-workload/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Simple 3 node CockroachDB cluster with HAProxy acting as load balancer
2020
While `.up.sh` will automatically initialize and run the `tpcc` workload, you can use the following command to restart the `tpcc` sample `workload` for 10 minutes. For more details see [this](https://www.cockroachlabs.com/docs/stable/cockroach-workload.html#run-the-tpcc-workload).
2121

2222
```bash
23-
docker-compose exec workload-client /cockroach/cockroach workload run tpcc --tolerate-errors --warehouses=3 --duration=10m "postgresql://root@lb:5432?sslmode=disable"
23+
docker-compose exec workload-client /cockroach/cockroach workload run tpcc --tolerate-errors --warehouses=3 --duration=10m "postgresql://root@lb:26257?sslmode=disable"
2424
```
2525

2626
### Open Interactive Shells

example-haproxy-with-workload/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ services:
2727
lb:
2828
container_name: lb
2929
hostname: lb
30-
build: haproxy
30+
image: timveil/dynamic-haproxy:latest
3131
ports:
32-
- "5432:5432"
32+
- "26257:26257"
3333
- "8080:8080"
3434
- "8081:8081"
35+
environment:
36+
- NODES=crdb-0 crdb-1 crdb-2
3537
links:
3638
- crdb-0
3739
- crdb-1

example-haproxy-with-workload/haproxy/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

example-haproxy-with-workload/haproxy/haproxy.cfg

Lines changed: 0 additions & 37 deletions
This file was deleted.

example-haproxy-with-workload/up.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ docker-compose up -d
66

77
sleep 10
88

9-
docker-compose exec workload-client /cockroach/cockroach workload init --warehouses=3 tpcc "postgresql://root@lb:5432?sslmode=disable"
10-
docker-compose exec workload-client /cockroach/cockroach workload run --warehouses=3 tpcc --tolerate-errors --duration=30m "postgresql://root@lb:5432?sslmode=disable"
9+
docker-compose exec workload-client /cockroach/cockroach workload init --warehouses=3 tpcc "postgresql://root@lb:26257?sslmode=disable"
10+
docker-compose exec workload-client /cockroach/cockroach workload run --warehouses=3 tpcc --tolerate-errors --duration=30m "postgresql://root@lb:26257?sslmode=disable"

example-haproxy/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ services:
2727
lb:
2828
container_name: lb
2929
hostname: lb
30-
build: haproxy
30+
image: timveil/dynamic-haproxy:latest
3131
ports:
32-
- "5432:5432"
32+
- "26257:26257"
3333
- "8080:8080"
3434
- "8081:8081"
35+
environment:
36+
- NODES=crdb-0 crdb-1 crdb-2
3537
links:
3638
- crdb-0
3739
- crdb-1

example-haproxy/haproxy/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)