Fixes lp#1630372 - add-model help doc, more about credentials. #6422

Merged
merged 4 commits into from Nov 24, 2016

Conversation

Projects
None yet
4 participants
Member

anastasiamac commented Oct 11, 2016

No description provided.

A few comments on the wording.

cmd/juju/controller/addmodel.go
Model names can be duplicated across controllers but must be unique for
any given controller. Model names may only contain lowercase letters,
digits and hyphens, and may not start with a hyphen.
+You may also supply model-specific configuration, a credential, and which
+cloud/region to deploy the model to. The cloud/region and credentials
@wallyworld

wallyworld Oct 11, 2016

Owner

sentences should not end with a preposition :-)

@anastasiamac

anastasiamac Oct 11, 2016

Member

Funny :D this is Andrew's wording. I just moved it around.
I think I'll ask doc team to phrase this whole command doc help and will push the bug until 2.0.1 at least.

cmd/juju/controller/addmodel.go
+are the ones used to create any future resources within the model.
+
+Credentials are always used when adding a model.
+If you are the admin user, your credentials will already be stored in the controller.
@wallyworld

wallyworld Oct 11, 2016

Owner

Not just the admin user. Any user who has updated credentials with the update-credential command. The text I used was just specific to the bug report, not so much in general.

Also, "Credentials are always used when adding a model" is not quite correct. It should be "credential" singular. But I don't think the sentence is required.

So I'd tweak the wording to reflect that if a controller already has a credential stored for the user creating the model, that credential will be used, else it will need to be specified. A credential is stored by either creating a model and using --credential, or running update-credential. In either case, the named credential must previously have been set up using add-credential or autoload-credentials.

cmd/juju/controller/addmodel.go
+To add a model, you must specify a model name.
@axw

axw Nov 24, 2016

Member

please tidy up the line wrapping

cmd/juju/controller/addmodel.go
-access to another user's credentials, so the only valid value for
-credential-owner is your own user name. This may change in a future
-release.
+To add a model, Juju requires a credential.
@axw

axw Nov 24, 2016

Member

and here, and below

cmd/juju/controller/addmodel.go
-credential-owner is your own user name. This may change in a future
-release.
+To add a model, Juju requires a credential.
+If a controller has a credential for the user creating the model,
@axw

axw Nov 24, 2016

Member

unspecified-credential only applies to the admin user

  • if you have a default (or just one) credential defined at client (i.e. in credentials.yaml), then juju will use that
  • if you have no default (and multiple) credentials defined at the client, then you must specify one using --credential
  • as the admin user you can omit the credential, and the credential used to bootstrap will be used
cmd/juju/controller/addmodel.go
+this command allows to specify desired named credential with --credential option.
+This option stores provided named credential in the controller.
+
+Another way of ensuring that a named credential is stored in the controller, is
@axw

axw Nov 24, 2016

Member

I don't think this is particularly relevant at the moment. We'll probably want to change the backend code so that if there's just one credential for a user, we'll use that; but that is not the case at the moment. Even if it were, I think it would be more useful to explain a scenario in which that would be helpful.

Please drop this sentence, unless you have an argument against the above.

cmd/juju/controller/addmodel.go
+Another way of ensuring that a named credential is stored in the controller, is
+by running update-credential command.
+
+Named credentials are defined in Juju via either
@axw

axw Nov 24, 2016

Member

This sounds strange and vague. What does "defined in Juju" mean? What are "actual names", and what are other types of names if they are no actual names?

Suggested rewording:

To add a credential for add-model, use one of the "juju add-credential" or "juju autoload-credentials" commands. These will add credentials to the Juju client, which "juju add-model" will upload to the controller as necessary.

axw approved these changes Nov 24, 2016

cmd/juju/controller/addmodel.go
-"juju add-credential" or "juju autoload-credentials" where
-actual names are in the form of either
-"credential-name" or "credential-owner/credential-name".
+To add a model, you must specify a model name. Model names can be duplicated
@axw

axw Nov 24, 2016

Member

I just noticed the existing text about uniqueness, which is wrong. Can you please fix that? The name is unique per user, in a controller. So alice and bob can each have their own model called "secret".

@anastasiamac anastasiamac changed the base branch from master to develop Nov 24, 2016

Member

anastasiamac commented Nov 24, 2016

$$merge$$

Contributor

jujubot commented Nov 24, 2016

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

@jujubot jujubot merged commit e06195e into juju:develop Nov 24, 2016

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

@anastasiamac anastasiamac deleted the anastasiamac:add-model-helpdocs branch Nov 24, 2016

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