-
Notifications
You must be signed in to change notification settings - Fork 43
3.0 config: replication reference #3834
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
11a7142
3.0 configuration: sharding sample
andreyaksenov fdbe04c
3.0 configuration: update tt configuration
andreyaksenov dd8c89d
3.0 configuration: bootstrap leader sample
andreyaksenov 8ef65db
3.0 configuration: simplify the 'manual_leader' sample
andreyaksenov 43f1f61
3.0 configuration: peers sample
andreyaksenov d1fa791
3.0 configuration: add readme for 'replication'
andreyaksenov cd480a5
3.0 configuration: update main README
andreyaksenov a98e43e
3.0 configuration: replication reference
andreyaksenov 97a98f7
3.0 configuration: update per review
andreyaksenov c740efe
3.0 configuration: add ETCDCTL_API note
andreyaksenov c8b913e
3.0 configuration: fix sharded cluster sample
andreyaksenov 83177e8
3.0 configuration: update per TW review
andreyaksenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,63 +1,54 @@ | ||||||
tt: | ||||||
modules: | ||||||
# Directory where the external modules are stored. | ||||||
directory: "modules" | ||||||
modules: | ||||||
# Directory where the external modules are stored. | ||||||
directory: modules | ||||||
|
||||||
app: | ||||||
# Directory that stores various instance runtime | ||||||
# artifacts like console socket, PID file, etc. | ||||||
run_dir: "var/run" | ||||||
env: | ||||||
# Restart instance on failure. | ||||||
restart_on_failure: false | ||||||
|
||||||
# Directory that stores log files. | ||||||
log_dir: var/log | ||||||
# Directory that stores binary files. | ||||||
bin_dir: bin | ||||||
|
||||||
# The maximum size in MB of the log file before it gets rotated. | ||||||
log_maxsize: 100 | ||||||
# Directory that stores Tarantool header files. | ||||||
inc_dir: include | ||||||
|
||||||
# The maximum number of days to retain old log files. | ||||||
log_maxage: 8 | ||||||
# Path to directory that stores all applications. | ||||||
# The directory can also contain symbolic links to applications. | ||||||
instances_enabled: instances.enabled | ||||||
|
||||||
# The maximum number of old log files to retain. | ||||||
log_maxbackups: 10 | ||||||
# Tarantoolctl artifacts layout compatibility: if set to true tt will not create application | ||||||
# sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, | ||||||
# snap) and multi-instance applications are not affected by this option. | ||||||
tarantoolctl_layout: false | ||||||
|
||||||
# Restart instance on failure. | ||||||
restart_on_failure: false | ||||||
app: | ||||||
# Directory that stores various instance runtime | ||||||
# artifacts like console socket, PID file, etc. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
same for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same as above |
||||||
run_dir: var/run | ||||||
|
||||||
# Directory where write-ahead log (.xlog) files are stored. | ||||||
wal_dir: "var/lib" | ||||||
# Directory that stores log files. | ||||||
log_dir: var/log | ||||||
|
||||||
# Directory where memtx stores snapshot (.snap) files. | ||||||
memtx_dir: "var/lib" | ||||||
# Directory where write-ahead log (.xlog) files are stored. | ||||||
wal_dir: var/lib | ||||||
|
||||||
# Directory where vinyl files or subdirectories will be stored. | ||||||
vinyl_dir: "var/lib" | ||||||
# Directory where memtx stores snapshot (.snap) files. | ||||||
memtx_dir: var/lib | ||||||
|
||||||
# Directory that stores binary files. | ||||||
bin_dir: "bin" | ||||||
# Directory where vinyl files or subdirectories will be stored. | ||||||
vinyl_dir: var/lib | ||||||
|
||||||
# Directory that stores Tarantool header files. | ||||||
inc_dir: "include" | ||||||
# Path to file with credentials for downloading Tarantool Enterprise Edition. | ||||||
# credential_path: /path/to/file | ||||||
ee: | ||||||
credential_path: | ||||||
|
||||||
# Path to directory that stores all applications. | ||||||
# The directory can also contain symbolic links to applications. | ||||||
instances_enabled: "instances.enabled" | ||||||
templates: | ||||||
# The path to templates search directory. | ||||||
- path: templates | ||||||
|
||||||
# Tarantoolctl artifacts layout compatibility: if set to true tt will not create application | ||||||
# sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, | ||||||
# snap) and multi-instance applications are not affected by this option. | ||||||
tarantoolctl_layout: false | ||||||
|
||||||
# Path to file with credentials for downloading Tarantool Enterprise Edition. | ||||||
# credential_path: /path/to/file | ||||||
ee: | ||||||
credential_path: "" | ||||||
|
||||||
templates: | ||||||
# The path to templates search directory. | ||||||
- path: "templates" | ||||||
|
||||||
repo: | ||||||
# Directory where local rocks files could be found. | ||||||
rocks: "" | ||||||
# Directory that stores installation files. | ||||||
distfiles: "distfiles" | ||||||
repo: | ||||||
# Directory where local rocks files could be found. | ||||||
rocks: | ||||||
# Directory that stores installation files. | ||||||
distfiles: distfiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Replication | ||
|
||
A sample application demonstrating various replication features. | ||
|
||
## Running | ||
|
||
To run applications placed in [instances.enabled](instances.enabled), go to the `replication` directory in the terminal and execute the `tt start` command, for example: | ||
|
||
```console | ||
$ tt start auto_leader | ||
``` |
30 changes: 30 additions & 0 deletions
30
doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
credentials: | ||
users: | ||
replicator: | ||
password: 'topsecret' | ||
roles: [replication] | ||
|
||
iproto: | ||
advertise: | ||
peer: replicator@ | ||
|
||
replication: | ||
failover: election | ||
|
||
groups: | ||
group001: | ||
replicasets: | ||
replicaset001: | ||
replication: | ||
bootstrap_strategy: config | ||
bootstrap_leader: instance001 | ||
instances: | ||
instance001: | ||
iproto: | ||
listen: 127.0.0.1:3301 | ||
instance002: | ||
iproto: | ||
listen: 127.0.0.1:3302 | ||
instance003: | ||
iproto: | ||
listen: 127.0.0.1:3303 |
3 changes: 3 additions & 0 deletions
3
doc/code_snippets/snippets/replication/instances.enabled/bootstrap_strategy/instances.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
instance001: | ||
instance002: | ||
instance003: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
doc/code_snippets/snippets/replication/instances.enabled/peers/config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
credentials: | ||
users: | ||
replicator: | ||
password: 'topsecret' | ||
roles: [replication] | ||
|
||
replication: | ||
peers: | ||
- replicator:topsecret@127.0.0.1:3301 | ||
- replicator:topsecret@127.0.0.1:3302 | ||
- replicator:topsecret@127.0.0.1:3303 | ||
failover: election | ||
|
||
groups: | ||
group001: | ||
replicasets: | ||
replicaset001: | ||
instances: | ||
instance001: | ||
iproto: | ||
listen: 127.0.0.1:3301 | ||
instance002: | ||
iproto: | ||
listen: 127.0.0.1:3302 | ||
instance003: | ||
iproto: | ||
listen: 127.0.0.1:3303 |
3 changes: 3 additions & 0 deletions
3
doc/code_snippets/snippets/replication/instances.enabled/peers/instances.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
instance001: | ||
instance002: | ||
instance003: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,54 @@ | ||
tt: | ||
modules: | ||
# Directory where the external modules are stored. | ||
directory: "modules" | ||
modules: | ||
# Directory where the external modules are stored. | ||
directory: modules | ||
|
||
app: | ||
# Directory that stores various instance runtime | ||
# artifacts like console socket, PID file, etc. | ||
run_dir: "var/run" | ||
env: | ||
# Restart instance on failure. | ||
restart_on_failure: false | ||
|
||
# Directory that stores log files. | ||
log_dir: var/log | ||
# Directory that stores binary files. | ||
bin_dir: bin | ||
|
||
# The maximum size in MB of the log file before it gets rotated. | ||
log_maxsize: 100 | ||
# Directory that stores Tarantool header files. | ||
inc_dir: include | ||
|
||
# The maximum number of days to retain old log files. | ||
log_maxage: 8 | ||
# Path to directory that stores all applications. | ||
# The directory can also contain symbolic links to applications. | ||
instances_enabled: instances.enabled | ||
|
||
# The maximum number of old log files to retain. | ||
log_maxbackups: 10 | ||
# Tarantoolctl artifacts layout compatibility: if set to true tt will not create application | ||
# sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, | ||
# snap) and multi-instance applications are not affected by this option. | ||
tarantoolctl_layout: false | ||
|
||
# Restart instance on failure. | ||
restart_on_failure: false | ||
app: | ||
# Directory that stores various instance runtime | ||
# artifacts like console socket, PID file, etc. | ||
run_dir: var/run | ||
|
||
# Directory where write-ahead log (.xlog) files are stored. | ||
wal_dir: "var/lib" | ||
# Directory that stores log files. | ||
log_dir: var/log | ||
|
||
# Directory where memtx stores snapshot (.snap) files. | ||
memtx_dir: "var/lib" | ||
# Directory where write-ahead log (.xlog) files are stored. | ||
wal_dir: var/lib | ||
|
||
# Directory where vinyl files or subdirectories will be stored. | ||
vinyl_dir: "var/lib" | ||
# Directory where memtx stores snapshot (.snap) files. | ||
memtx_dir: var/lib | ||
|
||
# Directory that stores binary files. | ||
bin_dir: "bin" | ||
# Directory where vinyl files or subdirectories will be stored. | ||
vinyl_dir: var/lib | ||
|
||
# Directory that stores Tarantool header files. | ||
inc_dir: "include" | ||
# Path to file with credentials for downloading Tarantool Enterprise Edition. | ||
# credential_path: /path/to/file | ||
ee: | ||
credential_path: | ||
|
||
# Path to directory that stores all applications. | ||
# The directory can also contain symbolic links to applications. | ||
instances_enabled: "instances.enabled" | ||
templates: | ||
# The path to templates search directory. | ||
- path: templates | ||
|
||
# Tarantoolctl artifacts layout compatibility: if set to true tt will not create application | ||
# sub-directories for control socket, pid files, log files, etc.. Data files (wal, vinyl, | ||
# snap) and multi-instance applications are not affected by this option. | ||
tarantoolctl_layout: false | ||
|
||
# Path to file with credentials for downloading Tarantool Enterprise Edition. | ||
# credential_path: /path/to/file | ||
ee: | ||
credential_path: "" | ||
|
||
templates: | ||
# The path to templates search directory. | ||
- path: "templates" | ||
|
||
repo: | ||
# Directory where local rocks files could be found. | ||
rocks: "" | ||
# Directory that stores installation files. | ||
distfiles: "distfiles" | ||
repo: | ||
# Directory where local rocks files could be found. | ||
rocks: | ||
# Directory that stores installation files. | ||
distfiles: distfiles |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, cannot fix this as
tt.yaml
is generated automatically usingtt init
. So, this is a reminder that we need to cteate a process for reviewing user-facing texts written by the tt development team.