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

Add unique store_dir to jetstream blocks. #121

Merged
merged 1 commit into from
Aug 25, 2023
Merged
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
12 changes: 9 additions & 3 deletions examples/topologies/supercluster-jetstream/cli/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ server_name: n1

include sys.conf

jetstream: {}
jetstream: {
store_dir: /tmp/nats/storage/n1
}

cluster: {
name: east,
Expand Down Expand Up @@ -57,7 +59,9 @@ server_name: n2

include sys.conf

jetstream: {}
jetstream: {
store_dir: /tmp/nats/storage/n2
}

cluster: {
name: central,
Expand Down Expand Up @@ -86,7 +90,9 @@ server_name: n3

include sys.conf

jetstream: {}
jetstream: {
store_dir: /tmp/nats/storage/n3
}

cluster: {
name: west,
Expand Down
27 changes: 27 additions & 0 deletions examples/use-cases/cross-region-streams-cluster/cli/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ cluster: {
port: 6222
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az1
}
EOF

cat <<- EOF > "rg1-az2.conf"
Expand All @@ -67,6 +70,9 @@ cluster: {
port: 6223
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az2
}
EOF

cat <<- EOF > "rg1-az3.conf"
Expand All @@ -78,6 +84,9 @@ cluster: {
port: 6224
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az3
}
EOF

cat <<- EOF > "rg2-az1.conf"
Expand All @@ -89,6 +98,9 @@ cluster: {
port: 6225
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az1
}
EOF

cat <<- EOF > "rg2-az2.conf"
Expand All @@ -100,6 +112,9 @@ cluster: {
port: 6226
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az2
}
EOF

cat <<- EOF > "rg2-az3.conf"
Expand All @@ -111,6 +126,9 @@ cluster: {
port: 6227
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az3
}
EOF

cat <<- EOF > "rg3-az1.conf"
Expand All @@ -122,6 +140,9 @@ cluster: {
port: 6228
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az1
}
EOF

cat <<- EOF > "rg3-az2.conf"
Expand All @@ -133,6 +154,9 @@ cluster: {
port: 6229
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az2
}
EOF

cat <<- EOF > "rg3-az3.conf"
Expand All @@ -144,6 +168,9 @@ cluster: {
port: 6230
include cluster.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az3
}
EOF

# Start a server for each configuration and sleep a second in
Expand Down
36 changes: 36 additions & 0 deletions examples/use-cases/cross-region-streams-supercluster/cli/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ gateway {
port: 7222
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az1
}
EOF

cat <<- EOF > "rg1-az2.conf"
Expand All @@ -108,6 +111,9 @@ gateway {
port: 7223
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az2
}
EOF

cat <<- EOF > "rg1-az3.conf"
Expand All @@ -129,6 +135,9 @@ gateway {
port: 7224
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az3
}
EOF

# Server configs for region 2 cluster.
Expand All @@ -152,6 +161,9 @@ gateway {
port: 7225
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az1
}
EOF

cat <<- EOF > "rg2-az2.conf"
Expand All @@ -173,6 +185,9 @@ gateway {
port: 7226
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az2
}
EOF

cat <<- EOF > "rg2-az3.conf"
Expand All @@ -194,6 +209,9 @@ gateway {
port: 7227
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az3
}
EOF

# Server configs for region 3 cluster.
Expand All @@ -217,6 +235,9 @@ gateway {
port: 7228
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az1
}
EOF

cat <<- EOF > "rg3-az2.conf"
Expand All @@ -238,6 +259,9 @@ gateway {
port: 7229
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az2
}
EOF

cat <<- EOF > "rg3-az3.conf"
Expand All @@ -259,6 +283,9 @@ gateway {
port: 7230
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az3
}
EOF

# Server configs for cross-region cluster. In this case, an arbitrary
Expand All @@ -284,6 +311,9 @@ gateway {
port: 7231
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg1-az1-x
}
EOF

cat <<- EOF > "rg2-az2-x.conf"
Expand All @@ -305,6 +335,9 @@ gateway {
port: 7232
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg2-az2-x
}
EOF

cat <<- EOF > "rg3-az3-x.conf"
Expand All @@ -326,6 +359,9 @@ gateway {
port: 7233
include gateway-routes.conf
}
jetstream: {
store_dir: /tmp/nats/storage/rg3-az3-x
}
EOF

# Start a server for each configuration and sleep a second in
Expand Down