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

Docker commands mentioning "affinity" should co-mention "locality" #96

Open
alexandrascript opened this issue Nov 15, 2016 · 4 comments

Comments

@alexandrascript
Copy link

This issue originated in the documentation repo: https://github.com/joyent/documentation/issues/902

"We refer to locality hints in our doc base for the ability to specify near/far on provision (to allow users to hint where they want containers to go).
However, on the docker side we call this "affinity", which means when someone searches the doc base for "locality" they don't find this.
We should note this, so at the very least this page comes up when they search."

As far as I can tell, an update need to happen in these two places:
https://github.com/joyent/sdc-docker/blob/master/docs/api/commands/create.md
https://github.com/joyent/sdc-docker/blob/master/docs/api/commands/run.md

@trentm
Copy link
Contributor

trentm commented Nov 15, 2016

@heyawhite There are also a number of hits in placement.md:

api/commands/create.md
171:Docker Swarm's affinity filters for controlling on which server a container

api/commands/run.md
520:Docker Swarm's affinity filters for controlling on which server a container

api/features/placement.md
53:## Swarm affinity
61:Swarm defines "filters" for node selection, and in particular ["affinity
62:filters"](https://docs.docker.com/swarm/scheduler/filter/#use-an-affinity-filter)
65:    docker run --name db1 -e 'affinity:container!=db0' -d mysql
70:implements the same affinity filters as documented for Docker Swarm, with the
76:An affinity filter is an argument to `docker run` or `docker create` using
79:    docker run -e 'affinity:<filter>' ...
117:    docker run -e 'affinity:container==silent_bob' ...
123:    docker run -e 'affinity:role!=database' ...
126:    docker run -e 'affinity:container!=foo*' ...
129:    docker run -e 'affinity:container!=/^foo/' ...
139:`triton` CLI for creating and running containers supports a similar affinity
151:The use of affinity rules can mean the placement is impossible. For example:
163:$ docker --tls run --name db1 -e 'affinity:container!=db0' alpine hostname

In Docker-land (as brian mentioned on the originating ticket) it is called "affinity". I think it would be helpful/good to add something like (also called "locality hints" in Triton, see the [cloudapi CreateMachine notes](https://apidocs.joyent.com/cloudapi/#CreateMachine)) appended to one or more mentions of affinity in features/placement.md.

@alexandrascript
Copy link
Author

I've got some changes in a PR ready to go, per your review: #97

If there's a better way to go about this process, let me know.

@alexandrascript
Copy link
Author

@trentm poking again for a review! Thanks.

@alexandrascript
Copy link
Author

I have submitted a change review on Gerrit: https://cr.joyent.us/#/c/1047/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants