Skip to content
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

Update shotover and test deps #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions cassandra-1-1/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.3"

networks:
cassandra_subnet:
name: cassandra_subnet
Expand All @@ -16,8 +14,7 @@ services:
networks:
cassandra_subnet:
ipv4_address: 172.16.1.2
environment:
&environment
environment: &environment
CASSANDRA_SEEDS: "cassandra-one,cassandra-two,cassandra-three"
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
Expand All @@ -41,7 +38,7 @@ services:
restart: always
depends_on:
- cassandra-one
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:cassandra-one"
volumes:
- .:/config
Expand All @@ -50,7 +47,7 @@ services:
restart: always
depends_on:
- cassandra-two
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:cassandra-two"
volumes:
- .:/config
Expand All @@ -59,7 +56,7 @@ services:
restart: always
depends_on:
- cassandra-three
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:cassandra-three"
volumes:
- .:/config
7 changes: 2 additions & 5 deletions cassandra-1-many/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.3"

networks:
cassandra_subnet:
name: cassandra_subnet
Expand All @@ -16,8 +14,7 @@ services:
networks:
cassandra_subnet:
ipv4_address: 172.16.1.2
environment:
&environment
environment: &environment
CASSANDRA_SEEDS: "cassandra-one,cassandra-two,cassandra-three"
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
Expand Down Expand Up @@ -53,7 +50,7 @@ services:
- cassandra-one
- cassandra-two
- cassandra-three
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
networks:
cassandra_subnet:
ipv4_address: 172.16.1.5
Expand Down
7 changes: 3 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Shotover Examples

The goal is to house example configs that run on the latest shotover release.

I'm just going to keep force pushing till I have something interesting here
This repo provides example usages of shotover in various use cases.

## redis-backup-cluster

This example demonstrates how to setup shotover to maintain a redis backup cluster such that traffic could be diverted to the backup cluster in the case of complete failure of the primary cluster.
This is suitable for use cases where the data does not need to be 100% consistent between clusters but the service must not go down.

Shotover proxies messages to two distinct redis clusters:

* primary cluster - shotover reads and writes to this cluster
* backup cluster - all writes are duplicated to the backup cluster
* backup cluster - all writes are duplicated to the backup cluster
9 changes: 3 additions & 6 deletions redis-backup-cluster/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.3'
services:
redis-node-primary-0:
image: bitnami/redis-cluster:6.0-debian-10
Expand All @@ -8,8 +7,7 @@ services:
environment: &environment_primary
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=redis-node-primary-0 redis-node-primary-1 redis-node-primary-2'
healthcheck:
&healthcheck_primary
healthcheck: &healthcheck_primary
test:
[
"CMD-SHELL",
Expand Down Expand Up @@ -73,8 +71,7 @@ services:
environment: &environment_backup
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=redis-node-backup-0 redis-node-backup-1 redis-node-backup-2'
healthcheck:
&healthcheck_backup
healthcheck: &healthcheck_backup
test:
[
"CMD-SHELL",
Expand Down Expand Up @@ -195,7 +192,7 @@ services:
condition: service_healthy
redis-node-backup-5:
condition: service_healthy
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
volumes:
- .:/config

Expand Down
13 changes: 6 additions & 7 deletions redis-cluster-1-1/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.3'
services:
redis-node-0:
image: bitnami/redis-cluster:6.0-debian-10
Expand Down Expand Up @@ -76,7 +75,7 @@ services:
restart: always
depends_on:
- redis-node-0
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-0"
volumes:
- .:/config
Expand All @@ -85,7 +84,7 @@ services:
restart: always
depends_on:
- redis-node-1
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-1"
volumes:
- .:/config
Expand All @@ -94,7 +93,7 @@ services:
restart: always
depends_on:
- redis-node-2
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-2"
volumes:
- .:/config
Expand All @@ -103,7 +102,7 @@ services:
restart: always
depends_on:
- redis-node-3
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-3"
volumes:
- .:/config
Expand All @@ -112,7 +111,7 @@ services:
restart: always
depends_on:
- redis-node-4
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-4"
volumes:
- .:/config
Expand All @@ -121,7 +120,7 @@ services:
restart: always
depends_on:
- redis-node-5
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
network_mode: "service:redis-node-5"
volumes:
- .:/config
Expand Down
6 changes: 2 additions & 4 deletions redis-cluster-1-many/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.3'
services:
redis-node-0:
image: bitnami/redis-cluster:6.0-debian-10
Expand All @@ -8,8 +7,7 @@ services:
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
healthcheck:
&healthcheck
healthcheck: &healthcheck
test:
[
"CMD-SHELL",
Expand Down Expand Up @@ -110,7 +108,7 @@ services:
condition: service_healthy
redis-node-5:
condition: service_healthy
image: shotover/shotover-proxy:v0.2.0
image: shotover/shotover-proxy:v0.4.1
volumes:
- .:/config

Expand Down
Loading
Loading