-
Notifications
You must be signed in to change notification settings - Fork 43
Add tt cluster reference #4046
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 tt cluster reference #4046
Conversation
90a67fd
to
b95236d
Compare
f2f6692
to
e72ed58
Compare
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.
Thank you for the patch!
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.
Looks cool, see my comments below:
|
||
``COMMAND`` is one of the following: | ||
|
||
* ``publish``: publish a cluster configuration from a file. |
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.
from a file
Confuses me a bit because the config is published FROM a file and can be published TO a file or centralized storage. So, I'd either clarified this or simply changed to publish a cluster configuration.
.
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.
Clarified the source file definition to avoid confusion with app's config.yaml
.
|
||
$ tt cluster publish myapp source.yaml | ||
|
||
To print a local configuration from ``config.yaml`` in an application directory, |
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.
Read like a local configuration is printed in an application directory
on the first attempt :) Maybe, it's better to rephrase somehow to avoid confusion.
|
||
$ tt cluster show "http://myuser:p4$$w0rD@localhost:2379/myapp" | ||
|
||
They are applied with the following precedence, from highest to lowest: |
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.
As an idea, list the examples above using this order and mention their precedence right in the intro to get rid of the second list.
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.
Good idea. Rephrased the intro and merged the lists.
|
||
.. _tt-cluster-instance: | ||
|
||
Managing configurations of specific instances |
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.
Cool, didn't know about this feature before
iproto: | ||
listen: | ||
- uri: 127.0.0.1:3389 | ||
threads: 10 |
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.
Small suggestions regarding this code snippet:
- Rename
instance.yaml
->instance_source.yaml
to avoid confusion withinstances.yaml
. - Change
3389
to smth else because it is used for RDP access in Windows. And this adds unnecessary associations :) Maybe smth like3311
or33001
to show the difference with the default iproto port.
|
||
.. option:: -u, --username STRING | ||
|
||
A username for connecting to the configuration storage. |
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.
The embedded help tells:
username (used as etcd credentials only)
Shouldn't we mention that this is applicable to etcd only? The same for -p
.
We can also think about mentioning about environment variables in the Options
reference (like we do in config options).
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.
No, these descriptions in command help are outdated, I've checked with @ oleg-jukovec
URI format | ||
~~~~~~~~~~ | ||
|
||
A URI of the cluster configuration storage has the following format: |
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.
An idea from the top of my head (maybe I'm wrong here): move the entire URI format
section to reference and keep only How-to info here. So, the reference might include two levels:
- Reference
- Options
- URI format
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.
The idea is generally OK but I don't see much benefit.
Authentication | ||
~~~~~~~~~~~~~~ | ||
|
||
There are three ways to pass the credentials for connecting to the centralized configuration storage: |
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.
Looks like they apply to etcd only? Or Credentials specified in the storage URI
applies to Tarantool-config storage, too?
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.
All three methods apply to both storage types. Even env variables that have ETCD in their names...
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.
Even env variables that have ETCD in their names...
OMG!
|
||
A password for connecting to the configuration storage. | ||
|
||
.. note:: |
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.
Currently it's hard to understand to which option this note relates. Maybe, simply add a short See also
for both -u
and -p
.
Co-authored-by: Andrey Aksenov <[email protected]>
Resolves #3725, #3929
Added a new page for the tt cluster command reference: tt cluster