cmd/juju/application: Document placement for multiple units #7343

Merged
merged 1 commit into from May 17, 2017

Conversation

Projects
None yet
4 participants
Contributor

mjs commented May 16, 2017

Description of change

It wasn't clear how to specify placement when multiple units were being created with add-unit and deploy. The syntax for --to with multiple targets is now documented.

Some other general clean ups of the help for these commands was also made.

QA steps

juju add-unit -h and juju deploy -h

Documentation changes

N.A.

Bug reference

https://bugs.launchpad.net/juju/+bug/1687663

We should mention what happens when n > number of placement directives. ie new machines are used after all the directives have been consumed

Contributor

mjs commented May 16, 2017

@wallyworld: good idea. done.

Contributor

mjs commented May 16, 2017

$$merge$$

Contributor

jujubot commented May 16, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Minor bikeshedding, looks like a good change though.

cmd/juju/application/addunit.go
+or load-balancing. See the documentation for specfic charms to check
+how scale-out is supported.
+
+The add-unit is applied to applications that have already been
@babbageclunk

babbageclunk May 16, 2017

Member

I think this would read better as "The add-unit command...".

@mjs

mjs May 16, 2017

Contributor

That was typo. I've fixed this and made some more extensive improvements.

cmd/juju/application/addunit.go
+how scale-out is supported.
+
+The add-unit is applied to applications that have already been
+deployed. By default, applications are deployed to newly provisioned
@babbageclunk

babbageclunk May 16, 2017

Member

Should be "units are deployed...".

@mjs

mjs May 16, 2017

Contributor

fixed

cmd/juju/application/addunit.go
juju add-unit wordpress -n 5
-Add one unit of mysql to the existing machine 23:
-
+Add a unit of mysql to an existing machine:
@babbageclunk

babbageclunk May 16, 2017

Member

Saying that it's to machine 23 makes it clearer.

@mjs

mjs May 16, 2017

Contributor

fixed

cmd/juju/application/addunit.go
juju add-unit mysql --to 23
-Create a new LXD container on machine 7 and add one unit of mysql:
+Add two units of mysql to two preexisting machines:
@babbageclunk

babbageclunk May 16, 2017

Member

So here should be "to preexisting machines 3 and 4".

If you want to be really cool you could use a diaeresis on the second e! ;)
https://www.reddit.com/r/grammar/comments/2h9h08/article_in_the_new_yorker_uses_the_word/

@mjs

mjs May 16, 2017

Contributor

That's interesting and weird. With my rewording the word "preëxisting" no longer exists in the text :)

cmd/juju/application/addunit.go
+Add two units of mysql to two preexisting machines:
+ juju add-unit mysql -n 2 --to 3,4
+
+Add three units of mysql to one preexisting machine:
@babbageclunk

babbageclunk May 16, 2017

Member

I guess by here it's probably fine not to specify which machine it is.

cmd/juju/application/addunit.go
+Add a unit of mariadb to LXD container number 3 on machine 24:
@babbageclunk

babbageclunk May 16, 2017

Member

I think add-unit also supports --to lxd, doesn't it?

@mjs

mjs May 16, 2017

Contributor

it does - added it

cmd/juju/application/deploy.go
juju deploy haproxy -n 2 --constraints spaces=dmz,^cms,^database
- (deploy 2 units to machines that are part of the 'dmz' space but not of the
- 'cmd' or the 'database' spaces)
+ (deploy 2 units to machines that are part of the 'dmz' space but
@babbageclunk

babbageclunk May 16, 2017

Member

"Part of" seems awkward here - what about just "in the 'dmz' space but not in the 'cmd' or 'database' spaces"?

@mjs

mjs May 16, 2017

Contributor

fixed

Contributor

jujubot commented May 16, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10893

Contributor

mjs commented May 16, 2017

$$merge$$

Contributor

jujubot commented May 16, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented May 16, 2017

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10900

cmd/juju/application: Document placement for multiple units
It wasn't clear how to specify placement when multiple units were
being created with add-unit and deploy. The syntax for --to with
multiple targets is now documented.

Some other general clean ups of the help for these commands was also made.

Fixes https://bugs.launchpad.net/juju/+bug/1687663
Contributor

mjs commented May 16, 2017

$$merge$$

Contributor

jujubot commented May 16, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented May 16, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10901

Contributor

mjs commented May 17, 2017

$$mongodb-died-windows$$

Contributor

jujubot commented May 17, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 06579e8 into juju:develop May 17, 2017

1 check failed

github-check-merge-juju Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details

@mjs mjs deleted the mjs:1687663-add-units-docs branch May 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment