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

Expose the CLI reference pages a bit better from the index #1966

Merged
merged 3 commits into from
Sep 11, 2015

Conversation

dnephin
Copy link

@dnephin dnephin commented Sep 2, 2015

I noticed while reading over our docs that it was really hard for me to find the environment variables and command reference. I think this change will make the situation better by cross-linking the reference pages to each other, and by adding a "where to go next" section to the overview page.

Also adds docs for a missing cli environment variable.


Specify the api version the client should report. If you get an error about
`client and server don't have same version` you may use this environment
variable to have the client report a version compatible with the server.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make it clear that this is not really safe or "supported".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how to word it. I was initially thinking of something like "Setting an api version may cause some features to fail, and is not officially supported."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had some discussion on this in docker; moby/moby#15964 (comment)

It's not yet merged, but it will be described as a "power user" feature, and "use at your own risk"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit ambiguous so more words clarify a bit (or a lot):

The Docker command line client supports a specific version of the Docker API. If you receive a client and server don't have same version error using the command line, setting this environment variable prevents this error. Set it to the version you want the client to report, which is typically a version compatible with the server.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the intent has changed a bit with this wording and now it's not really correct, how about:

The Docker API only supports requests from clients which report a specific version. If you receive a client and server don't have same version error using docker-compose, setting this environment variable prevents this error. Set it to the version you want the client to report. typically the server version.

NOTE: Setting a different API version will prevent some features from working, and is not officially supported.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the specific version or a "matching" version? I think from your rewrite (noice!) same is true. So lets say matching.

"report. typically" -> "report, typically"

Then I got to your note and hit a wall. Why are we suggesting they do this if we don't support it? Which features do I lose if I do do it. Why wouldn't I just fix the problem with the client/API mismatch ---> if this was in the discussion...let me know. We kind of need to summarize the answers here to make the doc useful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"matching" sounds good.

Which features do I lose if I do do it.

That will depend on the version of the client and the server. It will be different for basically every combination, so we can't accurately enumerate them here.

Why wouldn't I just fix the problem with the client/API mismatch

Sometimes (especially at larger orgs, or when there are shared hosts where the users don't necessarily have root) it takes a lot longer to upgrade the server. The server might only be upgraded every second or third version, where as a developer can easily upgrade the client (docker-compose) at any time.

So this environment variable is a workaround for when you want bug fixes or new features from the client, but you can't get a newer server just yet.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnephin thanks for the answers. Let's try something like what you see below. It explains the situation much more completely and gives them a way to troubleshoot problems (assuming I got it right.) Also, I think we should notify Docker Support about this setting --- have y'all talked to them about it?

------>

The Docker API only supports requests from clients which report a specific version. If you receive a client and server don't have same version error using docker-compose, you can workaround this error by setting this environment variable. Set the version value to match the server version.

Setting this variable is intended as a workaround for situations where you need to run temporarily with a mismatch between the client and server version. For example, if you can upgrade the client but need to wait to upgrade the server.

Running with this variable set and a known mismatch does prevent some Docker features from working properly. The exact features that fail would depend on the Docker client and server versions. For this reason, running with this variable set is only intended as a workaround and it is not officially supported.

If you run into problems running with this set, resolve the mismatch through upgrade and remove this setting to see if your problems resolve before notifying support.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should notify Docker Support about this setting

I agree, what's the right way to communicate this type of thing with support?

That rewording sounds great! Thanks!

@aanand
Copy link

aanand commented Sep 2, 2015

Seems like a good idea to me. (ping @moxiegirl)

Not strictly related to your changes, but I find the distinction between reference/index.md, reference/overview.md and reference/docker-compose.md rather confusing. What purpose does each serve?

Furthermore, the Compose command's environment variables are documented on a page called "Introduction to the CLI", whereas the page called "Compose environment variables reference" documents the environment variables that populate linked containers (which we expressly tell people not to use).

@dnephin
Copy link
Author

dnephin commented Sep 2, 2015

I completely agree with both of those points, but I didn't want to make too many changes up-front.

@moxiegirl
Copy link

@aanand The index.md file has a special role in the static file generation. First, it serves as the attachment for the menu label:

image

It also allows for this kind of reference: http://docs.docker.com/compose/reference/ where as overview http://docs.docker.com/compose/reference/overview . I have plans in the next iteration of the docs to make these menu items also act as links not just as labels. Until that happens, I have the overview.md files around.

Happy to explain more if that isn't clear.

@dnephin
Copy link
Author

dnephin commented Sep 8, 2015

I have plans in the next iteration of the docs to make these menu items also act as links not just as labels

Nice, I've wanted this!

@moxiegirl what do you think about the doc changes in this PR ?

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
@dnephin
Copy link
Author

dnephin commented Sep 10, 2015

Wording for the COMPOSE_API_VERSION updated

@moxiegirl
Copy link

@dnephin I talked with Andy and support and let him know. I think it is 4X4 from here out. LGTM @dnephin from me thanks for your patience.

@aanand
Copy link

aanand commented Sep 11, 2015

LGTM

aanand added a commit that referenced this pull request Sep 11, 2015
Expose the CLI reference pages a bit better from the index
@aanand aanand merged commit b25a300 into docker:master Sep 11, 2015
@dnephin dnephin deleted the docs_update branch September 11, 2015 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants