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 Swarm management CLI commands #23363

Merged
merged 33 commits into from Jun 14, 2016
Merged

Add Swarm management CLI commands #23363

merged 33 commits into from Jun 14, 2016

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Jun 8, 2016

As described in our ROADMAP.md, introduce new Swarm management commands to call to the corresponding API endpoints.

This PR is fully backward compatible (joining a Swarm is an optional feature of the Engine, and existing commands are not impacted)

@icecrime icecrime added this to the 1.12.0 milestone Jun 8, 2016
@thaJeztah thaJeztah added the status/failing-ci Indicates that the PR in its current state fails the test suite label Jun 8, 2016
if !ok {
return fmt.Errorf("Failed to parse %v as a rational number", value)
}
*c = nanoCPUs(cpu.Mul(cpu, big.NewRat(1e9, 1)).Num().Int64())
Copy link
Member

Choose a reason for hiding this comment

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

Before calling Int64(), you have to check IsInt() or return an error. This is to make sure there's no loss (user input is not below nanos).

@dnephin dnephin force-pushed the swarm-cli branch 2 times, most recently from e631699 to c32e879 Compare June 9, 2016 16:27
@dnephin
Copy link
Member Author

dnephin commented Jun 9, 2016

Ok, those issues should be fixed.


cmd := &cobra.Command{
Use: "promote NODE [NODE...]",
Short: "Promote a node as manager in the swarm",
Copy link

Choose a reason for hiding this comment

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

Probably, "Promote a node to manager in the swarm"?

@vdemeester
Copy link
Member

win2lin error is weird :

04:14:18 # github.com/docker/swarmkit/identity
04:14:18 vendor\src\github.com\docker\swarmkit\identity\randomid.go:54: nn.Text undefined (type big.Int has no field or method Text)

@thaJeztah
Copy link
Member

@vdemeester it's because that CI is still on Go 1.5.4

@chanwit
Copy link

chanwit commented Jun 12, 2016

Just let you know, I did a rebase on master with a small conflict at:
cli/usage.go.

Other than that it's just fine.

dnephin and others added 9 commits June 13, 2016 18:24
As described in our ROADMAP.md, introduce new Swarm management commands
to call to the corresponding API endpoints.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Amit Shukla <amit.shukla@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Rename `--port` to `--publish` for consistency between `docker service`
and `docker run`.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Rename `--restart-policy-*` flags to `--restart-*` (e.g.,
`--restart-policy-delay` becomes `--restart-delay`).

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Rename `--updateconfig-*` to `--update-*` and improve help messages.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
- Set secret when using default policy
- Always initialize policy for all roles

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
dnephin and others added 3 commits June 13, 2016 18:43
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
@icecrime
Copy link
Contributor

icecrime commented Jun 14, 2016

LGTM 💯

@vieux
Copy link
Contributor

vieux commented Jun 14, 2016

LGTM 💯

@tonistiigi tonistiigi removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Jun 14, 2016
@tiborvass
Copy link
Contributor

LGTM

@icecrime
Copy link
Contributor

CLI reference and docs will be completed in a followup 👍

@icecrime icecrime merged this pull request into swarm-backend Jun 14, 2016
@chanwit
Copy link

chanwit commented Jun 14, 2016

🎉 🎉

I love the new scale command.
Thank you guys. This is super awesome!!

@thaJeztah
Copy link
Member

🐝 🐝 🎉

@runcom runcom deleted the swarm-cli branch June 15, 2016 10:57
@albers
Copy link
Member

albers commented Jun 17, 2016

@thaJeztah This PR added reference pages for the swarm and node commands. But there are none for service yet. Is there some WIP?

@thaJeztah
Copy link
Member

@albers correct, there's an issue for tracking this here; #23598

@albers
Copy link
Member

albers commented Jun 17, 2016

@thaJeztah cool, thanks. I already dropped a note there.

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.

None yet